summaryrefslogtreecommitdiff
path: root/import-layers/yocto-poky/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/documentation')
-rw-r--r--import-layers/yocto-poky/documentation/Makefile45
-rw-r--r--import-layers/yocto-poky/documentation/README4
-rw-r--r--import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml88
-rw-r--r--import-layers/yocto-poky/documentation/bsp-guide/bsp.xml409
-rw-r--r--import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.pngbin0 -> 63266 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml4429
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml268
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual-model.xml1654
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml2438
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml618
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml1167
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml80
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/bitbake-build-flow.pngbin0 -> 50338 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/bsp-dev-flow.pngbin42751 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/dev-title.pngbin11813 -> 15950 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.pngbin177945 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.pngbin164192 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.pngbin139827 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/index-downloads.pngbin100374 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/kernel-dev-flow.pngbin35561 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-1.pngbin35839 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-2-generic.pngbin39910 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/dev-manual/figures/source-repos.pngbin188986 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-dev-flow.pngbin0 -> 53197 bytes
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-overview-2-generic.pngbin0 -> 49230 bytes
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml511
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml2038
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml834
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-examples.xml918
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-faq.xml8
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml393
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml392
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-style.css4
-rw-r--r--import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml64
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/YP-flow-diagram.png (renamed from import-layers/yocto-poky/documentation/mega-manual/figures/yocto-environment.png)bin185562 -> 185562 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/bitbake-build-flow.pngbin0 -> 49242 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.pngbin42751 -> 63266 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/dev-title.pngbin11813 -> 15950 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.pngbin179361 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.pngbin152662 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.pngbin140597 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/index-downloads.pngbin58263 -> 36362 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/kernel-dev-flow.pngbin35561 -> 53197 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/kernel-overview-2-generic.pngbin39910 -> 49230 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/sdk-title.pngbin52702 -> 31039 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/figures/source-repos.pngbin188986 -> 167009 bytes
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml62
-rw-r--r--import-layers/yocto-poky/documentation/mega-manual/mega-style.css5
-rw-r--r--import-layers/yocto-poky/documentation/poky.ent17
-rw-r--r--import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml81
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/faq.xml36
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/figures/YP-flow-diagram.pngbin0 -> 190715 bytes
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/figures/git-workflow.png (renamed from import-layers/yocto-poky/documentation/dev-manual/figures/git-workflow.png)bin26586 -> 26586 bytes
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/figures/index-downloads.pngbin0 -> 36362 bytes
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.pngbin0 -> 167009 bytes
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/figures/yp-download.png (renamed from import-layers/yocto-poky/documentation/dev-manual/figures/yp-download.png)bin230971 -> 230971 bytes
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/introduction.xml691
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/migration.xml565
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml43
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml116
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-development-environment.xml (renamed from import-layers/yocto-poky/documentation/ref-manual/closer-look.xml)1205
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml158
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-features.xml21
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-images.xml6
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml284
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml63
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml11
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml253
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-style.css4
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml38
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml668
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/resources.xml257
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/technical-details.xml307
-rw-r--r--import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml422
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-title.pngbin52702 -> 31039 bytes
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml6
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml57
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml386
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml1211
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml23
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml27
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml58
-rw-r--r--import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml1183
-rw-r--r--import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml2
-rw-r--r--import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml985
-rw-r--r--import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml41
-rw-r--r--import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml4
-rw-r--r--import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml57
-rw-r--r--import-layers/yocto-poky/documentation/tools/mega-manual.sed40
-rw-r--r--import-layers/yocto-poky/documentation/yocto-project-qs/figures/yocto-environment.pngbin185562 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css5
-rw-r--r--import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml836
92 files changed, 13942 insertions, 12654 deletions
diff --git a/import-layers/yocto-poky/documentation/Makefile b/import-layers/yocto-poky/documentation/Makefile
index 9077c81215..9891095043 100644
--- a/import-layers/yocto-poky/documentation/Makefile
+++ b/import-layers/yocto-poky/documentation/Makefile
@@ -8,7 +8,7 @@
# system. These manuals also include an "eclipse" sub-directory as part of
# the make process.
#
-# Note that the figures for the Yocto Project Development Manual
+# Note that the figures for the Yocto Project Development Tasks Manual
# differ depending on the BRANCH being built.
#
# The Makefile has these targets:
@@ -42,7 +42,7 @@
# To build a manual, you must invoke Makefile with the DOC argument. If you
# are going to publish the manual, then you must invoke Makefile with both the
# DOC and the VER argument. Furthermore, if you are building or publishing
-# the edison or denzil versions of the Yocto Project Development Manual or
+# the edison or denzil versions of the Yocto Project Development Tasks Manual or
# the mega-manual, you must also use the BRANCH argument.
#
# Examples:
@@ -59,7 +59,7 @@
# 'make DOC=yocto-project-qs' command would be equivalent. The third example
# generates just the PDF version of the Yocto Project Reference Manual.
# The fourth example generates the HTML 'edison' version and (if available)
-# the Eclipse help version of the YP Development Manual. The last example
+# the Eclipse help version of the YP Development Tasks Manual. The last example
# generates the HTML version of the mega-manual and uses the 'denzil'
# branch when choosing figures for the tarball of figures. Any example that does
# not use the BRANCH argument builds the current version of the manual set.
@@ -79,15 +79,16 @@
# The first example publishes the 1.7 version of both the PDF and HTML versions of
# the BSP Guide. The second example publishes the 1.6 version of both the PDF and
# HTML versions of the ADT Manual. The third example publishes the 1.1.1 version of
-# the PDF and HTML YP Development Manual for the 'edison' branch. The fourth example
-# publishes the 1.2 version of the PDF and HTML YP Development Manual for the
-# 'denzil' branch.
+# the PDF and HTML YP Development Tasks Manual for the 'edison' branch. The fourth
+# example publishes the 1.2 version of the PDF and HTML YP Development Tasks Manual
+# for the 'denzil' branch.
#
ifeq ($(DOC),bsp-guide)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
TARFILES = bsp-style.css bsp-guide.html figures/bsp-title.png \
+ figures/bsp-dev-flow.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
FIGURES = figures
@@ -128,14 +129,8 @@ TARFILES = dev-style.css dev-manual.html \
figures/wip.png
else
TARFILES = dev-style.css dev-manual.html \
- figures/bsp-dev-flow.png \
- figures/dev-title.png figures/git-workflow.png \
- figures/index-downloads.png figures/kernel-dev-flow.png \
- figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
- figures/source-repos.png figures/yp-download.png \
- figures/recipe-workflow.png \
- figures/devtool-add-flow.png figures/devtool-modify-flow.png \
- figures/devtool-upgrade-flow.png \
+ figures/dev-title.png \
+ figures/recipe-workflow.png figures/bitbake-build-flow.png \
eclipse
endif
@@ -148,7 +143,7 @@ endif
ifeq ($(DOC),yocto-project-qs)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
-TARFILES = yocto-project-qs.html qs-style.css figures/yocto-environment.png \
+TARFILES = yocto-project-qs.html qs-style.css \
figures/yocto-project-transp.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
@@ -195,8 +190,8 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/source-repos.png figures/yp-download.png \
figures/wip.png
else
-TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
- figures/building-an-image.png \
+TARFILES = mega-manual.html mega-style.css \
+ figures/building-an-image.png figures/YP-flow-diagram.png \
figures/using-a-pre-built-image.png \
figures/poky-title.png figures/buildhistory.png \
figures/buildhistory-web.png \
@@ -206,7 +201,7 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/dev-title.png \
figures/git-workflow.png figures/index-downloads.png \
figures/kernel-dev-flow.png \
- figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
+ figures/kernel-overview-2-generic.png \
figures/source-repos.png figures/yp-download.png \
figures/profile-title.png figures/kernelshark-all.png \
figures/kernelshark-choose-events.png \
@@ -244,13 +239,12 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/sdk-generation.png figures/recipe-workflow.png \
figures/build-workspace-directory.png figures/mega-title.png \
figures/toaster-title.png figures/hosted-service.png \
- figures/simple-configuration.png figures/devtool-add-flow.png \
- figures/devtool-modify-flow.png figures/devtool-upgrade-flow.png \
+ figures/simple-configuration.png \
figures/compatible-layers.png figures/import-layer.png figures/new-project.png \
figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
figures/sdk-devtool-add-flow.png figures/sdk-installed-extensible-sdk-directory.png \
figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \
- figures/sdk-devtool-upgrade-flow.png
+ figures/sdk-devtool-upgrade-flow.png figures/bitbake-build-flow.png
endif
MANUALS = $(DOC)/$(DOC).html
@@ -262,7 +256,7 @@ endif
ifeq ($(DOC),ref-manual)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
-TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
+TARFILES = ref-manual.html ref-style.css figures/poky-title.png figures/YP-flow-diagram.png \
figures/buildhistory.png figures/buildhistory-web.png eclipse \
figures/cross-development-toolchains.png figures/layer-input.png \
figures/package-feeds.png figures/source-input.png \
@@ -271,7 +265,8 @@ TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
figures/patching.png figures/configuration-compile-autoreconf.png \
figures/analysis-for-package-splitting.png figures/image-generation.png \
figures/sdk-generation.png figures/building-an-image.png \
- figures/build-workspace-directory.png
+ figures/build-workspace-directory.png figures/source-repos.png \
+ figures/index-downloads.png figures/yp-download.png figures/git-workflow.png
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
FIGURES = figures
STYLESHEET = $(DOC)/*.css
@@ -330,8 +325,8 @@ ifeq ($(DOC),kernel-dev)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
TARFILES = kernel-dev.html kernel-dev-style.css \
- figures/kernel-dev-title.png \
- figures/kernel-architecture-overview.png \
+ figures/kernel-dev-title.png figures/kernel-overview-2-generic.png \
+ figures/kernel-architecture-overview.png figures/kernel-dev-flow.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
FIGURES = figures
diff --git a/import-layers/yocto-poky/documentation/README b/import-layers/yocto-poky/documentation/README
index a4e70a8721..d64f2fd2f9 100644
--- a/import-layers/yocto-poky/documentation/README
+++ b/import-layers/yocto-poky/documentation/README
@@ -36,8 +36,8 @@ Folders exist for individual manuals as follows:
* sdk-manual - The Yocto Project Software Development Kit (SDK) Developer's Guide.
* bsp-guide - The Yocto Project Board Support Package (BSP) Developer's Guide
-* dev-manual - The Yocto Project Development Manual
-* kernel-dev - The Yocto Project Linux Kernel Development Manual
+* dev-manual - The Yocto Project Development Tasks Manual
+* kernel-dev - The Yocto Project Linux Kernel Development Tasks Manual
* ref-manual - The Yocto Project Reference Manual
* yocto-project-qs - The Yocto Project Quick Start
* mega-manual - The Yocto Project Mega-Manual, which is an aggregated manual comprised
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml b/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml
index f0ee3991c6..576ed18b15 100644
--- a/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml
+++ b/import-layers/yocto-poky/documentation/bsp-guide/bsp-guide.xml
@@ -22,18 +22,11 @@
<authorgroup>
<author>
- <firstname>Saul</firstname> <surname>Wold</surname>
+ <firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
- <email>saul.wold@intel.com</email>
- </author>
- <author>
- <firstname>Richard</firstname> <surname>Purdie</surname>
- <affiliation>
- <orgname>Linux Foundation</orgname>
- </affiliation>
- <email>richard.purdie@linuxfoundation.org</email>
+ <email>srifenbark@gmail.com</email>
</author>
</authorgroup>
@@ -119,24 +112,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -150,34 +138,34 @@
Permission is granted to copy, distribute and/or modify this document under
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para>
- <note><title>Manual Notes</title>
- <itemizedlist>
- <listitem><para>
- For the latest version of the Yocto Project Board
- Support Package (BSP) Developer's Guide associated with
- this Yocto Project release (version
- &YOCTO_DOC_VERSION;),
- see the Yocto Project Board Support Package (BSP)
- Developer's Guide from the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
- </para></listitem>
- <listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
- and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
- </para></listitem>
- <listitem><para>
- For an in-development version of the Yocto Project
- Board Support Package (BSP) Developer's Guide, see
- <ulink url='&YOCTO_DOCS_URL;/latest/bsp-guide/bsp-guide.html'></ulink>.
+ <note><title>Manual Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ This version of the
+ <emphasis>Yocto Project Board Support Package Developer's Guide</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
+ </para></listitem>
+ <listitem><para>
+ For manuals associated with other releases of the Yocto
+ Project, go to the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+ and use the drop-down "Active Releases" button
+ and choose the manual associated with the desired
+ Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
</para></listitem>
- </itemizedlist>
- </note>
+ </itemizedlist>
+ </note>
</legalnotice>
</bookinfo>
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml b/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml
index a92e6115b1..d7b6f15b26 100644
--- a/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml
+++ b/import-layers/yocto-poky/documentation/bsp-guide/bsp.xml
@@ -55,7 +55,7 @@
To help understand the BSP layer concept, consider the BSPs that the
Yocto Project supports and provides with each release.
You can see the layers in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
through a web interface at
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
If you go to that interface, you will find near the bottom of the list
@@ -83,12 +83,12 @@
<para>
For information on the BSP development workflow, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</ulink>"
- section in the Yocto Project Development Manual.
+ "<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>"
+ section.
For more information on how to set up a local copy of source files
from a Git repository, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
- section also in the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+ section also in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -98,12 +98,10 @@
This root is what you add to the
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
variable in the <filename>conf/bblayers.conf</filename> file found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
- which is established after you run one of the OpenEmbedded build environment
- setup scripts (i.e.
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- and
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+ which is established after you run the OpenEmbedded build environment
+ setup script (i.e.
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
Adding the root allows the OpenEmbedded build system to recognize the BSP
definition and from it build an image.
Here is an example:
@@ -141,7 +139,149 @@
<para>
For more detailed information on layers, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
- section of the Yocto Project Development Manual.
+ section of the Yocto Project Development Tasks Manual.
+ </para>
+ </section>
+
+ <section id='preparing-your-build-host-to-work-with-bsp-layers'>
+ <title>Preparing Your Build Host to Work With BSP Layers</title>
+
+ <para>
+ This section describes how to get your build host ready
+ to work with BSP layers.
+ Once you have the host set up, you can create the layer
+ as described in the
+ "<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a new BSP Layer Using the yocto-bsp Script</link>"
+ section.
+ <note>
+ For structural information on BSPs, see the
+ <link linkend='bsp-filelayout'>Example Filesystem Layout</link>
+ section.
+ </note>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Set Up the Build Environment:</emphasis>
+ Be sure you are set up to use BitBake in a shell.
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up the Development Host to Use the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual for information
+ on how to get a build host ready that is either a native
+ Linux machine or a machine that uses CROPS.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Clone the <filename>poky</filename> Repository:</emphasis>
+ You need to have a local copy of the Yocto Project
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (i.e. a local <filename>poky</filename> repository).
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
+ and possibly the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
+ and
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
+ sections all in the Yocto Project Development Tasks Manual for
+ information on how to clone the <filename>poky</filename>
+ repository and check out the appropriate branch for your work.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Determine the BSP Layer You Want:</emphasis>
+ The Yocto Project supports many BSPs, which are maintained in
+ their own layers or in layers designed to contain several
+ BSPs.
+ To get an idea of machine support through BSP layers, you can
+ look at the
+ <ulink url='&YOCTO_RELEASE_DL_URL;/machines'>index of machines</ulink>
+ for the release.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Optionally Clone the
+ <filename>meta-intel</filename> BSP Layer:</emphasis>
+ If your hardware is based on current Intel CPUs and devices,
+ you can leverage this BSP layer.
+ For details on the <filename>meta-intel</filename> BSP layer,
+ see the layer's
+ <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/tree/README'><filename>README</filename></ulink>
+ file.
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Navigate to Your Source Directory:</emphasis>
+ Typically, you set up the
+ <filename>meta-intel</filename> Git repository
+ inside the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (e.g. <filename>poky</filename>).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Clone the Layer:</emphasis>
+ <literallayout class='monospaced'>
+ $ git clone git://git.yoctoproject.org/meta-intel.git
+ Cloning into 'meta-intel'...
+ remote: Counting objects: 14224, done.
+ remote: Compressing objects: 100% (4591/4591), done.
+ remote: Total 14224 (delta 8245), reused 13985 (delta 8006)
+ Receiving objects: 100% (14224/14224), 4.29 MiB | 2.90 MiB/s, done.
+ Resolving deltas: 100% (8245/8245), done.
+ Checking connectivity... done.
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Check Out the Proper Branch:</emphasis>
+ The branch you check out for
+ <filename>meta-intel</filename> must match the same
+ branch you are using for the Yocto Project release
+ (e.g. &DISTRO_NAME_NO_CAP;):
+ <literallayout class='monospaced'>
+ $ git checkout <replaceable>branch_name</replaceable>
+ </literallayout>
+ For an example on how to discover branch names and
+ checkout on a branch, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ </orderedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Optionally Set Up an Alternative BSP Layer:</emphasis>
+ If your hardware can be more closely leveraged to an
+ existing BSP not within the <filename>meta-intel</filename>
+ BSP layer, you can clone that BSP layer.</para>
+
+ <para>The process is identical to the process used for the
+ <filename>meta-intel</filename> layer except for the layer's
+ name.
+ For example, if you determine that your hardware most
+ closely matches the <filename>meta-minnow</filename>,
+ clone that layer:
+ <literallayout class='monospaced'>
+ $ git clone git://git.yoctoproject.org/meta-minnow
+ Cloning into 'meta-minnow'...
+ remote: Counting objects: 456, done.
+ remote: Compressing objects: 100% (283/283), done.
+ remote: Total 456 (delta 163), reused 384 (delta 91)
+ Receiving objects: 100% (456/456), 96.74 KiB | 0 bytes/s, done.
+ Resolving deltas: 100% (163/163), done.
+ Checking connectivity... done.
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Initialize the Build Environment:</emphasis>
+ While in the root directory of the Source Directory (i.e.
+ <filename>poky</filename>), run the
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+ environment setup script to define the OpenEmbedded
+ build environment on your build host.
+ <literallayout class='monospaced'>
+ $ source &OE_INIT_FILE;
+ </literallayout>
+ Among other things, the script creates the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+ which is <filename>build</filename> in this case
+ and is located in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+ After the script runs, your current working directory
+ is set to the <filename>build</filename> directory.
+ </para></listitem>
+ </orderedlist>
</para>
</section>
@@ -417,7 +557,7 @@
released with the BSP.
The information in the <filename>README.sources</filename>
file also helps you find the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
used to generate the images that ship with the BSP.
<note>
If the BSP's <filename>binary</filename> directory is
@@ -522,7 +662,7 @@
<para>
This file simply makes
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
aware of the recipes and configuration directories.
The file must exist so that the OpenEmbedded build system can recognize the BSP.
</para>
@@ -571,7 +711,7 @@
<para>
Tuning files are found in the <filename>meta/conf/machine/include</filename>
directory within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
For example, the <filename>ia32-base.inc</filename> file resides in the
<filename>meta/conf/machine/include</filename> directory.
</para>
@@ -627,7 +767,7 @@
formfactor recipe
<filename>meta/recipes-bsp/formfactor/formfactor_0.0.bb</filename>,
which is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
</para></note>
</section>
@@ -667,7 +807,7 @@
<para>
For your BSP, you typically want to use an existing Yocto
Project kernel recipe found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
at <filename>meta/recipes-kernel/linux</filename>.
You can append machine-specific changes to the kernel recipe
by using a similarly named append file, which is located in
@@ -710,6 +850,204 @@
</section>
</section>
+ <section id='developing-a-board-support-package-bsp'>
+ <title>Developing a Board Support Package (BSP)</title>
+
+ <para>
+ This section contains the high-level procedure you can follow
+ to create a BSP using the Yocto Project's
+ <link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
+ Although not required for BSP creation, the
+ <filename>meta-intel</filename> repository, which contains
+ many BSPs supported by the Yocto Project, is part of the
+ example.
+ </para>
+
+ <para>
+ For an example that shows how to create a new layer using
+ the tools, see the
+ "<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>"
+ section.
+ </para>
+
+ <para>
+ The following illustration and list summarize the BSP
+ creation general workflow.
+ </para>
+
+ <para>
+ <imagedata fileref="figures/bsp-dev-flow.png" width="7in" depth="5in" align="center" scalefit="1" />
+ </para>
+
+ <para>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Set up Your Host Development System to Support
+ Development Using the Yocto Project</emphasis>:
+ See the
+ "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
+ section in the Yocto Project Quick Start for options on how
+ to get a build host ready to use the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Establish the <filename>meta-intel</filename>
+ Repository on Your System:</emphasis>
+ Having local copies of these supported BSP layers on
+ your system gives you access to layers you might be able
+ to build on or modify to create your BSP.
+ For information on how to get these files, see the
+ "<link linkend='preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work with BSP Layers</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create Your Own BSP Layer Using the
+ <link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></link>
+ script:</emphasis>
+ Layers are ideal for isolating and storing work for a
+ given piece of hardware.
+ A layer is really just a location or area in which you
+ place the recipes and configurations for your BSP.
+ In fact, a BSP is, in itself, a special type of layer.
+ The simplest way to create a new BSP layer that is
+ compliant with the Yocto Project is to use the
+ <filename>yocto-bsp</filename> script.
+ For information about that script, see the
+ "<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>"
+ section.</para>
+
+ <para>Another example that illustrates a layer
+ is an application.
+ Suppose you are creating an application that has
+ library or other dependencies in order for it to
+ compile and run.
+ The layer, in this case, would be where all the
+ recipes that define those dependencies are kept.
+ The key point for a layer is that it is an isolated
+ area that contains all the relevant information for
+ the project that the OpenEmbedded build system knows
+ about.
+ For more information on layers, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ For more information on BSP layers, see the
+ "<link linkend='bsp-layers'>BSP Layers</link>"
+ section.
+ <note><title>Notes</title>
+ <para>Five BSPs exist that are part of the Yocto
+ Project release:
+ <filename>beaglebone</filename> (ARM),
+ <filename>mpc8315e</filename> (PowerPC),
+ and <filename>edgerouter</filename> (MIPS).
+ The recipes and configurations for these five BSPs
+ are located and dispersed within the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+ </para>
+
+ <para>Three core Intel BSPs exist as part of the Yocto
+ Project release in the
+ <filename>meta-intel</filename> layer:
+ <itemizedlist>
+ <listitem><para>
+ <filename>intel-core2-32</filename>,
+ which is a BSP optimized for the Core2 family of CPUs
+ as well as all CPUs prior to the Silvermont core.
+ </para></listitem>
+ <listitem><para>
+ <filename>intel-corei7-64</filename>,
+ which is a BSP optimized for Nehalem and later
+ Core and Xeon CPUs as well as Silvermont and later
+ Atom CPUs, such as the Baytrail SoCs.
+ </para></listitem>
+ <listitem><para>
+ <filename>intel-quark</filename>,
+ which is a BSP optimized for the Intel Galileo
+ gen1 &amp; gen2 development boards.
+ </para></listitem>
+ </itemizedlist></para>
+ </note></para>
+
+ <para>When you set up a layer for a new BSP, you should
+ follow a standard layout.
+ This layout is described in the
+ "<link linkend='bsp-filelayout'>Example Filesystem Layout</link>"
+ section.
+ In the standard layout, you will notice a suggested
+ structure for recipes and configuration information.
+ You can see the standard layout for a BSP by examining
+ any supported BSP found in the
+ <filename>meta-intel</filename> layer inside the Source
+ Directory.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Make Configuration Changes to Your New BSP
+ Layer:</emphasis>
+ The standard BSP layer structure organizes the files
+ you need to edit in <filename>conf</filename> and
+ several <filename>recipes-*</filename>
+ directories within the BSP layer.
+ Configuration changes identify where your new layer
+ is on the local system and identify which kernel you
+ are going to use.
+ When you run the <filename>yocto-bsp</filename> script,
+ you are able to interactively configure many things for
+ the BSP (e.g. keyboard, touchscreen, and so forth).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Make Recipe Changes to Your New BSP
+ Layer:</emphasis>
+ Recipe changes include altering recipes
+ (<filename>.bb</filename> files), removing recipes you
+ do not use, and adding new recipes or append files
+ (<filename>.bbappend</filename>) that you need to
+ support your hardware.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Prepare for the Build:</emphasis>
+ Once you have made all the changes to your BSP layer,
+ there remains a few things you need to do for the
+ OpenEmbedded build system in order for it to create
+ your image.
+ You need to get the build environment ready by
+ sourcing an environment setup script
+ (i.e. <filename>oe-init-build-env</filename>)
+ and you need to be sure two key configuration
+ files are configured appropriately: the
+ <filename>conf/local.conf</filename> and the
+ <filename>conf/bblayers.conf</filename> file.
+ You must make the OpenEmbedded build system aware
+ of your new layer.
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
+ section in the Yocto Project Development Tasks Manual
+ for information on how to let the build system
+ know about your new layer.</para>
+
+ <para>The entire process for building an image is
+ overviewed in the section
+ "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>" section
+ of the Yocto Project Quick Start.
+ You might want to reference this information.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Image:</emphasis>
+ The OpenEmbedded build system uses the BitBake tool
+ to build images based on the type of image you want to
+ create.
+ You can find more information about BitBake in the
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+ </para>
+
+ <para>The build process supports several types of
+ images to satisfy different needs.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
+ chapter in the Yocto Project Reference Manual for
+ information on supported images.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
<section id='requirements-and-recommendations-for-released-bsps'>
<title>Requirements and Recommendations for Released BSPs</title>
@@ -732,24 +1070,28 @@
For guidelines on creating a layer that meets these base requirements, see the
"<link linkend='bsp-layers'>BSP Layers</link>" and the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding
- and Creating Layers"</ulink> in the Yocto Project Development Manual.</para></listitem>
+ and Creating Layers"</ulink> in the Yocto Project Development Tasks Manual.
+ </para></listitem>
<listitem><para>The requirements in this section apply regardless of how you
package a BSP.
You should consult the packaging and distribution guidelines for your
specific release process.
For an example of packaging and distribution requirements, see the
"<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third Party BSP Release Process</ulink>"
- wiki page.</para></listitem>
+ wiki page.
+ </para></listitem>
<listitem><para>The requirements for the BSP as it is made available to a developer
are completely independent of the released form of the BSP.
For example, the BSP Metadata can be contained within a Git repository
and could have a directory structure completely different from what appears
- in the officially released BSP layer.</para></listitem>
+ in the officially released BSP layer.
+ </para></listitem>
<listitem><para>It is not required that specific packages or package
modifications exist in the BSP layer, beyond the requirements for general
compliance with the Yocto Project.
For example, no requirement exists dictating that a specific kernel or
- kernel version be used in a given BSP.</para></listitem>
+ kernel version be used in a given BSP.
+ </para></listitem>
</itemizedlist>
</para>
@@ -776,7 +1118,7 @@
<filename>recipes-*</filename> subdirectory.
You can find <filename>recipes.txt</filename> in the
<filename>meta</filename> directory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
or in the OpenEmbedded Core Layer
(<filename>openembedded-core</filename>) found at
<ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
@@ -832,8 +1174,8 @@
This is the person to whom patches and questions should
be sent.
For information on how to find the right person, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
- section in the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para>Instructions on how to build the BSP using the BSP
layer.</para></listitem>
@@ -937,7 +1279,7 @@
file for the modified recipe.
For information on using append files, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para>
Ensure your directory structure in the BSP layer
@@ -1144,7 +1486,7 @@
<para>
Designed to have a command interface somewhat like
- <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>, each
+ <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>, each
tool is structured as a set of sub-commands under a
top-level command.
The top-level command (<filename>yocto-bsp</filename>
@@ -1155,7 +1497,7 @@
<para>
Both tools reside in the <filename>scripts/</filename> subdirectory
- of the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ of the <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
Consequently, to use the scripts, you must <filename>source</filename> the
environment just as you would when invoking a build:
<literallayout class='monospaced'>
@@ -1251,11 +1593,11 @@
necessary to create a BSP and perform basic kernel maintenance on that BSP using
the tools.
<note>
- You can also use the <filename>yocto-layer</filename> tool to create
+ You can also use the <filename>bitbake-layers</filename> script to create
a "generic" layer.
- For information on this tool, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</ulink>"
- section in the Yocto Project Development Guide.
+ For information on using this script to create a layer, see the
+ "<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>"
+ section in the Yocto Project Development Tasks Manual.
</note>
</para>
@@ -1384,8 +1726,7 @@
you do want to use.</para></listitem>
<listitem><para>Next, the script asks whether you would like to have a new
branch created especially for your BSP in the local
- <ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>
- Git repository .
+ Linux Yocto Kernel Git repository .
If not, then the script re-uses an existing branch.</para>
<para>In this example, the default (or "yes") is accepted.
Thus, a new branch is created for the BSP rather than using a common, shared
@@ -1406,7 +1747,7 @@
Defaults are accepted for each.</para></listitem>
<listitem><para>By default, the script creates the new BSP Layer in the
current working directory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
(i.e. <filename>poky/build</filename>).
</para></listitem>
</orderedlist>
diff --git a/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png b/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png
new file mode 100644
index 0000000000..0f82a1f67e
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/bsp-guide/figures/bsp-dev-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
index 598f8775db..0081738087 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -18,7 +18,8 @@
<para>
The OpenEmbedded build system supports organizing
- <link linkend='metadata'>Metadata</link> into multiple layers.
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> into
+ multiple layers.
Layers allow you to isolate different types of customizations from
each other.
You might find it tempting to keep everything in one layer when
@@ -58,7 +59,7 @@
<title>Layers</title>
<para>
- The <link linkend='source-directory'>Source Directory</link>
+ The <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
contains both general layers and BSP
layers right out of the box.
You can easily identify layers that ship with a
@@ -107,7 +108,7 @@
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
section in the Yocto Project Board Support Package (BSP)
Developer's Guide and the
- "<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
+ "<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
section further down in this manual.
</para>
@@ -254,197 +255,182 @@
</section>
<section id='best-practices-to-follow-when-creating-layers'>
- <title>Best Practices to Follow When Creating Layers</title>
+ <title>Following Best Practices When Creating Layers</title>
<para>
To create layers that are easier to maintain and that will
not impact builds for other machines, you should consider the
- information in the following sections.
- </para>
-
- <section id='avoid-overlaying-entire-recipes'>
- <title>Avoid "Overlaying" Entire Recipes</title>
-
- <para>
- Avoid "overlaying" entire recipes from other layers in your
- configuration.
- In other words, do not copy an entire recipe into your
- layer and then modify it.
- Rather, use an append file (<filename>.bbappend</filename>)
- to override
- only those parts of the original recipe you need to modify.
- </para>
- </section>
-
- <section id='avoid-duplicating-include-files'>
- <title>Avoid Duplicating Include Files</title>
-
- <para>
- Avoid duplicating include files.
- Use append files (<filename>.bbappend</filename>)
- for each recipe
- that uses an include file.
- Or, if you are introducing a new recipe that requires
- the included file, use the path relative to the original
- layer directory to refer to the file.
- For example, use
- <filename>require recipes-core/</filename><replaceable>package</replaceable><filename>/</filename><replaceable>file</replaceable><filename>.inc</filename>
- instead of <filename>require </filename><replaceable>file</replaceable><filename>.inc</filename>.
- If you're finding you have to overlay the include file,
- it could indicate a deficiency in the include file in
- the layer to which it originally belongs.
- If this is the case, you should try to address that
- deficiency instead of overlaying the include file.
- For example, you could address this by getting the
- maintainer of the include file to add a variable or
- variables to make it easy to override the parts needing
- to be overridden.
- </para>
- </section>
-
- <section id='structure-your-layers'>
- <title>Structure Your Layers</title>
-
- <para>
- Proper use of overrides within append files and placement
- of machine-specific files within your layer can ensure that
- a build is not using the wrong Metadata and negatively
- impacting a build for a different machine.
- Following are some examples:
- <itemizedlist>
- <listitem><para><emphasis>Modifying Variables to Support
- a Different Machine:</emphasis>
- Suppose you have a layer named
- <filename>meta-one</filename> that adds support
- for building machine "one".
- To do so, you use an append file named
- <filename>base-files.bbappend</filename> and
- create a dependency on "foo" by altering the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
- variable:
- <literallayout class='monospaced'>
+ information in the following list:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Avoid "Overlaying" Entire Recipes from Other Layers in Your Configuration:</emphasis>
+ In other words, do not copy an entire recipe into your
+ layer and then modify it.
+ Rather, use an append file
+ (<filename>.bbappend</filename>) to override only those
+ parts of the original recipe you need to modify.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Avoid Duplicating Include Files:</emphasis>
+ Use append files (<filename>.bbappend</filename>)
+ for each recipe that uses an include file.
+ Or, if you are introducing a new recipe that requires
+ the included file, use the path relative to the
+ original layer directory to refer to the file.
+ For example, use
+ <filename>require recipes-core/</filename><replaceable>package</replaceable><filename>/</filename><replaceable>file</replaceable><filename>.inc</filename>
+ instead of
+ <filename>require </filename><replaceable>file</replaceable><filename>.inc</filename>.
+ If you're finding you have to overlay the include file,
+ it could indicate a deficiency in the include file in
+ the layer to which it originally belongs.
+ If this is the case, you should try to address that
+ deficiency instead of overlaying the include file.
+ For example, you could address this by getting the
+ maintainer of the include file to add a variable or
+ variables to make it easy to override the parts needing
+ to be overridden.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Structure Your Layers:</emphasis>
+ Proper use of overrides within append files and
+ placement of machine-specific files within your layer
+ can ensure that a build is not using the wrong Metadata
+ and negatively impacting a build for a different
+ machine.
+ Following are some examples:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Modify Variables to Support a
+ Different Machine:</emphasis>
+ Suppose you have a layer named
+ <filename>meta-one</filename> that adds support
+ for building machine "one".
+ To do so, you use an append file named
+ <filename>base-files.bbappend</filename> and
+ create a dependency on "foo" by altering the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
+ variable:
+ <literallayout class='monospaced'>
DEPENDS = "foo"
- </literallayout>
- The dependency is created during any build that
- includes the layer
- <filename>meta-one</filename>.
- However, you might not want this dependency
- for all machines.
- For example, suppose you are building for
- machine "two" but your
- <filename>bblayers.conf</filename> file has the
- <filename>meta-one</filename> layer included.
- During the build, the
- <filename>base-files</filename> for machine
- "two" will also have the dependency on
- <filename>foo</filename>.</para>
- <para>To make sure your changes apply only when
- building machine "one", use a machine override
- with the <filename>DEPENDS</filename> statement:
- <literallayout class='monospaced'>
+ </literallayout>
+ The dependency is created during any build that
+ includes the layer
+ <filename>meta-one</filename>.
+ However, you might not want this dependency
+ for all machines.
+ For example, suppose you are building for
+ machine "two" but your
+ <filename>bblayers.conf</filename> file has the
+ <filename>meta-one</filename> layer included.
+ During the build, the
+ <filename>base-files</filename> for machine
+ "two" will also have the dependency on
+ <filename>foo</filename>.</para>
+ <para>To make sure your changes apply only when
+ building machine "one", use a machine override
+ with the <filename>DEPENDS</filename> statement:
+ <literallayout class='monospaced'>
DEPENDS_one = "foo"
- </literallayout>
- You should follow the same strategy when using
- <filename>_append</filename> and
- <filename>_prepend</filename> operations:
- <literallayout class='monospaced'>
+ </literallayout>
+ You should follow the same strategy when using
+ <filename>_append</filename> and
+ <filename>_prepend</filename> operations:
+ <literallayout class='monospaced'>
DEPENDS_append_one = " foo"
DEPENDS_prepend_one = "foo "
- </literallayout>
- As an actual example, here's a line from the recipe
- for gnutls, which adds dependencies on
- "argp-standalone" when building with the musl C
- library:
- <literallayout class='monospaced'>
+ </literallayout>
+ As an actual example, here's a line from the recipe
+ for gnutls, which adds dependencies on
+ "argp-standalone" when building with the musl C
+ library:
+ <literallayout class='monospaced'>
DEPENDS_append_libc-musl = " argp-standalone"
- </literallayout>
- <note>
- Avoiding "+=" and "=+" and using
- machine-specific
- <filename>_append</filename>
- and <filename>_prepend</filename> operations
- is recommended as well.
- </note></para></listitem>
- <listitem><para><emphasis>Place Machine-Specific Files
- in Machine-Specific Locations:</emphasis>
- When you have a base recipe, such as
- <filename>base-files.bb</filename>, that
- contains a
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- statement to a file, you can use an append file
- to cause the build to use your own version of
- the file.
- For example, an append file in your layer at
- <filename>meta-one/recipes-core/base-files/base-files.bbappend</filename>
- could extend
- <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
- using
- <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
- as follows:
- <literallayout class='monospaced'>
+ </literallayout>
+ <note>
+ Avoiding "+=" and "=+" and using
+ machine-specific
+ <filename>_append</filename>
+ and <filename>_prepend</filename> operations
+ is recommended as well.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Place Machine-Specific Files in
+ Machine-Specific Locations:</emphasis>
+ When you have a base recipe, such as
+ <filename>base-files.bb</filename>, that
+ contains a
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ statement to a file, you can use an append file
+ to cause the build to use your own version of
+ the file.
+ For example, an append file in your layer at
+ <filename>meta-one/recipes-core/base-files/base-files.bbappend</filename>
+ could extend
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
+ using
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+ as follows:
+ <literallayout class='monospaced'>
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
- </literallayout>
- The build for machine "one" will pick up your
- machine-specific file as long as you have the
- file in
- <filename>meta-one/recipes-core/base-files/base-files/</filename>.
- However, if you are building for a different
- machine and the
- <filename>bblayers.conf</filename> file includes
- the <filename>meta-one</filename> layer and
- the location of your machine-specific file is
- the first location where that file is found
- according to <filename>FILESPATH</filename>,
- builds for all machines will also use that
- machine-specific file.</para>
- <para>You can make sure that a machine-specific
- file is used for a particular machine by putting
- the file in a subdirectory specific to the
- machine.
- For example, rather than placing the file in
- <filename>meta-one/recipes-core/base-files/base-files/</filename>
- as shown above, put it in
- <filename>meta-one/recipes-core/base-files/base-files/one/</filename>.
- Not only does this make sure the file is used
- only when building for machine "one", but the
- build process locates the file more quickly.</para>
- <para>In summary, you need to place all files
- referenced from <filename>SRC_URI</filename>
- in a machine-specific subdirectory within the
- layer in order to restrict those files to
- machine-specific builds.</para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section id='other-recommendations'>
- <title>Other Recommendations</title>
-
- <para>
- We also recommend the following:
- <itemizedlist>
- <listitem><para>If you want permission to use the
- Yocto Project Compatibility logo with your layer
- or application that uses your layer, perform the
- steps to apply for compatibility.
- See the
- "<link linkend='making-sure-your-layer-is-compatible-with-yocto-project'>Making Sure Your Layer is Compatible With Yocto Project</link>"
- section for more information.
- </para></listitem>
- <listitem><para>Store custom layers in a Git repository
- that uses the
- <filename>meta-<replaceable>layer_name</replaceable></filename> format.
- </para></listitem>
- <listitem><para>Clone the repository alongside other
- <filename>meta</filename> directories in the
- <link linkend='source-directory'>Source Directory</link>.
- </para></listitem>
- </itemizedlist>
- Following these recommendations keeps your Source Directory and
- its configuration entirely inside the Yocto Project's core
- base.
- </para>
- </section>
+ </literallayout>
+ The build for machine "one" will pick up your
+ machine-specific file as long as you have the
+ file in
+ <filename>meta-one/recipes-core/base-files/base-files/</filename>.
+ However, if you are building for a different
+ machine and the
+ <filename>bblayers.conf</filename> file includes
+ the <filename>meta-one</filename> layer and
+ the location of your machine-specific file is
+ the first location where that file is found
+ according to <filename>FILESPATH</filename>,
+ builds for all machines will also use that
+ machine-specific file.</para>
+ <para>You can make sure that a machine-specific
+ file is used for a particular machine by putting
+ the file in a subdirectory specific to the
+ machine.
+ For example, rather than placing the file in
+ <filename>meta-one/recipes-core/base-files/base-files/</filename>
+ as shown above, put it in
+ <filename>meta-one/recipes-core/base-files/base-files/one/</filename>.
+ Not only does this make sure the file is used
+ only when building for machine "one", but the
+ build process locates the file more quickly.</para>
+ <para>In summary, you need to place all files
+ referenced from <filename>SRC_URI</filename>
+ in a machine-specific subdirectory within the
+ layer in order to restrict those files to
+ machine-specific builds.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Perform Steps to Apply for Yocto Project Compatibility:</emphasis>
+ If you want permission to use the
+ Yocto Project Compatibility logo with your layer
+ or application that uses your layer, perform the
+ steps to apply for compatibility.
+ See the
+ "<link linkend='making-sure-your-layer-is-compatible-with-yocto-project'>Making Sure Your Layer is Compatible With Yocto Project</link>"
+ section for more information.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Follow the Layer Naming Convention:</emphasis>
+ Store custom layers in a Git repository that use the
+ <filename>meta-<replaceable>layer_name</replaceable></filename>
+ format.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Group Your Layers Locally:</emphasis>
+ Clone your repository alongside other cloned
+ <filename>meta</filename> directories from the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+ </para></listitem>
+ </itemizedlist>
+ </para>
</section>
<section id='making-sure-your-layer-is-compatible-with-yocto-project'>
@@ -456,65 +442,74 @@
existing Yocto Project layers (i.e. the layer is compatible
with the Yocto Project).
Ensuring compatibility makes the layer easy to be consumed
- by others in the Yocto Project community and allows you
- permission to use the Yocto Project Compatibility logo.
- </para>
-
- <para>
- Version 1.0 of the Yocto Project Compatibility Program has
- been in existence for a number of releases.
- This version of the program consists of the layer application
- process that requests permission to use the Yocto Project
- Compatibility logo for your layer and application.
- You can find version 1.0 of the form at
- <ulink url='https://www.yoctoproject.org/webform/yocto-project-compatible-registration'></ulink>.
- To be granted permission to use the logo, you need to be able
- to answer "Yes" to the questions or have an acceptable
- explanation for any questions answered "No".
- </para>
-
- <para>
- A second version (2.0) of the Yocto Project Compatibility
- Program is currently under development.
- Included as part of version 2.0 (and currently available) is
- the <filename>yocto-compat-layer.py</filename> script.
- When run against a layer, this script tests the layer against
- tighter constraints based on experiences of how layers have
- worked in the real world and where pitfalls have been found.
- </para>
-
- <para>
- Part of the 2.0 version of the program that is not currently
- available but is in development is an updated compatibility
- application form.
- This updated form, among other questions, specifically
- asks if your layer has passed the test using the
- <filename>yocto-compat-layer.py</filename> script.
- <note><title>Tip</title>
- Even though the updated application form is currently
- unavailable for version 2.0 of the Yocto Project
- Compatibility Program, the
- <filename>yocto-compat-layer.py</filename> script is
- available in OE-Core.
- You can use the script to assess the status of your
- layers in advance of the 2.0 release of the program.
+ by others in the Yocto Project community and could allow you
+ permission to use the Yocto Project Compatible Logo.
+ <note>
+ Only Yocto Project member organizations are permitted to
+ use the Yocto Project Compatible Logo.
+ The logo is not available for general use.
+ For information on how to become a Yocto Project member
+ organization, see the
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
</note>
</para>
<para>
+ The Yocto Project Compatibility Program consists of a layer
+ application process that requests permission to use the Yocto
+ Project Compatibility Logo for your layer and application.
+ The process consists of two parts:
+ <orderedlist>
+ <listitem><para>
+ Successfully passing a script
+ (<filename>yocto-check-layer</filename>) that
+ when run against your layer, tests it against
+ constraints based on experiences of how layers have
+ worked in the real world and where pitfalls have been
+ found.
+ Getting a "PASS" result from the script is required for
+ successful compatibility registration.
+ </para></listitem>
+ <listitem><para>
+ Completion of an application acceptance form, which
+ you can find at
+ <ulink url='https://www.yoctoproject.org/webform/yocto-project-compatible-registration'></ulink>.
+ </para></listitem>
+ </orderedlist>
+ </para>
+
+ <para>
+ To be granted permission to use the logo, you need to satisfy
+ the following:
+ <itemizedlist>
+ <listitem><para>
+ Be able to check the box indicating that you
+ got a "PASS" when running the script against your
+ layer.
+ </para></listitem>
+ <listitem><para>
+ Answer "Yes" to the questions on the form or have an
+ acceptable explanation for any questions answered "No".
+ </para></listitem>
+ <listitem><para>
+ You need to be a Yocto Project Member Organization.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
The remainder of this section presents information on the
- version 1.0 registration form and on the
- <filename>yocto-compat-layer.py</filename> script.
+ registration form and on the
+ <filename>yocto-check-layer</filename> script.
</para>
- <section id='yocto-project-compatibility-program-application'>
- <title>Yocto Project Compatibility Program Application</title>
+ <section id='yocto-project-compatible-program-application'>
+ <title>Yocto Project Compatible Program Application</title>
<para>
- Use the 1.0 version of the form to apply for your
- layer's compatibility approval.
+ Use the form to apply for your layer's approval.
Upon successful application, you can use the Yocto
- Project Compatibility logo with your layer and the
+ Project Compatibility Logo with your layer and the
application that uses your layer.
</para>
@@ -552,26 +547,18 @@
</para>
</section>
- <section id='yocto-compat-layer-py-script'>
- <title><filename>yocto-compat-layer.py</filename> Script</title>
+ <section id='yocto-check-layer-script'>
+ <title><filename>yocto-check-layer</filename> Script</title>
<para>
- The <filename>yocto-compat-layer.py</filename> script,
- which is currently available, provides you a way to
- assess how compatible your layer is with the Yocto
- Project.
+ The <filename>yocto-check-layer</filename> script
+ provides you a way to assess how compatible your layer is
+ with the Yocto Project.
You should run this script prior to using the form to
apply for compatibility as described in the previous
section.
- <note>
- Because the script is part of the 2.0 release of the
- Yocto Project Compatibility Program, you are not
- required to successfully run your layer against it
- in order to be granted compatibility status.
- However, it is a good idea as it promotes
- well-behaved layers and gives you an idea of where your
- layer stands regarding compatibility.
- </note>
+ You need to achieve a "PASS" result in order to have
+ your application form successfully processed.
</para>
<para>
@@ -588,7 +575,7 @@
your build directory:
<literallayout class='monospaced'>
$ source oe-init-build-env
- $ yocto-compat-layer.py <replaceable>your_layer_directory</replaceable>
+ $ yocto-check-layer <replaceable>your_layer_directory</replaceable>
</literallayout>
Be sure to provide the actual directory for your layer
as part of the command.
@@ -655,7 +642,7 @@
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'>BBLAYERS</ulink></filename>
variable in your <filename>conf/bblayers.conf</filename> file,
which is found in the
- <link linkend='build-directory'>Build Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
The following example shows how to enable a layer named
<filename>meta-mylayer</filename>:
<literallayout class='monospaced'>
@@ -736,7 +723,7 @@
<para>
As an example, consider the main formfactor recipe and a
corresponding formfactor append file both from the
- <link linkend='source-directory'>Source Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
Here is the main formfactor recipe, which is named
<filename>formfactor_0.0.bb</filename> and located in the
"meta" layer at
@@ -975,128 +962,163 @@
...
EXTRA_OECONF = "--enable-something --enable-somethingelse"
...
- </literallayout></para></listitem>
- </itemizedlist></para></listitem>
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>layerindex-fetch</filename>:</emphasis>
+ Fetches a layer from a layer index, along with its
+ dependent layers, and adds the layers to the
+ <filename>conf/bblayers.conf</filename> file.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>layerindex-show-depends</filename>:</emphasis>
+ Finds layer dependencies from the layer index.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>create-layer</filename>:</emphasis>
+ Creates a basic layer.
+ </para></listitem>
</itemizedlist>
</para>
</section>
- <section id='creating-a-general-layer-using-the-yocto-layer-script'>
- <title>Creating a General Layer Using the yocto-layer Script</title>
+ <section id='creating-a-general-layer-using-the-bitbake-layers-script'>
+ <title>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</title>
<para>
- The <filename>yocto-layer</filename> script simplifies
+ The <filename>bitbake-layers</filename> script with the
+ <filename>create-layer</filename> subcommand simplifies
creating a new general layer.
- <note>
- For information on BSP layers, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
- section in the Yocto Project Board Specific (BSP)
- Developer's Guide.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ For information on BSP layers, see the
+ "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+ section in the Yocto Project Board Specific (BSP)
+ Developer's Guide.
+ </para></listitem>
+ <listitem><para>
+ The <filename>bitbake-layers</filename> script
+ replaces the <filename>yocto-layer</filename>
+ script, which is deprecated in the Yocto Project
+ 2.4 release.
+ The <filename>yocto-layer</filename> script
+ continues to function as part of the 2.4 release
+ but will be removed post 2.4.
+ </para></listitem>
+ </itemizedlist>
</note>
- The default mode of the script's operation is to prompt you for
- information needed to generate the layer:
+ The default mode of the script's operation with this
+ subcommand is to create a layer with the following:
<itemizedlist>
- <listitem><para>The layer priority.
+ <listitem><para>A layer priority of 6.
</para></listitem>
- <listitem><para>Whether or not to create a sample recipe.
+ <listitem><para>A <filename>conf</filename>
+ subdirectory that contains a
+ <filename>layer.conf</filename> file.
</para></listitem>
- <listitem><para>Whether or not to create a sample
- append file.
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Use the <filename>yocto-layer create</filename> sub-command
- to create a new general layer.
- In its simplest form, you can create a layer as follows:
- <literallayout class='monospaced'>
- $ yocto-layer create mylayer
- </literallayout>
- The previous example creates a layer named
- <filename>meta-mylayer</filename> in the current directory.
- </para>
-
- <para>
- As the <filename>yocto-layer create</filename> command runs,
- default values for the prompts appear in brackets.
- Pressing enter without supplying anything for the prompts
- or pressing enter and providing an invalid response causes the
- script to accept the default value.
- Once the script completes, the new layer
- is created in the current working directory.
- The script names the layer by prepending
- <filename>meta-</filename> to the name you provide.
- </para>
-
- <para>
- Minimally, the script creates the following within the layer:
- <itemizedlist>
- <listitem><para><emphasis>The <filename>conf</filename>
- directory:</emphasis>
- This directory contains the layer's configuration file.
- The root name for the file is the same as the root name
- your provided for the layer (e.g.
- <filename><replaceable>layer</replaceable>.conf</filename>).
+ <listitem><para>
+ A <filename>recipes-example</filename> subdirectory
+ that contains a further subdirectory named
+ <filename>example</filename>, which contains
+ an <filename>example.bb</filename> recipe file.
</para></listitem>
- <listitem><para><emphasis>The
- <filename>COPYING.MIT</filename> file:</emphasis>
- The copyright and use notice for the software.
+ <listitem><para>A <filename >COPYING.MIT</filename>,
+ which is the license statement for the layer.
+ The script assumes you want to use the MIT license,
+ which is typical for most layers, for the contents of
+ the layer itself.
</para></listitem>
- <listitem><para><emphasis>The <filename>README</filename>
- file:</emphasis>
- A file describing the contents of your new layer.
+ <listitem><para>
+ A <filename>README</filename> file, which is a file
+ describing the contents of your new layer.
</para></listitem>
</itemizedlist>
</para>
<para>
- If you choose to generate a sample recipe file, the script
- prompts you for the name for the recipe and then creates it
- in <filename><replaceable>layer</replaceable>/recipes-example/example/</filename>.
- The script creates a <filename>.bb</filename> file and a
- directory, which contains a sample
- <filename>helloworld.c</filename> source file, along with
- a sample patch file.
- If you do not provide a recipe name, the script uses
- "example".
+ In its simplest form, you can use the following command form
+ to create a layer.
+ The command creates a layer whose name corresponds to
+ <replaceable>your_layer_name</replaceable> in the current
+ directory:
+ <literallayout class='monospaced'>
+ $ bitbake-layers create-layer <replaceable>your_layer_name</replaceable>
+ </literallayout>
</para>
<para>
- If you choose to generate a sample append file, the script
- prompts you for the name for the file and then creates it
- in <filename><replaceable>layer</replaceable>/recipes-example-bbappend/example-bbappend/</filename>.
- The script creates a <filename>.bbappend</filename> file and a
- directory, which contains a sample patch file.
- If you do not provide a recipe name, the script uses
- "example".
- The script also prompts you for the version of the append file.
- The version should match the recipe to which the append file
- is associated.
+ If you want to set the priority of the layer to other than the
+ default value of "6", you can either use the
+ <filename>&dash;&dash;priority</filename> option or you can
+ edit the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
+ value in the <filename>conf/layer.conf</filename> after the
+ script creates it.
+ Furthermore, if you want to give the example recipe file
+ some name other than the default, you can
+ use the
+ <filename>&dash;&dash;example-recipe-name</filename> option.
</para>
<para>
- The easiest way to see how the <filename>yocto-layer</filename>
- script works is to experiment with the script.
+ The easiest way to see how the
+ <filename>bitbake-layers create-layer</filename> command
+ works is to experiment with the script.
You can also read the usage information by entering the
following:
<literallayout class='monospaced'>
- $ yocto-layer help
+ $ bitbake-layers create-layer --help
+ NOTE: Starting bitbake server...
+ usage: bitbake-layers create-layer [-h] [--priority PRIORITY]
+ [--example-recipe-name EXAMPLERECIPE]
+ layerdir
+
+ Create a basic layer
+
+ positional arguments:
+ layerdir Layer directory to create
+
+ optional arguments:
+ -h, --help show this help message and exit
+ --priority PRIORITY, -p PRIORITY
+ Layer directory to create
+ --example-recipe-name EXAMPLERECIPE, -e EXAMPLERECIPE
+ Filename of the example recipe
</literallayout>
</para>
<para>
Once you create your general layer, you must add it to your
<filename>bblayers.conf</filename> file.
+ You can add your layer by using the
+ <filename>bitbake-layers add-layer</filename> command:
+ <literallayout class='monospaced'>
+ $ bitbake-layers add-layer <replaceable>your_layer_name</replaceable>
+ </literallayout>
Here is an example where a layer named
- <filename>meta-mylayer</filename> is added:
+ <filename>meta-scottrif</filename> is added and then the
+ layers are shown using the
+ <filename>bitbake-layers show-layers</filename> command:
<literallayout class='monospaced'>
- BBLAYERS = ?" \
- /usr/local/src/yocto/meta \
- /usr/local/src/yocto/meta-poky \
- /usr/local/src/yocto/meta-yocto-bsp \
- /usr/local/src/yocto/meta-mylayer \
- "
+ $ bitbake-layers add-layer meta-scottrif
+ NOTE: Starting bitbake server...
+ Loading cache: 100% |############################################| Time: 0:00:00
+ Loaded 1275 entries from dependency cache.
+ Parsing recipes: 100% |##########################################| Time: 0:00:00
+ Parsing of 819 .bb files complete (817 cached, 2 parsed). 1276 targets, 44 skipped, 0 masked, 0 errors.
+ $ bitbake-layers show-layers
+ NOTE: Starting bitbake server...
+ layer path priority
+ ==========================================================================
+ meta /home/scottrif/poky/meta 5
+ meta-poky /home/scottrif/poky/meta-poky 5
+ meta-yocto-bsp /home/scottrif/poky/meta-yocto-bsp 5
+ meta-mylayer /home/scottrif/meta-mylayer 6
+ workspace /home/scottrif/poky/build/workspace 99
+ meta-scottrif /home/scottrif/poky/build/meta-scottrif 6
</literallayout>
Adding the layer to this file enables the build system to
locate the layer during the build.
@@ -1193,7 +1215,7 @@
from within a recipe and using
<filename>EXTRA_IMAGE_FEATURES</filename> from within
your <filename>local.conf</filename> file, which is found in the
- <link linkend='build-directory'>Build Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
</para>
<para>
@@ -1496,6 +1518,11 @@
similar in function to the recipe you need.
</para></listitem>
</itemizedlist>
+ <note>
+ For information on recipe syntax, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#recipe-syntax'>Recipe Syntax</ulink>"
+ section in the Yocto Project Reference Manual.
+ </note>
</para>
<section id='new-recipe-creating-the-base-recipe-using-devtool'>
@@ -1516,8 +1543,9 @@
<para>
You can find a complete description of the
<filename>devtool add</filename> command in the
- "<link linkend='use-devtool-to-integrate-new-code'>Use <filename>devtool add</filename> to Add an Application</link>"
- section.
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-a-closer-look-at-devtool-add'>A Closer Look at <filename>devtool</filename> add</ulink>"
+ section in the Yocto Project Application Development
+ and the Extensible Software Development Kit (eSDK) manual.
</para>
</section>
@@ -1540,12 +1568,10 @@
<para>
To run the tool, you just need to be in your
- <link linkend='build-directory'>Build Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
and have sourced the build environment setup script
(i.e.
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>).
Here is the basic <filename>recipetool</filename> syntax:
<note>
Running <filename>recipetool -h</filename> or
@@ -1715,303 +1741,6 @@
</itemizedlist>
</section>
- <section id='understanding-recipe-syntax'>
- <title>Understanding Recipe Syntax</title>
-
- <para>
- Understanding recipe file syntax is important for
- writing recipes.
- The following list overviews the basic items that make up a
- BitBake recipe file.
- For more complete BitBake syntax descriptions, see the
- "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
- chapter of the BitBake User Manual.
- <itemizedlist>
- <listitem><para><emphasis>Variable Assignments and Manipulations:</emphasis>
- Variable assignments allow a value to be assigned to a
- variable.
- The assignment can be static text or might include
- the contents of other variables.
- In addition to the assignment, appending and prepending
- operations are also supported.</para>
- <para>The following example shows some of the ways
- you can use variables in recipes:
- <literallayout class='monospaced'>
- S = "${WORKDIR}/postfix-${PV}"
- CFLAGS += "-DNO_ASM"
- SRC_URI_append = " file://fixup.patch"
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Functions:</emphasis>
- Functions provide a series of actions to be performed.
- You usually use functions to override the default
- implementation of a task function or to complement
- a default function (i.e. append or prepend to an
- existing function).
- Standard functions use <filename>sh</filename> shell
- syntax, although access to OpenEmbedded variables and
- internal methods are also available.</para>
- <para>The following is an example function from the
- <filename>sed</filename> recipe:
- <literallayout class='monospaced'>
- do_install () {
- autotools_do_install
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/sed ${D}${base_bindir}/sed
- rmdir ${D}${bindir}/
- }
- </literallayout>
- It is also possible to implement new functions that
- are called between existing tasks as long as the
- new functions are not replacing or complementing the
- default functions.
- You can implement functions in Python
- instead of shell.
- Both of these options are not seen in the majority of
- recipes.</para></listitem>
- <listitem><para><emphasis>Keywords:</emphasis>
- BitBake recipes use only a few keywords.
- You use keywords to include common
- functions (<filename>inherit</filename>), load parts
- of a recipe from other files
- (<filename>include</filename> and
- <filename>require</filename>) and export variables
- to the environment (<filename>export</filename>).</para>
- <para>The following example shows the use of some of
- these keywords:
- <literallayout class='monospaced'>
- export POSTCONF = "${STAGING_BINDIR}/postconf"
- inherit autoconf
- require otherfile.inc
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Comments:</emphasis>
- Any lines that begin with the hash character
- (<filename>#</filename>) are treated as comment lines
- and are ignored:
- <literallayout class='monospaced'>
- # This is a comment
- </literallayout>
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- This next list summarizes the most important and most commonly
- used parts of the recipe syntax.
- For more information on these parts of the syntax, you can
- reference the
- <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>
- chapter in the BitBake User Manual.
- <itemizedlist>
- <listitem><para><emphasis>Line Continuation: <filename>\</filename></emphasis> -
- Use the backward slash (<filename>\</filename>)
- character to split a statement over multiple lines.
- Place the slash character at the end of the line that
- is to be continued on the next line:
- <literallayout class='monospaced'>
- VAR = "A really long \
- line"
- </literallayout>
- <note>
- You cannot have any characters including spaces
- or tabs after the slash character.
- </note>
- </para></listitem>
- <listitem><para>
- <emphasis>Using Variables: <filename>${...}</filename></emphasis> -
- Use the <filename>${<replaceable>VARNAME</replaceable>}</filename> syntax to
- access the contents of a variable:
- <literallayout class='monospaced'>
- SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz"
- </literallayout>
- <note>
- It is important to understand that the value of a
- variable expressed in this form does not get
- substituted automatically.
- The expansion of these expressions happens
- on-demand later (e.g. usually when a function that
- makes reference to the variable executes).
- This behavior ensures that the values are most
- appropriate for the context in which they are
- finally used.
- On the rare occasion that you do need the variable
- expression to be expanded immediately, you can use
- the <filename>:=</filename> operator instead of
- <filename>=</filename> when you make the
- assignment, but this is not generally needed.
- </note>
- </para></listitem>
- <listitem><para><emphasis>Quote All Assignments: <filename>"<replaceable>value</replaceable>"</filename></emphasis> -
- Use double quotes around the value in all variable
- assignments.
- <literallayout class='monospaced'>
- VAR1 = "${OTHERVAR}"
- VAR2 = "The version is ${PV}"
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Conditional Assignment: <filename>?=</filename></emphasis> -
- Conditional assignment is used to assign a value to
- a variable, but only when the variable is currently
- unset.
- Use the question mark followed by the equal sign
- (<filename>?=</filename>) to make a "soft" assignment
- used for conditional assignment.
- Typically, "soft" assignments are used in the
- <filename>local.conf</filename> file for variables
- that are allowed to come through from the external
- environment.
- </para>
- <para>Here is an example where
- <filename>VAR1</filename> is set to "New value" if
- it is currently empty.
- However, if <filename>VAR1</filename> has already been
- set, it remains unchanged:
- <literallayout class='monospaced'>
- VAR1 ?= "New value"
- </literallayout>
- In this next example, <filename>VAR1</filename>
- is left with the value "Original value":
- <literallayout class='monospaced'>
- VAR1 = "Original value"
- VAR1 ?= "New value"
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Appending: <filename>+=</filename></emphasis> -
- Use the plus character followed by the equals sign
- (<filename>+=</filename>) to append values to existing
- variables.
- <note>
- This operator adds a space between the existing
- content of the variable and the new content.
- </note></para>
- <para>Here is an example:
- <literallayout class='monospaced'>
- SRC_URI += "file://fix-makefile.patch"
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Prepending: <filename>=+</filename></emphasis> -
- Use the equals sign followed by the plus character
- (<filename>=+</filename>) to prepend values to existing
- variables.
- <note>
- This operator adds a space between the new content
- and the existing content of the variable.
- </note></para>
- <para>Here is an example:
- <literallayout class='monospaced'>
- VAR =+ "Starts"
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Appending: <filename>_append</filename></emphasis> -
- Use the <filename>_append</filename> operator to
- append values to existing variables.
- This operator does not add any additional space.
- Also, the operator is applied after all the
- <filename>+=</filename>, and
- <filename>=+</filename> operators have been applied and
- after all <filename>=</filename> assignments have
- occurred.
- </para>
- <para>The following example shows the space being
- explicitly added to the start to ensure the appended
- value is not merged with the existing value:
- <literallayout class='monospaced'>
- SRC_URI_append = " file://fix-makefile.patch"
- </literallayout>
- You can also use the <filename>_append</filename>
- operator with overrides, which results in the actions
- only being performed for the specified target or
- machine:
- <literallayout class='monospaced'>
- SRC_URI_append_sh4 = " file://fix-makefile.patch"
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Prepending: <filename>_prepend</filename></emphasis> -
- Use the <filename>_prepend</filename> operator to
- prepend values to existing variables.
- This operator does not add any additional space.
- Also, the operator is applied after all the
- <filename>+=</filename>, and
- <filename>=+</filename> operators have been applied and
- after all <filename>=</filename> assignments have
- occurred.
- </para>
- <para>The following example shows the space being
- explicitly added to the end to ensure the prepended
- value is not merged with the existing value:
- <literallayout class='monospaced'>
- CFLAGS_prepend = "-I${S}/myincludes "
- </literallayout>
- You can also use the <filename>_prepend</filename>
- operator with overrides, which results in the actions
- only being performed for the specified target or
- machine:
- <literallayout class='monospaced'>
- CFLAGS_prepend_sh4 = "-I${S}/myincludes "
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Overrides:</emphasis> -
- You can use overrides to set a value conditionally,
- typically based on how the recipe is being built.
- For example, to set the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
- variable's value to "standard/base" for any target
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
- except for qemuarm where it should be set to
- "standard/arm-versatile-926ejs", you would do the
- following:
- <literallayout class='monospaced'>
- KBRANCH = "standard/base"
- KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
- </literallayout>
- Overrides are also used to separate alternate values
- of a variable in other situations.
- For example, when setting variables such as
- <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
- and
- <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
- that are specific to individual packages produced by
- a recipe, you should always use an override that
- specifies the name of the package.
- </para></listitem>
- <listitem><para><emphasis>Indentation:</emphasis>
- Use spaces for indentation rather than than tabs.
- For shell functions, both currently work.
- However, it is a policy decision of the Yocto Project
- to use tabs in shell functions.
- Realize that some layers have a policy to use spaces
- for all indentation.
- </para></listitem>
- <listitem><para><emphasis>Using Python for Complex Operations: <filename>${@<replaceable>python_code</replaceable>}</filename></emphasis> -
- For more advanced processing, it is possible to use
- Python code during variable assignments (e.g.
- search and replacement on a variable).</para>
- <para>You indicate Python code using the
- <filename>${@<replaceable>python_code</replaceable>}</filename>
- syntax for the variable assignment:
- <literallayout class='monospaced'>
- SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Shell Function Syntax:</emphasis>
- Write shell functions as if you were writing a shell
- script when you describe a list of actions to take.
- You should ensure that your script works with a generic
- <filename>sh</filename> and that it does not require
- any <filename>bash</filename> or other shell-specific
- functionality.
- The same considerations apply to various system
- utilities (e.g. <filename>sed</filename>,
- <filename>grep</filename>, <filename>awk</filename>,
- and so forth) that you might wish to use.
- If in doubt, you should check with multiple
- implementations - including those from BusyBox.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
-
<section id='new-recipe-running-a-build-on-the-recipe'>
<title>Running a Build on the Recipe</title>
@@ -2023,12 +1752,10 @@
</para>
<para>
- Assuming you have sourced a build environment setup script (i.e.
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
+ Assuming you have sourced the build environment setup script (i.e.
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
and you are in the
- <link linkend='build-directory'>Build Directory</link>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
use BitBake to process your recipe.
All you need to provide is the
<filename><replaceable>basename</replaceable></filename> of the recipe as described
@@ -2083,8 +1810,8 @@
</para>
<para>
- You can find more information about the build process in the
- "<ulink url='&YOCTO_DOCS_REF_URL;#closer-look'>A Closer Look at the Yocto Project Development Environment</ulink>"
+ You can find more information about the build process in
+ "<ulink url='&YOCTO_DOCS_REF_URL;#ref-development-environment'>The Yocto Project Development Environment</ulink>"
chapter of the Yocto Project Reference Manual.
</para>
</section>
@@ -3074,7 +2801,7 @@
class.
See the <filename>systemd.bbclass</filename> file
located in your
- <link linkend='source-directory'>Source Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
section for more information.
</para></listitem>
</itemizedlist>
@@ -3967,6 +3694,417 @@
</section>
</section>
+ <section id='finding-the-temporary-source-code'>
+ <title>Finding Temporary Source Code</title>
+
+ <para>
+ You might find it helpful during development to modify the
+ temporary source code used by recipes to build packages.
+ For example, suppose you are developing a patch and you need to
+ experiment a bit to figure out your solution.
+ After you have initially built the package, you can iteratively
+ tweak the source code, which is located in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+ and then you can force a re-compile and quickly test your altered
+ code.
+ Once you settle on a solution, you can then preserve your changes
+ in the form of patches.
+ </para>
+
+ <para>
+ During a build, the unpacked temporary source code used by recipes
+ to build packages is available in the Build Directory as
+ defined by the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
+ variable.
+ Below is the default value for the <filename>S</filename> variable
+ as defined in the
+ <filename>meta/conf/bitbake.conf</filename> configuration file
+ in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>:
+ <literallayout class='monospaced'>
+ S = "${WORKDIR}/${BP}"
+ </literallayout>
+ You should be aware that many recipes override the
+ <filename>S</filename> variable.
+ For example, recipes that fetch their source from Git usually set
+ <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
+ <note>
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
+ represents the base recipe name, which consists of the name
+ and version:
+ <literallayout class='monospaced'>
+ BP = "${BPN}-${PV}"
+ </literallayout>
+ </note>
+ </para>
+
+ <para>
+ The path to the work directory for the recipe
+ (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>)
+ is defined as follows:
+ <literallayout class='monospaced'>
+ ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
+ </literallayout>
+ The actual directory depends on several things:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
+ The top-level build output directory.
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>:
+ The target system identifier.
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
+ The recipe name.
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTENDPE'><filename>EXTENDPE</filename></ulink>:
+ The epoch - (if
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>
+ is not specified, which is usually the case for most
+ recipes, then <filename>EXTENDPE</filename> is blank).
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
+ The recipe version.
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
+ The recipe revision.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ As an example, assume a Source Directory top-level folder
+ named <filename>poky</filename>, a default Build Directory at
+ <filename>poky/build</filename>, and a
+ <filename>qemux86-poky-linux</filename> machine target
+ system.
+ Furthermore, suppose your recipe is named
+ <filename>foo_1.3.0.bb</filename>.
+ In this case, the work directory the build system uses to
+ build the package would be as follows:
+ <literallayout class='monospaced'>
+ poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
+ </literallayout>
+ </para>
+ </section>
+
+ <section id="using-a-quilt-workflow">
+ <title>Using Quilt in Your Workflow</title>
+
+ <para>
+ <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
+ is a powerful tool that allows you to capture source code changes
+ without having a clean source tree.
+ This section outlines the typical workflow you can use to modify
+ source code, test changes, and then preserve the changes in the
+ form of a patch all using Quilt.
+ <note><title>Tip</title>
+ With regard to preserving changes to source files, if you
+ clean a recipe or have <filename>rm_work</filename> enabled,
+ the
+ <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
+ as described in the Yocto Project Application Development
+ and the Extensible Software Development Kit (eSDK) manual
+ is a safer development flow than the flow that uses Quilt.
+ </note>
+ </para>
+
+ <para>
+ Follow these general steps:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Find the Source Code:</emphasis>
+ Temporary source code used by the OpenEmbedded build system
+ is kept in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+ See the
+ "<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>"
+ section to learn how to locate the directory that has the
+ temporary source code for a particular package.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Change Your Working Directory:</emphasis>
+ You need to be in the directory that has the temporary
+ source code.
+ That directory is defined by the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
+ variable.</para></listitem>
+ <listitem><para>
+ <emphasis>Create a New Patch:</emphasis>
+ Before modifying source code, you need to create a new
+ patch.
+ To create a new patch file, use
+ <filename>quilt new</filename> as below:
+ <literallayout class='monospaced'>
+ $ quilt new my_changes.patch
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Notify Quilt and Add Files:</emphasis>
+ After creating the patch, you need to notify Quilt about
+ the files you plan to edit.
+ You notify Quilt by adding the files to the patch you
+ just created:
+ <literallayout class='monospaced'>
+ $ quilt add file1.c file2.c file3.c
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Edit the Files:</emphasis>
+ Make your changes in the source code to the files you added
+ to the patch.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Test Your Changes:</emphasis>
+ Once you have modified the source code, the easiest way to
+ test your changes is by calling the
+ <filename>do_compile</filename> task as shown in the
+ following example:
+ <literallayout class='monospaced'>
+ $ bitbake -c compile -f <replaceable>package</replaceable>
+ </literallayout>
+ The <filename>-f</filename> or <filename>--force</filename>
+ option forces the specified task to execute.
+ If you find problems with your code, you can just keep
+ editing and re-testing iteratively until things work
+ as expected.
+ <note>
+ All the modifications you make to the temporary
+ source code disappear once you run the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-clean'><filename>do_clean</filename></ulink>
+ or
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>
+ tasks using BitBake (i.e.
+ <filename>bitbake -c clean <replaceable>package</replaceable></filename>
+ and
+ <filename>bitbake -c cleanall <replaceable>package</replaceable></filename>).
+ Modifications will also disappear if you use the
+ <filename>rm_work</filename> feature as described
+ in the
+ "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
+ section of the Yocto Project Quick Start.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Generate the Patch:</emphasis>
+ Once your changes work as expected, you need to use Quilt
+ to generate the final patch that contains all your
+ modifications.
+ <literallayout class='monospaced'>
+ $ quilt refresh
+ </literallayout>
+ At this point, the <filename>my_changes.patch</filename>
+ file has all your edits made to the
+ <filename>file1.c</filename>, <filename>file2.c</filename>,
+ and <filename>file3.c</filename> files.</para>
+
+ <para>You can find the resulting patch file in the
+ <filename>patches/</filename> subdirectory of the source
+ (<filename>S</filename>) directory.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Copy the Patch File:</emphasis>
+ For simplicity, copy the patch file into a directory
+ named <filename>files</filename>, which you can create
+ in the same directory that holds the recipe
+ (<filename>.bb</filename>) file or the append
+ (<filename>.bbappend</filename>) file.
+ Placing the patch here guarantees that the OpenEmbedded
+ build system will find the patch.
+ Next, add the patch into the
+ <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
+ of the recipe.
+ Here is an example:
+ <literallayout class='monospaced'>
+ SRC_URI += "file://my_changes.patch"
+ </literallayout>
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id="platdev-appdev-devshell">
+ <title>Using a Development Shell</title>
+
+ <para>
+ When debugging certain commands or even when just editing packages,
+ <filename>devshell</filename> can be a useful tool.
+ When you invoke <filename>devshell</filename>, all tasks up to and
+ including
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
+ are run for the specified target.
+ Then, a new terminal is opened and you are placed in
+ <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>,
+ the source directory.
+ In the new terminal, all the OpenEmbedded build-related environment variables are
+ still defined so you can use commands such as <filename>configure</filename> and
+ <filename>make</filename>.
+ The commands execute just as if the OpenEmbedded build system were executing them.
+ Consequently, working this way can be helpful when debugging a build or preparing
+ software to be used with the OpenEmbedded build system.
+ </para>
+
+ <para>
+ Following is an example that uses <filename>devshell</filename> on a target named
+ <filename>matchbox-desktop</filename>:
+ <literallayout class='monospaced'>
+ $ bitbake matchbox-desktop -c devshell
+ </literallayout>
+ </para>
+
+ <para>
+ This command spawns a terminal with a shell prompt within the OpenEmbedded build environment.
+ The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
+ variable controls what type of shell is opened.
+ </para>
+
+ <para>
+ For spawned terminals, the following occurs:
+ <itemizedlist>
+ <listitem><para>The <filename>PATH</filename> variable includes the
+ cross-toolchain.</para></listitem>
+ <listitem><para>The <filename>pkgconfig</filename> variables find the correct
+ <filename>.pc</filename> files.</para></listitem>
+ <listitem><para>The <filename>configure</filename> command finds the
+ Yocto Project site files as well as any other necessary files.</para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Within this environment, you can run configure or compile
+ commands as if they were being run by
+ the OpenEmbedded build system itself.
+ As noted earlier, the working directory also automatically changes to the
+ Source Directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
+ </para>
+
+ <para>
+ To manually run a specific task using <filename>devshell</filename>,
+ run the corresponding <filename>run.*</filename> script in
+ the
+ <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/temp</filename>
+ directory (e.g.,
+ <filename>run.do_configure.</filename><replaceable>pid</replaceable>).
+ If a task's script does not exist, which would be the case if the task was
+ skipped by way of the sstate cache, you can create the task by first running
+ it outside of the <filename>devshell</filename>:
+ <literallayout class='monospaced'>
+ $ bitbake -c <replaceable>task</replaceable>
+ </literallayout>
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>Execution of a task's <filename>run.*</filename>
+ script and BitBake's execution of a task are identical.
+ In other words, running the script re-runs the task
+ just as it would be run using the
+ <filename>bitbake -c</filename> command.
+ </para></listitem>
+ <listitem><para>Any <filename>run.*</filename> file that does not
+ have a <filename>.pid</filename> extension is a
+ symbolic link (symlink) to the most recent version of that
+ file.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
+
+ <para>
+ Remember, that the <filename>devshell</filename> is a mechanism that allows
+ you to get into the BitBake task execution environment.
+ And as such, all commands must be called just as BitBake would call them.
+ That means you need to provide the appropriate options for
+ cross-compilation and so forth as applicable.
+ </para>
+
+ <para>
+ When you are finished using <filename>devshell</filename>, exit the shell
+ or close the terminal window.
+ </para>
+
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ It is worth remembering that when using <filename>devshell</filename>
+ you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
+ instead of just using <filename>gcc</filename>.
+ The same applies to other applications such as <filename>binutils</filename>,
+ <filename>libtool</filename> and so forth.
+ BitBake sets up environment variables such as <filename>CC</filename>
+ to assist applications, such as <filename>make</filename> to find the correct tools.
+ </para></listitem>
+ <listitem><para>
+ It is also worth noting that <filename>devshell</filename> still works over
+ X11 forwarding and similar situations.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </section>
+
+ <section id="platdev-appdev-devpyshell">
+ <title>Using a Development Python Shell</title>
+
+ <para>
+ Similar to working within a development shell as described in
+ the previous section, you can also spawn and work within an
+ interactive Python development shell.
+ When debugging certain commands or even when just editing packages,
+ <filename>devpyshell</filename> can be a useful tool.
+ When you invoke <filename>devpyshell</filename>, all tasks up to and
+ including
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
+ are run for the specified target.
+ Then a new terminal is opened.
+ Additionally, key Python objects and code are available in the same
+ way they are to BitBake tasks, in particular, the data store 'd'.
+ So, commands such as the following are useful when exploring the data
+ store and running functions:
+ <literallayout class='monospaced'>
+ pydevshell> d.getVar("STAGING_DIR", True)
+ '/media/build1/poky/build/tmp/sysroots'
+ pydevshell> d.getVar("STAGING_DIR", False)
+ '${TMPDIR}/sysroots'
+ pydevshell> d.setVar("FOO", "bar")
+ pydevshell> d.getVar("FOO", True)
+ 'bar'
+ pydevshell> d.delVar("FOO")
+ pydevshell> d.getVar("FOO", True)
+ pydevshell> bb.build.exec_func("do_unpack", d)
+ pydevshell>
+ </literallayout>
+ The commands execute just as if the OpenEmbedded build system were executing them.
+ Consequently, working this way can be helpful when debugging a build or preparing
+ software to be used with the OpenEmbedded build system.
+ </para>
+
+ <para>
+ Following is an example that uses <filename>devpyshell</filename> on a target named
+ <filename>matchbox-desktop</filename>:
+ <literallayout class='monospaced'>
+ $ bitbake matchbox-desktop -c devpyshell
+ </literallayout>
+ </para>
+
+ <para>
+ This command spawns a terminal and places you in an interactive
+ Python interpreter within the OpenEmbedded build environment.
+ The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
+ variable controls what type of shell is opened.
+ </para>
+
+ <para>
+ When you are finished using <filename>devpyshell</filename>, you
+ can exit the shell either by using Ctrl+d or closing the terminal
+ window.
+ </para>
+ </section>
+
<section id='platdev-building-targets-with-multiple-configurations'>
<title>Building Targets with Multiple Configurations</title>
@@ -4177,7 +4315,7 @@
<para>
Several examples exist in the
<filename>meta-skeleton</filename> layer found in the
- <link linkend='source-directory'>Source Directory</link>:
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>:
<itemizedlist>
<listitem><para><filename>conf/multilib-example.conf</filename>
configuration file</para></listitem>
@@ -4203,7 +4341,7 @@
Many standard recipes are already extended and support multiple libraries.
You can check in the <filename>meta/conf/multilib.conf</filename>
configuration file in the
- <link linkend='source-directory'>Source Directory</link> to see how this is
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> to see how this is
done using the
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink>
variable.
@@ -4239,7 +4377,7 @@
combination of multiple libraries you want to build.
You accomplish this through your <filename>local.conf</filename>
configuration file in the
- <link linkend='build-directory'>Build Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
An example configuration would be as follows:
<literallayout class='monospaced'>
MACHINE = "qemux86-64"
@@ -4315,7 +4453,7 @@
<listitem><para>A unique architecture is defined for the Multilib packages,
along with creating a unique deploy folder under
<filename>tmp/deploy/rpm</filename> in the
- <link linkend='build-directory'>Build Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
For example, consider <filename>lib32</filename> in a
<filename>qemux86-64</filename> image.
The possible architectures in the system are "all", "qemux86_64",
@@ -4675,8 +4813,8 @@
</para>
</section>
- <section id='creating-partitioned-images'>
- <title>Creating Partitioned Images</title>
+ <section id='creating-partitioned-images-using-wic'>
+ <title>Creating Partitioned Images Using Wic</title>
<para>
Creating an image for a particular hardware target using the
@@ -4692,1124 +4830,781 @@
</para>
<para>
- You can generate partitioned images
- (<replaceable>image</replaceable><filename>.wic</filename>)
- two ways: using the OpenEmbedded build system and by running
- the OpenEmbedded Image Creator Wic directly.
- The former way is preferable as it is easier to use and understand.
+ The <filename>wic</filename> command generates partitioned
+ images from existing OpenEmbedded build artifacts.
+ Image generation is driven by partitioning commands
+ contained in an Openembedded kickstart file
+ (<filename>.wks</filename>) specified either directly on
+ the command line or as one of a selection of canned
+ kickstart files as shown with the
+ <filename>wic list images</filename> command in the
+ "<link linkend='using-a-provided-kickstart-file'>Using an Existing Kickstart File</link>"
+ section.
+ When you apply the command to a given set of build
+ artifacts, the result is an image or set of images that
+ can be directly written onto media and used on a particular
+ system.
+ <note>
+ For a kickstart file reference, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#openembedded-kickstart-wks-reference'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</ulink>"
+ Chapter in the Yocto Project Reference Manual.
+ </note>
</para>
- <section id='creating-wic-images-oe'>
- <title>Creating Partitioned Images</title>
+ <para>
+ The <filename>wic</filename> command and the infrastructure
+ it is based on is by definition incomplete.
+ The purpose of the command is to allow the generation of
+ customized images, and as such, was designed to be
+ completely extensible through a plug-in interface.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#wic-plug-ins-interface'>Wic Plug-Ins Interface</ulink>"
+ section in the Yocto Project Reference Manual for information
+ on these plug-ins.
+ </para>
+
+ <para>
+ This section provides some background information on Wic,
+ describes what you need to have in
+ place to run the tool, provides instruction on how to use
+ the Wic utility, and provides several examples.
+ </para>
+
+ <section id='wic-background'>
+ <title>Background</title>
<para>
- The OpenEmbedded build system can generate
- partitioned images the same way as it generates
- any other image type.
- To generate a partitioned image, you need to modify
- two variables.
+ This section provides some background on the Wic utility.
+ While none of this information is required to use
+ Wic, you might find it interesting.
<itemizedlist>
<listitem><para>
+ The name "Wic" is derived from OpenEmbedded
+ Image Creator (oeic).
+ The "oe" diphthong in "oeic" was promoted to the
+ letter "w", because "oeic" is both difficult to
+ remember and to pronounce.
+ </para></listitem>
+ <listitem><para>
+ Wic is loosely based on the
+ Meego Image Creator (<filename>mic</filename>)
+ framework.
+ The Wic implementation has been
+ heavily modified to make direct use of OpenEmbedded
+ build artifacts instead of package installation and
+ configuration, which are already incorporated within
+ the OpenEmbedded artifacts.
+ </para></listitem>
+ <listitem><para>
+ Wic is a completely independent
+ standalone utility that initially provides
+ easier-to-use and more flexible replacements for an
+ existing functionality in OE Core's
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image-live'><filename>image-live</filename></ulink>
+ class and <filename>mkefidisk.sh</filename> script.
+ The difference between
+ Wic and those examples is
+ that with Wic the
+ functionality of those scripts is implemented
+ by a general-purpose partitioning language, which is
+ based on Redhat kickstart syntax.</para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='wic-requirements'>
+ <title>Requirements</title>
+
+ <para>
+ In order to use the Wic utility with the OpenEmbedded Build
+ system, your system needs to meet the following
+ requirements:
+ <itemizedlist>
+ <listitem><para>
+ The Linux distribution on your development host must
+ support the Yocto Project.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+ section in the Yocto Project Reference Manual for
+ the list of distributions that support the
+ Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ The standard system utilities, such as
+ <filename>cp</filename>, must be installed on your
+ development host system.
+ </para></listitem>
+ <listitem><para>
+ You must have sourced the build environment
+ setup script (i.e.
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
+ found in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+ </para></listitem>
+ <listitem><para>
+ You need to have the build artifacts already
+ available, which typically means that you must
+ have already created an image using the
+ Openembedded build system (e.g.
+ <filename>core-image-minimal</filename>).
+ While it might seem redundant to generate an image
+ in order to create an image using
+ Wic, the current version of
+ Wic requires the artifacts
+ in the form generated by the OpenEmbedded build
+ system.
+ </para></listitem>
+ <listitem><para>
+ You must build several native tools, which are
+ built to run on the build system:
+ <literallayout class='monospaced'>
+ $ bitbake parted-native dosfstools-native mtools-native
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
Include "wic" as part of the
<ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
variable.
</para></listitem>
<listitem><para>
Include the name of the
- <link linkend='openembedded-kickstart-wks-reference'>wic kickstart file</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#openembedded-kickstart-wks-reference'>wic kickstart file</ulink>
as part of the
<ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE'><filename>WKS_FILE</filename></ulink>
variable
</para></listitem>
</itemizedlist>
- Further steps to generate a partitioned image
- are the same as for any other image type.
- For information on image types, see the
- "<link linkend='building-images'>Building Images</link>"
- section.
</para>
</section>
- <section id='create-wic-images-wic'>
- <title>Using OpenEmbedded Image Creator Wic to Generate Partitioned Images</title>
+ <section id='wic-getting-help'>
+ <title>Getting Help</title>
<para>
- The <filename>wic</filename> command generates partitioned
- images from existing OpenEmbedded build artifacts.
- Image generation is driven by partitioning commands
- contained in an Openembedded kickstart file
- (<filename>.wks</filename>) specified either directly on
- the command line or as one of a selection of canned
- <filename>.wks</filename> files as shown with the
- <filename>wic list images</filename> command in the
- "<link linkend='using-a-provided-kickstart-file'>Using an Existing Kickstart File</link>"
- section.
- When you apply the command to a given set of build
- artifacts, the result is an image or set of images that
- can be directly written onto media and used on a particular
- system.
+ You can get general help for the <filename>wic</filename>
+ command by entering the <filename>wic</filename> command
+ by itself or by entering the command with a help argument
+ as follows:
+ <literallayout class='monospaced'>
+ $ wic -h
+ $ wic --help
+ </literallayout>
</para>
<para>
- The <filename>wic</filename> command and the infrastructure
- it is based on is by definition incomplete.
- The purpose of the command is to allow the generation of
- customized images, and as such, was designed to be
- completely extensible through a plug-in interface.
- See the
- "<link linkend='openembedded-kickstart-plugins'>Plug-ins</link>"
- section for information on these plug-ins.
+ Currently, Wic supports seven commands:
+ <filename>cp</filename>, <filename>create</filename>,
+ <filename>help</filename>, <filename>list</filename>,
+ <filename>ls</filename>, <filename>rm</filename>, and
+ <filename>write</filename>.
+ You can get help for these commands as follows with
+ <replaceable>command</replaceable> being one of the
+ supported commands:
+ <literallayout class='monospaced'>
+ $ wic help <replaceable>command</replaceable>
+ </literallayout>
</para>
<para>
- This section provides some background information on Wic,
- describes what you need to have in
- place to run the tool, provides instruction on how to use
- the <filename>wic</filename> utility,
- and provides several examples.
+ You can also get detailed help on a number of topics
+ from the help system.
+ The output of <filename>wic --help</filename>
+ displays a list of available help
+ topics under a "Help topics" heading.
+ You can have the help system display the help text for
+ a given topic by prefacing the topic with
+ <filename>wic help</filename>:
+ <literallayout class='monospaced'>
+ $ wic help <replaceable>help_topic</replaceable>
+ </literallayout>
</para>
- <section id='wic-background'>
- <title>Background</title>
+ <para>
+ You can find out more about the images Wic creates using
+ the existing kickstart files with the following form of
+ the command:
+ <literallayout class='monospaced'>
+ $ wic list <replaceable>image</replaceable> help
+ </literallayout>
+ For <replaceable>image</replaceable>, you can provide
+ any of the following:
+ <literallayout class='monospaced'>
+ beaglebone
+ mpc8315e-rdb
+ genericx86
+ edgerouter
+ qemux86-directdisk
+ directdisk-gpt
+ mkefidisk
+ directdisk
+ systemd-bootdisk
+ mkhybridiso
+ sdimage-bootpart
+ directdisk-multi-rootfs
+ directdisk-bootloader-config
+ </literallayout>
+ </para>
+ </section>
- <para>
- This section provides some background on the
- <filename>wic</filename> utility.
- While none of this information is required to use
- Wic, you might find it interesting.
- <itemizedlist>
- <listitem><para>
- The name "Wic" is derived from OpenEmbedded
- Image Creator (oeic).
- The "oe" diphthong in "oeic" was promoted to the
- letter "w", because "oeic" is both difficult to
- remember and to pronounce.
- </para></listitem>
- <listitem><para>
- Wic is loosely based on the
- Meego Image Creator (<filename>mic</filename>)
- framework.
- The Wic implementation has been
- heavily modified to make direct use of OpenEmbedded
- build artifacts instead of package installation and
- configuration, which are already incorporated within
- the OpenEmbedded artifacts.
- </para></listitem>
- <listitem><para>
- Wic is a completely independent
- standalone utility that initially provides
- easier-to-use and more flexible replacements for an
- existing functionality in OE Core's
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image-live'><filename>image-live</filename></ulink>
- class and <filename>mkefidisk.sh</filename> script.
- The difference between
- Wic and those examples is
- that with Wic the
- functionality of those scripts is implemented
- by a general-purpose partitioning language, which is
- based on Redhat kickstart syntax.</para></listitem>
- </itemizedlist>
- </para>
- </section>
+ <section id='operational-modes'>
+ <title>Operational Modes</title>
- <section id='wic-requirements'>
- <title>Requirements</title>
+ <para>
+ You can use Wic in two different
+ modes, depending on how much control you need for
+ specifying the Openembedded build artifacts that are
+ used for creating the image: Raw and Cooked:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Raw Mode:</emphasis>
+ You explicitly specify build artifacts through
+ <filename>wic</filename> command-line arguments.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Cooked Mode:</emphasis>
+ The current
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ setting and image name are used to automatically
+ locate and provide the build artifacts.
+ You just supply a kickstart file and the name
+ of the image from which to use artifacts.
+ </para></listitem>
+ </itemizedlist>
+ </para>
- <para>
- In order to use the <filename>wic</filename> utility
- with the OpenEmbedded Build system, your system needs
- to meet the following requirements:
- <itemizedlist>
- <listitem><para>The Linux distribution on your
- development host must support the Yocto Project.
- See the
- "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
- section in the Yocto Project Reference Manual for
- the list of distributions that support the
- Yocto Project.
- </para></listitem>
- <listitem><para>
- The standard system utilities, such as
- <filename>cp</filename>, must be installed on your
- development host system.
- </para></listitem>
- <listitem><para>
- You need to have the build artifacts already
- available, which typically means that you must
- have already created an image using the
- Openembedded build system (e.g.
- <filename>core-image-minimal</filename>).
- While it might seem redundant to generate an image
- in order to create an image using
- Wic, the current version of
- Wic requires the artifacts
- in the form generated by the build system.
- </para></listitem>
- <listitem><para>
- You must build several native tools, which are tools
- built to run on the build system:
- <literallayout class='monospaced'>
- $ bitbake parted-native dosfstools-native mtools-native
- </literallayout>
- </para></listitem>
- <listitem><para>
- You must have sourced one of the build environment
- setup scripts (i.e.
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
- found in the
- <link linkend='build-directory'>Build Directory</link>.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
+ <para>
+ Regardless of the mode you use, you need to have the build
+ artifacts ready and available.
+ </para>
- <section id='wic-getting-help'>
- <title>Getting Help</title>
+ <section id='raw-mode'>
+ <title>Raw Mode</title>
<para>
- You can get general help for the <filename>wic</filename>
- command by entering the <filename>wic</filename> command
- by itself or by entering the command with a help argument
- as follows:
- <literallayout class='monospaced'>
- $ wic -h
- $ wic --help
- </literallayout>
+ Running Wic in raw mode allows you to specify all the
+ partitions through the <filename>wic</filename>
+ command line.
+ The primary use for raw mode is if you have built
+ your kernel outside of the Yocto Project
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+ In other words, you can point to arbitrary kernel,
+ root filesystem locations, and so forth.
+ Contrast this behavior with cooked mode where Wic
+ looks in the Build Directory (e.g.
+ <filename>tmp/deploy/images/</filename><replaceable>machine</replaceable>).
</para>
<para>
- Currently, Wic supports two commands:
- <filename>create</filename> and <filename>list</filename>.
- You can get help for these commands as follows:
+ The general form of the
+ <filename>wic</filename> command in raw mode is:
<literallayout class='monospaced'>
- $ wic help <replaceable>command</replaceable>
- with <replaceable>command</replaceable> being either
- <filename>create</filename> or <filename>list</filename>.
- </literallayout>
- </para>
+ $ wic create <replaceable>wks_file</replaceable> <replaceable>options</replaceable> ...
- <para>
- You can also get detailed help on a number of topics
- from the help system.
- The output of <filename>wic --help</filename>
- displays a list of available help
- topics under a "Help topics" heading.
- You can have the help system display the help text for
- a given topic by prefacing the topic with
- <filename>wic help</filename>:
- <literallayout class='monospaced'>
- $ wic help <replaceable>help_topic</replaceable>
- </literallayout>
- </para>
+ Where:
- <para>
- You can find out more about the images
- Wic creates using the existing
- kickstart files with the following form of the command:
- <literallayout class='monospaced'>
- $ wic list <replaceable>image</replaceable> help
+ <replaceable>wks_file</replaceable>:
+ An OpenEmbedded kickstart file. You can provide
+ your own custom file or use a file from a set of
+ existing files as described by further options.
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -o <replaceable>OUTDIR</replaceable>, --outdir <replaceable>OUTDIR</replaceable>
+ name of directory to create image in
+ -e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
+ name of the image to use the artifacts from e.g. core-
+ image-sato
+ -r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir <replaceable>ROOTFS_DIR</replaceable>
+ path to the /rootfs dir to use as the .wks rootfs
+ source
+ -b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir <replaceable>BOOTIMG_DIR</replaceable>
+ path to the dir containing the boot artifacts (e.g.
+ /EFI or /syslinux dirs) to use as the .wks bootimg
+ source
+ -k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir <replaceable>KERNEL_DIR</replaceable>
+ path to the dir containing the kernel to use in the
+ .wks bootimg
+ -n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot <replaceable>NATIVE_SYSROOT</replaceable>
+ path to the native sysroot containing the tools to use
+ to build the image
+ -s, --skip-build-check
+ skip the build check
+ -f, --build-rootfs build rootfs
+ -c {gzip,bzip2,xz}, --compress-with {gzip,bzip2,xz}
+ compress image with specified compressor
+ -m, --bmap generate .bmap
+ --no-fstab-update Do not change fstab file.
+ -v <replaceable>VARS_DIR</replaceable>, --vars <replaceable>VARS_DIR</replaceable>
+ directory with &lt;image&gt;.env files that store bitbake
+ variables
+ -D, --debug output debug information
</literallayout>
- with <filename><replaceable>image</replaceable></filename>
- being either <filename>directdisk</filename> or
- <filename>mkefidisk</filename>.
+ <note>
+ You do not need root privileges to run
+ Wic.
+ In fact, you should not run as root when using the
+ utility.
+ </note>
</para>
</section>
- <section id='operational-modes'>
- <title>Operational Modes</title>
+ <section id='cooked-mode'>
+ <title>Cooked Mode</title>
<para>
- You can use Wic in two different
- modes, depending on how much control you need for
- specifying the Openembedded build artifacts that are
- used for creating the image: Raw and Cooked:
- <itemizedlist>
- <listitem><para>
- <emphasis>Raw Mode:</emphasis>
- You explicitly specify build artifacts through
- command-line arguments.
- </para></listitem>
- <listitem><para>
- <emphasis>Cooked Mode:</emphasis>
- The current
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- setting and image name are used to automatically
- locate and provide the build artifacts.
- </para></listitem>
- </itemizedlist>
+ Running Wic in cooked mode leverages off artifacts in
+ Build Directory.
+ In other words, you do not have to specify kernel or
+ root filesystem locations as part of the command.
+ All you need to provide is a kickstart file and the
+ name of the image from which to use artifacts by using
+ the "-e" option.
+ Wic looks in the Build Directory (e.g.
+ <filename>tmp/deploy/images/</filename><replaceable>machine</replaceable>)
+ for artifacts.
</para>
<para>
- Regardless of the mode you use, you need to have the build
- artifacts ready and available.
- Additionally, the environment must be set up using the
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
- script found in the
- <link linkend='build-directory'>Build Directory</link>.
- </para>
-
- <section id='raw-mode'>
- <title>Raw Mode</title>
-
- <para>
- The general form of the
- <filename>wic</filename> command in raw mode is:
- <literallayout class='monospaced'>
- $ wic create <replaceable>image_name</replaceable>.wks [<replaceable>options</replaceable>] [...]
+ The general form of the <filename>wic</filename>
+ command using Cooked Mode is as follows:
+ <literallayout class='monospaced'>
+ $ wic create <replaceable>wks_file</replaceable> -e <replaceable>IMAGE_NAME</replaceable>
Where:
- <replaceable>image_name</replaceable>.wks
+ <replaceable>wks_file</replaceable>:
An OpenEmbedded kickstart file. You can provide
your own custom file or use a file from a set of
- existing files as described by further options.
-
- -o <replaceable>OUTDIR</replaceable>, --outdir=<replaceable>OUTDIR</replaceable>
- The name of a directory in which to create image.
-
- -i <replaceable>PROPERTIES_FILE</replaceable>, --infile=<replaceable>PROPERTIES_FILE</replaceable>
- The name of a file containing the values for image
- properties as a JSON file.
-
- -e <replaceable>IMAGE_NAME</replaceable>, --image-name=<replaceable>IMAGE_NAME</replaceable>
- The name of the image from which to use the artifacts
- (e.g. <filename>core-image-sato</filename>).
-
- -r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir=<replaceable>ROOTFS_DIR</replaceable>
- The path to the <filename>/rootfs</filename> directory to use as the
- <filename>.wks</filename> rootfs source.
-
- -b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir=<replaceable>BOOTIMG_DIR</replaceable>
- The path to the directory containing the boot artifacts
- (e.g. <filename>/EFI</filename> or <filename>/syslinux</filename>) to use as the <filename>.wks</filename> bootimg
- source.
-
- -k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir=<replaceable>KERNEL_DIR</replaceable>
- The path to the directory containing the kernel to use
- in the <filename>.wks</filename> boot image.
+ existing files provided with the Yocto Project
+ release.
- -n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot=<replaceable>NATIVE_SYSROOT</replaceable>
- The path to the native sysroot containing the tools to use
- to build the image.
-
- -s, --skip-build-check
- Skips the build check.
-
- -D, --debug
- Output debug information.
- </literallayout>
- <note>
- You do not need root privileges to run
- Wic.
- In fact, you should not run as root when using the
- utility.
- </note>
- </para>
- </section>
-
- <section id='cooked-mode'>
- <title>Cooked Mode</title>
-
- <para>
- The general form of the <filename>wic</filename> command
- using Cooked Mode is:
- <literallayout class='monospaced'>
- $ wic create <replaceable>kickstart_file</replaceable> -e <replaceable>image_name</replaceable>
-
- Where:
-
- <replaceable>kickstart_file</replaceable>
- An OpenEmbedded kickstart file. You can provide your own
- custom file or a supplied file.
-
- <replaceable>image_name</replaceable>
- Specifies the image built using the OpenEmbedded build
- system.
- </literallayout>
- This form is the simplest and most user-friendly, as it
- does not require specifying all individual parameters.
- All you need to provide is your own
- <filename>.wks</filename> file or one provided with the
- release.
- </para>
- </section>
+ required argument:
+ -e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
+ name of the image to use the artifacts from e.g. core-
+ image-sato
+ </literallayout>
+ </para>
</section>
+ </section>
- <section id='using-a-provided-kickstart-file'>
- <title>Using an Existing Kickstart File</title>
+ <section id='using-a-provided-kickstart-file'>
+ <title>Using an Existing Kickstart File</title>
- <para>
- If you do not want to create your own
- <filename>.wks</filename> file, you can use an existing
- file provided by the Wic installation.
- Use the following command to list the available files:
- <literallayout class='monospaced'>
+ <para>
+ If you do not want to create your own kickstart file, you
+ can use an existing file provided by the Wic installation.
+ As shipped, kickstart files can be found in the
+ Yocto Project
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ in the following two locations:
+ <literallayout class='monospaced'>
+ poky/meta-yocto-bsp/wic
+ poky/scripts/lib/wic/canned-wks
+ </literallayout>
+ Use the following command to list the available kickstart
+ files:
+ <literallayout class='monospaced'>
$ wic list images
- directdisk Create a 'pcbios' direct disk image
- mkefidisk Create an EFI disk image
- </literallayout>
- When you use an existing file, you do not have to use the
- <filename>.wks</filename> extension.
- Here is an example in Raw Mode that uses the
- <filename>directdisk</filename> file:
- <literallayout class='monospaced'>
+ beaglebone Create SD card image for Beaglebone
+ mpc8315e-rdb Create SD card image for MPC8315E-RDB
+ genericx86 Create an EFI disk image for genericx86*
+ edgerouter Create SD card image for Edgerouter
+ qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
+ directdisk-gpt Create a 'pcbios' direct disk image
+ mkefidisk Create an EFI disk image
+ directdisk Create a 'pcbios' direct disk image
+ systemd-bootdisk Create an EFI disk image with systemd-boot
+ mkhybridiso Create a hybrid ISO image
+ sdimage-bootpart Create SD card image with a boot partition
+ directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
+ directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
+ </literallayout>
+ When you use an existing file, you do not have to use the
+ <filename>.wks</filename> extension.
+ Here is an example in Raw Mode that uses the
+ <filename>directdisk</filename> file:
+ <literallayout class='monospaced'>
$ wic create directdisk -r <replaceable>rootfs_dir</replaceable> -b <replaceable>bootimg_dir</replaceable> \
-k <replaceable>kernel_dir</replaceable> -n <replaceable>native_sysroot</replaceable>
- </literallayout>
- </para>
-
- <para>
- Here are the actual partition language commands
- used in the <filename>mkefidisk.wks</filename> file to
- generate an image:
- <literallayout class='monospaced'>
- # short-description: Create an EFI disk image
- # long-description: Creates a partitioned EFI disk image that the user
- # can directly dd to boot media.
-
- part /boot --source bootimg-efi --ondisk sda --label msdos --active --align 1024
-
- part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
+ </literallayout>
+ </para>
+ <para>
+ Here are the actual partition language commands
+ used in the <filename>genericx86.wks</filename> file to
+ generate an image:
+ <literallayout class='monospaced'>
+ # short-description: Create an EFI disk image for genericx86*
+ # long-description: Creates a partitioned EFI disk image for genericx86* machines
+ part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
+ part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
- bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0"
- </literallayout>
- </para>
- </section>
+ bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0"
+ </literallayout>
+ </para>
+ </section>
- <section id='wic-usage-examples'>
- <title>Examples</title>
+ <section id='wic-usage-examples'>
+ <title>Examples</title>
- <para>
- This section provides several examples that show how to use
- the <filename>wic</filename> utility.
- All the examples assume the list of requirements in the
- "<link linkend='wic-requirements'>Requirements</link>"
- section have been met.
- The examples assume the previously generated image is
- <filename>core-image-minimal</filename>.
- </para>
+ <para>
+ This section provides several examples that show how to use
+ the Wic utility.
+ All the examples assume the list of requirements in the
+ "<link linkend='wic-requirements'>Requirements</link>"
+ section have been met.
+ The examples assume the previously generated image is
+ <filename>core-image-minimal</filename>.
+ </para>
- <section id='generate-an-image-using-a-provided-kickstart-file'>
- <title>Generate an Image using an Existing Kickstart File</title>
+ <section id='generate-an-image-using-a-provided-kickstart-file'>
+ <title>Generate an Image using an Existing Kickstart File</title>
- <para>
- This example runs in Cooked Mode and uses the
- <filename>mkefidisk</filename> kickstart file:
- <literallayout class='monospaced'>
+ <para>
+ This example runs in Cooked Mode and uses the
+ <filename>mkefidisk</filename> kickstart file:
+ <literallayout class='monospaced'>
$ wic create mkefidisk -e core-image-minimal
- Checking basic build environment...
- Done.
-
- Creating image(s)...
-
- Info: The new image(s) can be found here:
- <replaceable>current_directory</replaceable>/build/mkefidisk-201310230946-sda.direct
-
- The following build artifacts were used to create the image(s):
- ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/rootfs
- BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0/hddimg
- KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
- NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
-
- The image(s) were created using OE kickstart file:
- /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
- </literallayout>
- The previous example shows the easiest way to create
- an image by running in Cooked Mode and using the
- <filename>-e</filename> option with an existing
- kickstart file.
- All that is necessary is to specify the image used to
- generate the artifacts.
- Your <filename>local.conf</filename> needs to have the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- variable set to the machine you are using, which is
- "minnow" in this example.
- </para>
-
- <para>
- The output specifies the exact image created as well as
- where it was created, which is in the current
- directory by default.
- The output also names the artifacts used and the exact
- <filename>.wks</filename> script that was used to
- generate the image.
- <note>
- You should always verify the details provided in the
- output to make sure that the image was indeed
- created exactly as expected.
- </note>
- </para>
-
- <para>
- Continuing with the example, you can now write the
- image to a USB stick, or whatever media for which you
- built your image, and boot the resulting media.
- You can write the image by using
- <filename>bmaptool</filename> or
- <filename>dd</filename>:
- <literallayout class='monospaced'>
- $ oe-run-native bmaptool copy build/mkefidisk-201310230946-sda.direct /dev/sd<replaceable>X</replaceable>
- </literallayout>
- or
- <literallayout class='monospaced'>
- $ sudo dd if=build/mkefidisk-201310230946-sda.direct of=/dev/sd<replaceable>X</replaceable>
- </literallayout>
- <note>
- For more information on how to use the
- <filename>bmaptool</filename> to flash a device
- with an image, see the
- "<link linkend='flashing-images-using-bmaptool'>Flashing Images Using <filename>bmaptool</filename></link>"
- section.
- </note>
- </para>
- </section>
-
- <section id='using-a-modified-kickstart-file'>
- <title>Using a Modified Kickstart File</title>
-
- <para>
- Because partitioned image creation is
- driven by the kickstart file, it is easy to affect
- image creation by changing the parameters in the file.
- This next example demonstrates that through modification
- of the <filename>directdisk</filename> kickstart file.
- </para>
-
- <para>
- As mentioned earlier, you can use the command
- <filename>wic list images</filename> to show the list
- of existing kickstart files.
- The directory in which these files reside is
- <filename>scripts/lib/image/canned-wks/</filename>
- located in the
- <link linkend='source-directory'>Source Directory</link>.
- Because the available files reside in this directory,
- you can create and add your own custom files to the
- directory.
- Subsequent use of the
- <filename>wic list images</filename> command would then
- include your kickstart files.
- </para>
-
- <para>
- In this example, the existing
- <filename>directdisk</filename> file already does most
- of what is needed.
- However, for the hardware in this example, the image
- will need to boot from <filename>sdb</filename> instead
- of <filename>sda</filename>, which is what the
- <filename>directdisk</filename> kickstart file uses.
- </para>
-
- <para>
- The example begins by making a copy of the
- <filename>directdisk.wks</filename> file in the
- <filename>scripts/lib/image/canned-wks</filename>
- directory and then by changing the lines that specify
- the target disk from which to boot.
- <literallayout class='monospaced'>
- $ cp /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks \
- /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
- </literallayout>
- Next, the example modifies the
- <filename>directdisksdb.wks</filename> file and changes
- all instances of "<filename>--ondisk sda</filename>"
- to "<filename>--ondisk sdb</filename>".
- The example changes the following two lines and leaves
- the remaining lines untouched:
- <literallayout class='monospaced'>
- part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024
- part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
- </literallayout>
- Once the lines are changed, the example generates the
- <filename>directdisksdb</filename> image.
- The command points the process at the
- <filename>core-image-minimal</filename> artifacts for
- the Next Unit of Computing (nuc)
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- the <filename>local.conf</filename>.
- <literallayout class='monospaced'>
- $ wic create directdisksdb -e core-image-minimal
- Checking basic build environment...
- Done.
-
- Creating image(s)...
-
- Info: The new image(s) can be found here:
- <replaceable>current_directory</replaceable>/build/directdisksdb-201310231131-sdb.direct
-
- The following build artifacts were used to create the image(s):
-
- ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/nuc-poky-linux/core-image-minimal/1.0-r0/rootfs
- BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/share
- KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/src/kernel
- NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
-
- The image(s) were created using OE kickstart file:
- /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
- </literallayout>
- Continuing with the example, you can now directly
- <filename>dd</filename> the image to a USB stick, or
- whatever media for which you built your image,
- and boot the resulting media:
- <literallayout class='monospaced'>
- $ sudo dd if=build/directdisksdb-201310231131-sdb.direct of=/dev/sdb
- 86018+0 records in
- 86018+0 records out
- 44041216 bytes (44 MB) copied, 13.0734 s, 3.4 MB/s
- [trz at empanada tmp]$ sudo eject /dev/sdb
- </literallayout>
- </para>
- </section>
-
- <section id='creating-an-image-based-on-core-image-minimal-and-crownbay-noemgd'>
- <title>Creating an Image Based on <filename>core-image-minimal</filename> and <filename>crownbay-noemgd</filename></title>
-
- <para>
- This example creates an image based on
- <filename>core-image-minimal</filename> and a
- <filename>crownbay-noemgd</filename>
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- that works right out of the box.
- <literallayout class='monospaced'>
- $ wic create directdisk -e core-image-minimal
-
- Checking basic build environment...
- Done.
-
- Creating image(s)...
-
- Info: The new image(s) can be found here:
- <replaceable>current_directory</replaceable>/build/directdisk-201309252350-sda.direct
-
- The following build artifacts were used to create the image(s):
-
- ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
- BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
- KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
- NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
-
- The image(s) were created using OE kickstart file:
- /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks
- </literallayout>
- </para>
- </section>
-
- <section id='using-a-modified-kickstart-file-and-running-in-raw-mode'>
- <title>Using a Modified Kickstart File and Running in Raw Mode</title>
-
- <para>
- This next example manually specifies each build artifact
- (runs in Raw Mode) and uses a modified kickstart file.
- The example also uses the <filename>-o</filename> option
- to cause Wic to create the output
- somewhere other than the default output directory,
- which is the current directory:
- <literallayout class='monospaced'>
- $ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir \
- /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs \
- --bootimg-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share \
- --kernel-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel \
- --native-sysroot /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
-
- Creating image(s)...
-
- Info: The new image(s) can be found here:
- /home/trz/testwic/build/test-201309260032-sda.direct
+ INFO: Building wic-tools...
+ .
+ .
+ .
+ INFO: The new image(s) can be found here:
+ ./mkefidisk-201710061409-sda.direct
The following build artifacts were used to create the image(s):
+ ROOTFS_DIR: /home/scottrif/poky/build/tmp.wic.r4hkds0b/rootfs_copy
+ BOOTIMG_DIR: /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
+ KERNEL_DIR: /home/scottrif/poky/build/tmp/deploy/images/qemux86
+ NATIVE_SYSROOT: /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
- ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
- BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
- KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
- NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
-
- The image(s) were created using OE kickstart file:
- /home/trz/test.wks
- </literallayout>
- For this example,
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- did not have to be specified in the
- <filename>local.conf</filename> file since the
- artifact is manually specified.
- </para>
- </section>
- </section>
-
- <section id='openembedded-kickstart-plugins'>
- <title>Plug-ins</title>
+ INFO: The image(s) were created using OE kickstart file:
+ /home/scottrif/poky/scripts/lib/wic/canned-wks/mkefidisk.wks
+ </literallayout>
+ The previous example shows the easiest way to create
+ an image by running in cooked mode and supplying
+ a kickstart file and the "-e" option to point to the
+ existing build artifacts.
+ Your <filename>local.conf</filename> file needs to have
+ the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ variable set to the machine you are using, which is
+ "qemux86" in this example.
+ </para>
<para>
- Plug-ins allow Wic functionality to
- be extended and specialized by users.
- This section documents the plug-in interface, which is
- currently restricted to source plug-ins.
+ Once the image builds, the output provides image
+ location, artifact use, and kickstart file information.
+ <note>
+ You should always verify the details provided in the
+ output to make sure that the image was indeed
+ created exactly as expected.
+ </note>
</para>
<para>
- Source plug-ins provide a mechanism to customize
- various aspects of the image generation process in
- Wic, mainly the contents of
- partitions.
- The plug-ins provide a mechanism for mapping values
- specified in <filename>.wks</filename> files using the
- <filename>--source</filename> keyword to a
- particular plug-in implementation that populates a
- corresponding partition.
+ Continuing with the example, you can now write the
+ image to a USB stick, or whatever media for which you
+ built your image, and boot from the media.
+ You can write the image by using
+ <filename>bmaptool</filename> or
+ <filename>dd</filename>:
+ <literallayout class='monospaced'>
+ $ oe-run-native bmaptool copy build/mkefidisk-201710061409-sda.direct /dev/sd<replaceable>X</replaceable>
+ </literallayout>
+ or
+ <literallayout class='monospaced'>
+ $ sudo dd if=build/mkefidisk-201710061409-sda.direct of=/dev/sd<replaceable>X</replaceable>
+ </literallayout>
<note>
- If you use plug-ins that have build-time dependencies
- (e.g. native tools, bootloaders, and so forth)
- when building a Wic image, you need to specify those
- dependencies using the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE_DEPENDS'><filename>WKS_FILE_DEPENDS</filename></ulink>
- variable.
+ For more information on how to use the
+ <filename>bmaptool</filename> to flash a device
+ with an image, see the
+ "<link linkend='flashing-images-using-bmaptool'>Flashing Images Using <filename>bmaptool</filename></link>"
+ section.
</note>
</para>
+ </section>
+
+ <section id='using-a-modified-kickstart-file'>
+ <title>Using a Modified Kickstart File</title>
<para>
- A source plug-in is created as a subclass of
- <filename>SourcePlugin</filename>.
- The plug-in file containing it is added to
- <filename>scripts/lib/wic/plugins/source/</filename> to
- make the plug-in implementation available to the
- Wic implementation.
- For more information, see
- <filename>scripts/lib/wic/pluginbase.py</filename>.
+ Because partitioned image creation is driven by the
+ kickstart file, it is easy to affect image creation by
+ changing the parameters in the file.
+ This next example demonstrates that through modification
+ of the <filename>directdisk-gpt</filename> kickstart
+ file.
</para>
<para>
- Source plug-ins can also be implemented and added by
- external layers.
- As such, any plug-ins found in a
- <filename>scripts/lib/wic/plugins/source/</filename>
- directory in an external layer are also made
- available.
+ As mentioned earlier, you can use the command
+ <filename>wic list images</filename> to show the list
+ of existing kickstart files.
+ The directory in which the
+ <filename>directdisk-gpt.wks</filename> file resides is
+ <filename>scripts/lib/image/canned-wks/</filename>,
+ which is located in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (e.g. <filename>poky</filename>).
+ Because available files reside in this directory,
+ you can create and add your own custom files to the
+ directory.
+ Subsequent use of the
+ <filename>wic list images</filename> command would then
+ include your kickstart files.
</para>
<para>
- When the Wic implementation needs
- to invoke a partition-specific implementation, it looks
- for the plug-in that has the same name as the
- <filename>--source</filename> parameter given to
- that partition.
- For example, if the partition is set up as follows:
- <literallayout class='monospaced'>
- part /boot --source bootimg-pcbios ...
- </literallayout>
- The methods defined as class members of the plug-in
- having the matching <filename>bootimg-pcbios.name</filename>
- class member are used.
+ In this example, the existing
+ <filename>directdisk-gpt</filename> file already does
+ most of what is needed.
+ However, for the hardware in this example, the image
+ will need to boot from <filename>sdb</filename> instead
+ of <filename>sda</filename>, which is what the
+ <filename>directdisk-gpt</filename> kickstart file
+ uses.
</para>
<para>
- To be more concrete, here is the plug-in definition that
- matches a
- <filename>--source bootimg-pcbios</filename> usage,
- along with an example
- method called by the Wic implementation
- when it needs to invoke an implementation-specific
- partition-preparation function:
+ The example begins by making a copy of the
+ <filename>directdisk-gpt.wks</filename> file in the
+ <filename>scripts/lib/image/canned-wks</filename>
+ directory and then by changing the lines that specify
+ the target disk from which to boot.
<literallayout class='monospaced'>
- class BootimgPcbiosPlugin(SourcePlugin):
- name = 'bootimg-pcbios'
+ $ cp /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisk-gpt.wks \
+ /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
+ </literallayout>
+ Next, the example modifies the
+ <filename>directdisksdb-gpt.wks</filename> file and
+ changes all instances of
+ "<filename>--ondisk sda</filename>" to
+ "<filename>--ondisk sdb</filename>".
+ The example changes the following two lines and leaves
+ the remaining lines untouched:
+ <literallayout class='monospaced'>
+ part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024
+ part / --source rootfs --ondisk sdb --fstype=ext4 --label platform --align 1024 --use-uuid
+ </literallayout>
+ Once the lines are changed, the example generates the
+ <filename>directdisksdb-gpt</filename> image.
+ The command points the process at the
+ <filename>core-image-minimal</filename> artifacts for
+ the Next Unit of Computing (nuc)
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ the <filename>local.conf</filename>.
+ <literallayout class='monospaced'>
+ $ wic create directdisksdb-gpt -e core-image-minimal
+ INFO: Building wic-tools...
+ .
+ .
+ .
+ Initialising tasks: 100% |#######################################| Time: 0:00:01
+ NOTE: Executing SetScene Tasks
+ NOTE: Executing RunQueue Tasks
+ NOTE: Tasks Summary: Attempted 1161 tasks of which 1157 didn't need to be rerun and all succeeded.
+ INFO: Creating image(s)...
+
+ INFO: The new image(s) can be found here:
+ ./directdisksdb-gpt-201710090938-sdb.direct
- @classmethod
- def do_prepare_partition(self, part, ...)
+ The following build artifacts were used to create the image(s):
+ ROOTFS_DIR: /home/scottrif/poky/build/tmp.wic.hk3wl6zn/rootfs_copy
+ BOOTIMG_DIR: /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
+ KERNEL_DIR: /home/scottrif/poky/build/tmp/deploy/images/qemux86
+ NATIVE_SYSROOT: /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
+
+ INFO: The image(s) were created using OE kickstart file:
+ /home/scottrif/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
+ </literallayout>
+ Continuing with the example, you can now directly
+ <filename>dd</filename> the image to a USB stick, or
+ whatever media for which you built your image,
+ and boot the resulting media:
+ <literallayout class='monospaced'>
+ $ sudo dd if=directdisksdb-gpt-201710090938-sdb.direct of=/dev/sdb
+ 140966+0 records in
+ 140966+0 records out
+ 72174592 bytes (72 MB, 69 MiB) copied, 78.0282 s, 925 kB/s
+ $ sudo eject /dev/sdb
</literallayout>
- If the subclass itself does not implement a function, a
- default version in a superclass is located and
- used, which is why all plug-ins must be derived from
- <filename>SourcePlugin</filename>.
</para>
+ </section>
- <para>
- The <filename>SourcePlugin</filename> class defines the
- following methods, which is the current set of methods
- that can be implemented or overridden by
- <filename>--source</filename> plug-ins.
- Any methods not implemented by a
- <filename>SourcePlugin</filename> subclass inherit the
- implementations present in the
- <filename>SourcePlugin</filename> class.
- For more information, see the
- <filename>SourcePlugin</filename> source for details:
- </para>
+ <section id='using-a-modified-kickstart-file-and-running-in-raw-mode'>
+ <title>Using a Modified Kickstart File and Running in Raw Mode</title>
<para>
- <itemizedlist>
- <listitem><para>
- <emphasis><filename>do_prepare_partition()</filename>:</emphasis>
- Called to do the actual content population for a
- partition.
- In other words, the method prepares the final
- partition image that is incorporated into the
- disk image.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>do_configure_partition()</filename>:</emphasis>
- Called before
- <filename>do_prepare_partition()</filename>.
- This method is typically used to create custom
- configuration files for a partition (e.g. syslinux
- or grub configuration files).
- </para></listitem>
- <listitem><para>
- <emphasis><filename>do_install_disk()</filename>:</emphasis>
- Called after all partitions have been prepared and
- assembled into a disk image.
- This method provides a hook to allow finalization
- of a disk image, (e.g. writing an MBR).
- </para></listitem>
- <listitem><para>
- <emphasis><filename>do_stage_partition()</filename>:</emphasis>
- Special content-staging hook called before
- <filename>do_prepare_partition()</filename>.
- This method is normally empty.</para>
- <para>Typically, a partition just uses the passed-in
- parameters (e.g. the unmodified value of
- <filename>bootimg_dir</filename>).
- However, in some cases things might need to be
- more tailored.
- As an example, certain files might additionally
- need to be taken from
- <filename>bootimg_dir + /boot</filename>.
- This hook allows those files to be staged in a
- customized fashion.
- <note>
- <filename>get_bitbake_var()</filename>
- allows you to access non-standard variables
- that you might want to use for this.
- </note>
- </para></listitem>
- </itemizedlist>
- </para>
+ This next example manually specifies each build artifact
+ (runs in Raw Mode) and uses a modified kickstart file.
+ The example also uses the <filename>-o</filename> option
+ to cause Wic to create the output
+ somewhere other than the default output directory,
+ which is the current directory:
+ <literallayout class='monospaced'>
+ $ wic create /home/scottrif/my_yocto/test.wks -o /home/scottrif/testwic \
+ --rootfs-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \
+ --bootimg-dir /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share \
+ --kernel-dir /home/scottrif/poky/build/tmp/deploy/images/qemux86 \
+ --native-sysroot /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
- <para>
- This scheme is extensible.
- Adding more hooks is a simple matter of adding more
- plug-in methods to <filename>SourcePlugin</filename> and
- derived classes.
- The code that then needs to call the plug-in methods uses
- <filename>plugin.get_source_plugin_methods()</filename>
- to find the method or methods needed by the call.
- Retrieval of those methods is accomplished
- by filling up a dict with keys
- containing the method names of interest.
- On success, these will be filled in with the actual
- methods.
- Please see the Wic
- implementation for examples and details.
+ INFO: Creating image(s)...
+
+ INFO: The new image(s) can be found here:
+ /home/scottrif/testwic/test-201710091445-sdb.direct
+
+ The following build artifacts were used to create the image(s):
+ ROOTFS_DIR: /home/scottrif/testwic/tmp.wic.x4wipbmb/rootfs_copy
+ BOOTIMG_DIR: /home/scottrif/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
+ KERNEL_DIR: /home/scottrif/poky/build/tmp/deploy/images/qemux86
+ NATIVE_SYSROOT: /home/scottrif/poky/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
+
+ INFO: The image(s) were created using OE kickstart file:
+ /home/scottrif/my_yocto/test.wks
+ </literallayout>
+ For this example,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ did not have to be specified in the
+ <filename>local.conf</filename> file since the
+ artifact is manually specified.
</para>
</section>
- <section id='openembedded-kickstart-wks-reference'>
- <title>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</title>
+ <section id='using-wic-to-manipulate-an-image'>
+ <title>Using Wic to Manipulate an Image</title>
<para>
- The current Wic implementation supports
- only the basic kickstart partitioning commands:
- <filename>partition</filename> (or <filename>part</filename>
- for short) and <filename>bootloader</filename>.
+ Wic image manipulation allows you to shorten turnaround
+ time during image development.
+ For example, you can use Wic to delete the kernel partition
+ of a Wic image and then insert a newly built kernel.
+ This saves you time from having to rebuild the entire image
+ each time you modify the kernel.
<note>
- Future updates will implement more commands and options.
- If you use anything that is not specifically
- supported, results can be unpredictable.
+ In order to use Wic to manipulate a Wic image as in
+ this example, your development machine must have the
+ <filename>mtools</filename> package installed.
</note>
</para>
<para>
- The following is a list of the commands, their syntax,
- and meanings.
- The commands are based on the Fedora
- kickstart versions but with modifications to
- reflect Wic capabilities.
- You can see the original documentation for those commands
- at the following links:
- <itemizedlist>
+ The following example examines the contents of the Wic
+ image, deletes the existing kernel, and then inserts a
+ new kernel:
+ <orderedlist>
<listitem><para>
- <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition'>http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition</ulink>
+ <emphasis>List the Partitions:</emphasis>
+ Use the <filename>wic ls</filename> command to list
+ all the partitions in the Wic image:
+ <literallayout class='monospaced'>
+ $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic
+ Num Start End Size Fstype
+ 1 1048576 25041919 23993344 fat16
+ 2 25165824 72157183 46991360 ext4
+ </literallayout>
+ The previous output shows two partitions in the
+ <filename>core-image-minimal-qemux86.wic</filename>
+ image.
</para></listitem>
<listitem><para>
- <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader'>http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader</ulink>
- </para></listitem>
- </itemizedlist>
- </para>
-
- <section id='command-part-or-partition'>
- <title>Command: part or partition</title>
-
- <para>
- Either of these commands create a partition on the system
- and use the following syntax:
- <literallayout class='monospaced'>
- part [<replaceable>mntpoint</replaceable>]
- partition [<replaceable>mntpoint</replaceable>]
- </literallayout>
- If you do not provide
- <replaceable>mntpoint</replaceable>, Wic creates a
- partition but does not mount it.
- </para>
-
- <para>
- The
- <filename><replaceable>mntpoint</replaceable></filename>
- is where the partition will be mounted and must be of
- one of the following forms:
- <itemizedlist>
- <listitem><para>
- <filename>/<replaceable>path</replaceable></filename>:
- For example, "/", "/usr", or "/home"
- </para></listitem>
- <listitem><para>
- <filename>swap</filename>:
- The created partition is used as swap space.
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Specifying a <replaceable>mntpoint</replaceable> causes
- the partition to automatically be mounted.
- Wic achieves this by adding entries to the filesystem
- table (fstab) during image generation.
- In order for wic to generate a valid fstab, you must
- also provide one of the <filename>--ondrive</filename>,
- <filename>--ondisk</filename>, or
- <filename>--use-uuid</filename> partition options as
- part of the command.
- Here is an example using "/" as the mountpoint.
- The command uses "--ondisk" to force the partition onto
- the <filename>sdb</filename> disk:
- <literallayout class='monospaced'>
- part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
- </literallayout>
- </para>
-
- <para>
- Here is a list that describes other supported options
- you can use with the <filename>part</filename> and
- <filename>partition</filename> commands:
- <itemizedlist>
- <listitem><para>
- <emphasis><filename>--size</filename>:</emphasis>
- The minimum partition size in MBytes.
- Specify an integer value such as 500.
- Do not append the number with "MB".
- You do not need this option if you use
- <filename>--source</filename>.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--source</filename>:</emphasis>
- This option is a
- Wic-specific option that
- names the source of the data that populates
- the partition.
- The most common value for this option is
- "rootfs", but you can use any value that maps to
- a valid source plug-in.
- For information on the source plug-ins, see the
- "<link linkend='openembedded-kickstart-plugins'>Plug-ins</link>"
- section.</para>
- <para>If you use
- <filename>--source rootfs</filename>,
- Wic creates a partition as
- large as needed and to fill it with the contents
- of the root filesystem pointed to by the
- <filename>-r</filename> command-line option
- or the equivalent rootfs derived from the
- <filename>-e</filename> command-line
- option.
- The filesystem type used to create the
- partition is driven by the value of the
- <filename>--fstype</filename> option
- specified for the partition.
- See the entry on
- <filename>--fstype</filename> that
- follows for more information.
- </para>
- <para>If you use
- <filename>--source <replaceable>plugin-name</replaceable></filename>,
- Wic creates a partition as
- large as needed and fills it with the contents
- of the partition that is generated by the
- specified plug-in name using the data pointed
- to by the <filename>-r</filename> command-line
- option or the equivalent rootfs derived from the
- <filename>-e</filename> command-line
- option.
- Exactly what those contents and filesystem type
- end up being are dependent on the given plug-in
- implementation.
- </para>
- <para>If you do not use the
- <filename>--source</filename> option, the
- <filename>wic</filename> command creates an
- empty partition.
- Consequently, you must use the
- <filename>--size</filename> option to specify
- the size of the empty partition.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--ondisk</filename> or <filename>--ondrive</filename>:</emphasis>
- Forces the partition to be created on a
- particular disk.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--fstype</filename>:</emphasis>
- Sets the file system type for the partition.
- Valid values are:
- <itemizedlist>
- <listitem><para><filename>ext4</filename>
- </para></listitem>
- <listitem><para><filename>ext3</filename>
- </para></listitem>
- <listitem><para><filename>ext2</filename>
- </para></listitem>
- <listitem><para><filename>btrfs</filename>
- </para></listitem>
- <listitem><para><filename>squashfs</filename>
- </para></listitem>
- <listitem><para><filename>swap</filename>
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--fsoptions</filename>:</emphasis>
- Specifies a free-form string of options to be
- used when mounting the filesystem.
- This string will be copied into the
- <filename>/etc/fstab</filename> file of the
- installed system and should be enclosed in
- quotes.
- If not specified, the default string
- is "defaults".
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--label label</filename>:</emphasis>
- Specifies the label to give to the filesystem to
- be made on the partition.
- If the given label is already in use by another
- filesystem, a new label is created for the
- partition.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--active</filename>:</emphasis>
- Marks the partition as active.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--align (in KBytes)</filename>:</emphasis>
- This option is a
- Wic-specific option that
- says to start a partition on an
- <replaceable>x</replaceable> KBytes
- boundary.</para></listitem>
- <listitem><para>
- <emphasis><filename>--no-table</filename>:</emphasis>
- This option is a
- Wic-specific option.
- Using the option reserves space for the
- partition and causes it to become populated.
- However, the partition is not added to the
- partition table.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--extra-space</filename>:</emphasis>
- This option is a
- Wic-specific option that
- adds extra space after the space filled by the
- content of the partition.
- The final size can go beyond the size specified
- by the <filename>--size</filename> option.
- The default value is 10 Mbytes.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--overhead-factor</filename>:</emphasis>
- This option is a
- Wic-specific option that
- multiplies the size of the partition by the
- option's value.
- You must supply a value greater than or equal to
- "1".
- The default value is "1.3".
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--part-type</filename>:</emphasis>
- This option is a
- Wic-specific option that
- specifies the partition type globally
- unique identifier (GUID) for GPT partitions.
- You can find the list of partition type GUIDs
- at
- <ulink url='http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs'></ulink>.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--use-uuid</filename>:</emphasis>
- This option is a
- Wic-specific option that
- causes Wic to generate a
- random GUID for the partition.
- The generated identifier is used in the
- bootloader configuration to specify the root
- partition.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--uuid</filename>:</emphasis>
- This option is a
- Wic-specific
- option that specifies the partition UUID.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section id='command-bootloader'>
- <title>Command: bootloader</title>
-
- <para>
- This command specifies how the bootloader should be
- configured and supports the following options:
- <note>
- Bootloader functionality and boot partitions are
- implemented by the various
- <filename>--source</filename>
- plug-ins that implement bootloader functionality.
- The bootloader command essentially provides a
- means of modifying bootloader configuration.
- </note>
- <itemizedlist>
- <listitem><para>
- <emphasis><filename>--timeout</filename>:</emphasis>
- Specifies the number of seconds before the
- bootloader times out and boots the default
- option.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--append</filename>:</emphasis>
- Specifies kernel parameters.
- These parameters will be added to the syslinux
- <filename>APPEND</filename> or
- <filename>grub</filename> kernel command line.
- </para></listitem>
- <listitem><para>
- <emphasis><filename>--configfile</filename>:</emphasis>
- Specifies a user-defined configuration file for
- the bootloader.
- You can provide a full pathname for the file or
- a file that exists in the
- <filename>canned-wks</filename> folder.
- This option overrides all other bootloader
- options.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
- </section>
+ <emphasis>Examine a Particular Partition:</emphasis>
+ Use the <filename>wic ls</filename> command again
+ but in a different form to examine a particular
+ partition.
+ <note>
+ You can get command usage on any Wic command
+ using the following form:
+ <literallayout class='monospaced'>
+ $ wic help <replaceable>command</replaceable>
+ </literallayout>
+ For example, the following command shows you
+ the various ways to use the
+ <filename>wic ls</filename> command:
+ <literallayout class='monospaced'>
+ $ wic help ls
+ </literallayout>
+ </note>
+ The following command shows what is in Partition
+ one:
+ <literallayout class='monospaced'>
+ $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1
+ Volume in drive : is boot
+ Volume Serial Number is E894-1809
+ Directory for ::/
+
+ libcom32 c32 186500 2017-10-09 16:06
+ libutil c32 24148 2017-10-09 16:06
+ syslinux cfg 220 2017-10-09 16:06
+ vesamenu c32 27104 2017-10-09 16:06
+ vmlinuz 6904608 2017-10-09 16:06
+ 5 files 7 142 580 bytes
+ 16 582 656 bytes free
+ </literallayout>
+ The previous output shows five files, with the
+ <filename>vmlinuz</filename> being the kernel.
+ <note>
+ If you see the following error, you need to
+ update or create a
+ <filename>~/.mtoolsrc</filename> file and
+ be sure to have the line “mtools_skip_check=1“
+ in the file.
+ Then, run the Wic command again:
+ <literallayout class='monospaced'>
+ ERROR: _exec_cmd: /usr/bin/mdir -i /tmp/wic-parttfokuwra ::/ returned '1' instead of 0
+ output: Total number of sectors (47824) not a multiple of sectors per track (32)!
+ Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
+ </literallayout>
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Remove the Old Kernel:</emphasis>
+ Use the <filename>wic rm</filename> command to
+ remove the <filename>vmlinuz</filename> file
+ (kernel):
+ <literallayout class='monospaced'>
+ $ wic rm tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Add In the New Kernel:</emphasis>
+ Use the <filename>wic cp</filename> command to
+ add the updated kernel to the Wic image.
+ Depending on how you built your kernel, it could
+ be in different places.
+ If you used <filename>devtool</filename> and
+ an SDK to build your kernel, it resides in the
+ <filename>tmp/work</filename> directory of the
+ extensible SDK.
+ If you used <filename>make</filename> to build the
+ kernel, the kernel will be in the
+ <filename>workspace/sources</filename> area.
+ </para>
+
+ <para>The following example assumes
+ <filename>devtool</filename> was used to build
+ the kernel:
+ <literallayout class='monospaced'>
+ 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 \
+ ~/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz
+ </literallayout>
+ Once the new kernel is added back into the image,
+ you can use the <filename>dd</filename>
+ command or
+ <link linkend='flashing-images-using-bmaptool'><filename>bmaptool</filename></link>
+ to flash your wic image onto an SD card
+ or USB stick and test your target.
+ <note>
+ Using <filename>bmaptool</filename> is
+ generally 10 to 20 times faster than using
+ <filename>dd</filename>.
+ </note>
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
</section>
</section>
@@ -5817,887 +5612,231 @@
<title>Building an Initial RAM Filesystem (initramfs) Image</title>
<para>
- initramfs is the successor of Initial RAM Disk (initrd).
- It is a "copy in and out" (cpio) archive of the initial file system
- that gets loaded into memory during the Linux startup process.
- Because Linux uses the contents of the archive during
- initialization, the initramfs needs to contain all of the device
- drivers and tools needed to mount the final root filesystem.
- </para>
-
- <para>
- To build an initramfs image and bundle it into the kernel, set the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
- variable in your <filename>local.conf</filename> file, and set the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></ulink>
- variable in your <filename>machine.conf</filename> file:
- <literallayout class='monospaced'>
- INITRAMFS_IMAGE_BUNDLE = "1"
- INITRAMFS_IMAGE = "<replaceable>image_recipe_name</replaceable>"
- </literallayout>
- Setting the <filename>INITRAMFS_IMAGE_BUNDLE</filename>
- flag causes the initramfs created by the recipe and defined by
- <filename>INITRAMFS_IMAGE</filename> to be unpacked into the
- <filename>${B}/usr/</filename> directory.
- The unpacked initramfs is then passed to the kernel's
- <filename>Makefile</filename> using the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></ulink>
- variable, allowing initramfs to be built in to the kernel
- normally.
- <note>
- The preferred method is to use the
- <filename>INITRAMFS_IMAGE</filename> variable rather than the
- <filename>INITRAMFS_TASK</filename> variable.
- Setting <filename>INITRAMFS_TASK</filename> is supported for
- backward compatibility.
- However, use of this variable has circular dependency
- problems.
- See the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
- variable for additional information on these dependency
- problems.
- </note>
- </para>
-
- <para>
- The recipe that <filename>INITRAMFS_IMAGE</filename>
- points to must produce a <filename>.cpio.gz</filename>,
- <filename>.cpio.tar</filename>, <filename>.cpio.lz4</filename>,
- <filename>.cpio.lzma</filename>, or
- <filename>.cpio.xz</filename> file.
- You can ensure you produce one of these <filename>.cpio.*</filename>
- files by setting the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_FSTYPES'><filename>INITRAMFS_FSTYPES</filename></ulink>
- variable in your configuration file to one or more of the above
- file types.
+ An initial RAM filesystem (initramfs) image provides a temporary
+ root filesystem used for early system initialization (e.g.
+ loading of modules needed to locate and mount the "real" root
+ filesystem).
<note>
- If you add items to the initramfs image by way of its recipe,
- you should use
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>
- rather than
- <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>.
- <filename>PACKAGE_INSTALL</filename> gives more direct control
- of what is added to the image as compared to the defaults you
- might not necessarily want that are set by the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-core-image'><filename>core-image</filename></ulink>
- classes.
+ The initramfs image is the successor of initial RAM disk
+ (initrd).
+ It is a "copy in and out" (cpio) archive of the initial
+ filesystem that gets loaded into memory during the Linux
+ startup process.
+ Because Linux uses the contents of the archive during
+ initialization, the initramfs image needs to contain all of the
+ device drivers and tools needed to mount the final root
+ filesystem.
</note>
</para>
- </section>
-
- <section id='configuring-the-kernel'>
- <title>Configuring the Kernel</title>
<para>
- Configuring the Yocto Project kernel consists of making sure the
- <filename>.config</filename> file has all the right information
- in it for the image you are building.
- You can use the <filename>menuconfig</filename> tool and
- configuration fragments to make sure your
- <filename>.config</filename> file is just how you need it.
- You can also save known configurations in a
- <filename>defconfig</filename> file that the build system can use
- for kernel configuration.
- </para>
-
- <para>
- This section describes how to use <filename>menuconfig</filename>,
- create and use configuration fragments, and how to interactively
- modify your <filename>.config</filename> file to create the
- leanest kernel configuration file possible.
- </para>
-
- <para>
- For more information on kernel configuration, see the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#changing-the-configuration'>Changing the Configuration</ulink>"
- section in the Yocto Project Linux Kernel Development Manual.
- </para>
-
- <section id='using-menuconfig'>
- <title>Using&nbsp;&nbsp;<filename>menuconfig</filename></title>
-
- <para>
- The easiest way to define kernel configurations is to set them through the
- <filename>menuconfig</filename> tool.
- This tool provides an interactive method with which
- to set kernel configurations.
- For general information on <filename>menuconfig</filename>, see
- <ulink url='http://en.wikipedia.org/wiki/Menuconfig'></ulink>.
- </para>
-
- <para>
- To use the <filename>menuconfig</filename> tool in the Yocto Project development
- environment, you must launch it using BitBake.
- Thus, the environment must be set up using the
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
- script found in the
- <link linkend='build-directory'>Build Directory</link>.
- You must also be sure of the state of your build in the
- <link linkend='source-directory'>Source Directory</link>.
- The following commands run <filename>menuconfig</filename>
- assuming the Source Directory's top-level folder is
- <filename>~/poky</filename>:
- <literallayout class='monospaced'>
- $ cd poky
- $ source oe-init-build-env
- $ bitbake linux-yocto -c kernel_configme -f
- $ bitbake linux-yocto -c menuconfig
- </literallayout>
- Once <filename>menuconfig</filename> comes up, its standard
- interface allows you to interactively examine and configure
- all the kernel configuration parameters.
- After making your changes, simply exit the tool and save your
- changes to create an updated version of the
- <filename>.config</filename> configuration file.
- </para>
-
- <para>
- Consider an example that configures the <filename>linux-yocto-3.14</filename>
- kernel.
- The OpenEmbedded build system recognizes this kernel as
- <filename>linux-yocto</filename>.
- Thus, the following commands from the shell in which you previously sourced the
- environment initialization script cleans the shared state cache and the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
- directory and then runs <filename>menuconfig</filename>:
- <literallayout class='monospaced'>
- $ bitbake linux-yocto -c menuconfig
- </literallayout>
- </para>
-
- <para>
- Once <filename>menuconfig</filename> launches, use the interface
- to navigate through the selections to find the configuration settings in
- which you are interested.
- For example, consider the <filename>CONFIG_SMP</filename> configuration setting.
- You can find it at <filename>Processor Type and Features</filename> under
- the configuration selection <filename>Symmetric Multi-processing Support</filename>.
- After highlighting the selection, use the arrow keys to select or deselect
- the setting.
- When you are finished with all your selections, exit out and save them.
- </para>
-
- <para>
- Saving the selections updates the <filename>.config</filename> configuration file.
- This is the file that the OpenEmbedded build system uses to configure the
- kernel during the build.
- You can find and examine this file in the Build Directory in
- <filename>tmp/work/</filename>.
- The actual <filename>.config</filename> is located in the area where the
- specific kernel is built.
- For example, if you were building a Linux Yocto kernel based on the
- Linux 3.14 kernel and you were building a QEMU image targeted for
- <filename>x86</filename> architecture, the
- <filename>.config</filename> file would be located here:
- <literallayout class='monospaced'>
- poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.14.11+git1+84f...
- ...656ed30-r1/linux-qemux86-standard-build
- </literallayout>
- <note>
- The previous example directory is artificially split and many of the characters
- in the actual filename are omitted in order to make it more readable.
- Also, depending on the kernel you are using, the exact pathname
- for <filename>linux-yocto-3.14...</filename> might differ.
- </note>
- </para>
-
- <para>
- Within the <filename>.config</filename> file, you can see the kernel settings.
- For example, the following entry shows that symmetric multi-processor support
- is not set:
- <literallayout class='monospaced'>
- # CONFIG_SMP is not set
- </literallayout>
- </para>
-
- <para>
- A good method to isolate changed configurations is to use a combination of the
- <filename>menuconfig</filename> tool and simple shell commands.
- Before changing configurations with <filename>menuconfig</filename>, copy the
- existing <filename>.config</filename> and rename it to something else,
- use <filename>menuconfig</filename> to make
- as many changes as you want and save them, then compare the renamed configuration
- file against the newly created file.
- You can use the resulting differences as your base to create configuration fragments
- to permanently save in your kernel layer.
- <note>
- Be sure to make a copy of the <filename>.config</filename> and don't just
- rename it.
- The build system needs an existing <filename>.config</filename>
- from which to work.
- </note>
- </para>
- </section>
-
- <section id='creating-a-defconfig-file'>
- <title>Creating a&nbsp;&nbsp;<filename>defconfig</filename> File</title>
-
- <para>
- A <filename>defconfig</filename> file is simply a
- <filename>.config</filename> renamed to "defconfig".
- You can use a <filename>defconfig</filename> file
- to retain a known set of kernel configurations from which the
- OpenEmbedded build system can draw to create the final
- <filename>.config</filename> file.
- <note>
- Out-of-the-box, the Yocto Project never ships a
- <filename>defconfig</filename> or
- <filename>.config</filename> file.
- The OpenEmbedded build system creates the final
- <filename>.config</filename> file used to configure the
- kernel.
- </note>
- </para>
-
- <para>
- To create a <filename>defconfig</filename>, start with a
- complete, working Linux kernel <filename>.config</filename>
- file.
- Copy that file to the appropriate
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
- directory in your layer's
- <filename>recipes-kernel/linux</filename> directory, and rename
- the copied file to "defconfig".
- Then, add the following lines to the linux-yocto
- <filename>.bbappend</filename> file in your layer:
- <literallayout class='monospaced'>
- FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
- SRC_URI += "file://defconfig"
- </literallayout>
- The
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- tells the build system how to search for the file, while the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
- extends the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
- variable (search directories) to include the
- <filename>${PN}</filename> directory you created to hold the
- configuration changes.
- <note>
- The build system applies the configurations from the
- <filename>defconfig</filename> file before applying any
- subsequent configuration fragments.
- The final kernel configuration is a combination of the
- configurations in the <filename>defconfig</filename>
- file and any configuration fragments you provide.
- You need to realize that if you have any configuration
- fragments, the build system applies these on top of and
- after applying the existing defconfig file configurations.
- </note>
- For more information on configuring the kernel, see the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#changing-the-configuration'>Changing the Configuration</ulink>"
- and
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
- sections, both in the Yocto Project Linux Kernel Development
- Manual.
- </para>
- </section>
-
- <section id='creating-config-fragments'>
- <title>Creating Configuration Fragments</title>
-
- <para>
- Configuration fragments are simply kernel options that appear in a file
- placed where the OpenEmbedded build system can find and apply them.
- Syntactically, the configuration statement is identical to what would appear
- in the <filename>.config</filename> file, which is in the
- <link linkend='build-directory'>Build Directory</link>:
- <literallayout class='monospaced'>
- tmp/work/<replaceable>arch</replaceable>-poky-linux/linux-yocto-<replaceable>release_specific_string</replaceable>/linux-<replaceable>arch</replaceable>-<replaceable>build_type</replaceable>
- </literallayout>
- </para>
-
- <para>
- It is simple to create a configuration fragment.
- For example, issuing the following from the shell creates a configuration fragment
- file named <filename>my_smp.cfg</filename> that enables multi-processor support
- within the kernel:
- <literallayout class='monospaced'>
- $ echo "CONFIG_SMP=y" >> my_smp.cfg
- </literallayout>
- <note>
- All configuration fragment files must use the
- <filename>.cfg</filename> extension in order for the
- OpenEmbedded build system to recognize them as a
- configuration fragment.
- </note>
- </para>
-
- <para>
- Where do you put your configuration fragment files?
- You can place these files in the same area pointed to by
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
- The OpenEmbedded build system picks up the configuration and
- adds it to the kernel's configuration.
- For example, suppose you had a set of configuration options
- in a file called <filename>myconfig.cfg</filename>.
- If you put that file inside a directory named
- <filename>linux-yocto</filename> that resides in the same
- directory as the kernel's append file and then add a
- <filename>SRC_URI</filename> statement such as the following
- to the kernel's append file, those configuration options
- will be picked up and applied when the kernel is built.
- <literallayout class='monospaced'>
- SRC_URI += "file://myconfig.cfg"
- </literallayout>
- </para>
-
- <para>
- As mentioned earlier, you can group related configurations into multiple files and
- name them all in the <filename>SRC_URI</filename> statement as well.
- For example, you could group separate configurations specifically for Ethernet and graphics
- into their own files and add those by using a <filename>SRC_URI</filename> statement like the
- following in your append file:
- <literallayout class='monospaced'>
- SRC_URI += "file://myconfig.cfg \
- file://eth.cfg \
- file://gfx.cfg"
- </literallayout>
- </para>
- </section>
+ Follow these steps to create an initramfs image:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Create the initramfs Image Recipe:</emphasis>
+ You can reference the
+ <filename>core-image-minimal-initramfs.bb</filename>
+ recipe found in the <filename>meta/recipes-core</filename>
+ directory of the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ as an example from which to work.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Decide if You Need to Bundle the initramfs Image
+ Into the Kernel Image:</emphasis>
+ If you want the initramfs image that is built to be
+ bundled in with the kernel image, set the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
+ variable to "1" in your <filename>local.conf</filename>
+ configuration file and set the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></ulink>
+ variable in the recipe that builds the kernel image.
+ <note><title>Tip</title>
+ It is recommended that you do bundle the initramfs
+ image with the kernel image to avoid circular
+ dependencies between the kernel recipe and the
+ initramfs recipe should the initramfs image
+ include kernel modules.
+ </note>
+ Setting the <filename>INITRAMFS_IMAGE_BUNDLE</filename>
+ flag causes the initramfs image to be unpacked
+ into the <filename>${B}/usr/</filename> directory.
+ The unpacked initramfs image is then passed to the kernel's
+ <filename>Makefile</filename> using the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></ulink>
+ variable, allowing the initramfs image to be built into
+ the kernel normally.
+ <note>
+ If you choose to not bundle the initramfs image with
+ the kernel image, you are essentially using an
+ <ulink url='https://en.wikipedia.org/wiki/Initrd'>Initial RAM Disk (initrd)</ulink>.
+ Creating an initrd is handled primarily through the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRD_IMAGE'><filename>INITRD_IMAGE</filename></ulink>,
+ <filename>INITRD_LIVE</filename>, and
+ <filename>INITRD_IMAGE_LIVE</filename> variables.
+ For more information, see the
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/image-live.bbclass'><filename>image-live.bbclass</filename></ulink>
+ file.
+ </note>
+ </para></listitem>
+<!--
+Some notes from Cal:
- <section id='fine-tuning-the-kernel-configuration-file'>
- <title>Fine-Tuning the Kernel Configuration File</title>
+ A non-bundled initramfs is essentially an initrd, which I am discovering
+ to be rather confusingly supported in OE at the moment.
- <para>
- You can make sure the <filename>.config</filename> file is as lean or efficient as
- possible by reading the output of the kernel configuration fragment audit,
- noting any issues, making changes to correct the issues, and then repeating.
- </para>
+ Its primarily handled through INITRD_IMAGE(_LIVE/_VM) and INITRD(_LIVE/_VM)
+ variables. INITRD_IMAGE* is the primary image target, which gets added to
+ INITRD*, which is a list of cpio filesystems. You can add more cpio
+ filesystems to the INITRD variable to add more to the initrd. For
+ instance, meta-intel adds intel-microcode via the following:
- <para>
- As part of the kernel build process, the
- <filename>do_kernel_configcheck</filename> task runs.
- This task validates the kernel configuration by checking the final
- <filename>.config</filename> file against the input files.
- During the check, the task produces warning messages for the following
- issues:
- <itemizedlist>
- <listitem><para>Requested options that did not make the final
- <filename>.config</filename> file.</para></listitem>
- <listitem><para>Configuration items that appear twice in the same
- configuration fragment.</para></listitem>
- <listitem><para>Configuration items tagged as "required" that were overridden.
- </para></listitem>
- <listitem><para>A board overrides a non-board specific option.</para></listitem>
- <listitem><para>Listed options not valid for the kernel being processed.
- In other words, the option does not appear anywhere.</para></listitem>
- </itemizedlist>
- <note>
- The <filename>do_kernel_configcheck</filename> task can
- also optionally report if an option is overridden during
- processing.
- </note>
- </para>
+ INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}"
- <para>
- For each output warning, a message points to the file
- that contains a list of the options and a pointer to the
- configuration fragment that defines them.
- Collectively, the files are the key to streamlining the
- configuration.
- </para>
+ If 'intel-ucode' is in MACHINE_FEATURES, this resolves to:
- <para>
- To streamline the configuration, do the following:
- <orderedlist>
- <listitem><para>Start with a full configuration that you
- know works - it builds and boots successfully.
- This configuration file will be your baseline.
- </para></listitem>
- <listitem><para>Separately run the
- <filename>do_kernel_configme</filename> and
- <filename>do_kernel_configcheck</filename> tasks.
- </para></listitem>
- <listitem><para>Take the resulting list of files from the
- <filename>do_kernel_configcheck</filename> task
- warnings and do the following:
- <itemizedlist>
- <listitem><para>
- Drop values that are redefined in the fragment
- but do not change the final
- <filename>.config</filename> file.
- </para></listitem>
- <listitem><para>
- Analyze and potentially drop values from the
- <filename>.config</filename> file that override
- required configurations.
- </para></listitem>
- <listitem><para>
- Analyze and potentially remove non-board
- specific options.
- </para></listitem>
- <listitem><para>
- Remove repeated and invalid options.
- </para></listitem>
- </itemizedlist></para></listitem>
- <listitem><para>
- After you have worked through the output of the kernel
- configuration audit, you can re-run the
- <filename>do_kernel_configme</filename> and
- <filename>do_kernel_configcheck</filename> tasks to
- see the results of your changes.
- If you have more issues, you can deal with them as
- described in the previous step.
- </para></listitem>
- </orderedlist>
- </para>
+ INITRD_LIVE_prepend = "${DEPLOY_DIR_IMAGE}/microcode.cpio "
- <para>
- Iteratively working through steps two through four eventually yields
- a minimal, streamlined configuration file.
- Once you have the best <filename>.config</filename>, you can build the Linux
- Yocto kernel.
- </para>
- </section>
+ Unfortunately you need the full path, and its up to you to sort out
+ dependencies as well. For instance, we have the following:
- <section id='determining-hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase'>
- <title>Determining Hardware and Non-Hardware Features for the Kernel Configuration Audit Phase</title>
+ MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)}"
- <para>
- This section describes part of the kernel configuration audit
- phase that most developers can ignore.
- During this part of the audit phase, the contents of the final
- <filename>.config</filename> file are compared against the
- fragments specified by the system.
- These fragments can be system fragments, distro fragments,
- or user specified configuration elements.
- Regardless of their origin, the OpenEmbedded build system
- warns the user if a specific option is not included in the
- final kernel configuration.
- </para>
+ which resolves to:
- <para>
- In order to not overwhelm the user with configuration warnings,
- by default the system only reports on missing "hardware"
- options because a missing hardware option could mean a boot
- failure or that important hardware is not available.
- </para>
+ MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "intel-microcode"
- <para>
- To determine whether or not a given option is "hardware" or
- "non-hardware", the kernel Metadata contains files that
- classify individual or groups of options as either hardware
- or non-hardware.
- To better show this, consider a situation where the
- Yocto Project kernel cache contains the following files:
- <literallayout class='monospaced'>
- kernel-cache/features/drm-psb/hardware.cfg
- kernel-cache/features/kgdb/hardware.cfg
- kernel-cache/ktypes/base/hardware.cfg
- kernel-cache/bsp/mti-malta32/hardware.cfg
- kernel-cache/bsp/fsl-mpc8315e-rdb/hardware.cfg
- kernel-cache/bsp/qemu-ppc32/hardware.cfg
- kernel-cache/bsp/qemuarma9/hardware.cfg
- kernel-cache/bsp/mti-malta64/hardware.cfg
- kernel-cache/bsp/arm-versatile-926ejs/hardware.cfg
- kernel-cache/bsp/common-pc/hardware.cfg
- kernel-cache/bsp/common-pc-64/hardware.cfg
- kernel-cache/features/rfkill/non-hardware.cfg
- kernel-cache/ktypes/base/non-hardware.cfg
- kernel-cache/features/aufs/non-hardware.kcf
- kernel-cache/features/ocf/non-hardware.kcf
- kernel-cache/ktypes/base/non-hardware.kcf
- kernel-cache/ktypes/base/hardware.kcf
- kernel-cache/bsp/qemu-ppc32/hardware.kcf
- </literallayout>
- The following list provides explanations for the various
- files:
- <itemizedlist>
- <listitem><para><filename>hardware.kcf</filename>:
- Specifies a list of kernel Kconfig files that contain
- hardware options only.
- </para></listitem>
- <listitem><para><filename>non-hardware.kcf</filename>:
- Specifies a list of kernel Kconfig files that contain
- non-hardware options only.
- </para></listitem>
- <listitem><para><filename>hardware.cfg</filename>:
- Specifies a list of kernel
- <filename>CONFIG_</filename> options that are hardware,
- regardless of whether or not they are within a Kconfig
- file specified by a hardware or non-hardware
- Kconfig file (i.e. <filename>hardware.kcf</filename> or
- <filename>non-hardware.kcf</filename>).
- </para></listitem>
- <listitem><para><filename>non-hardware.cfg</filename>:
- Specifies a list of kernel
- <filename>CONFIG_</filename> options that are
- not hardware, regardless of whether or not they are
- within a Kconfig file specified by a hardware or
- non-hardware Kconfig file (i.e.
- <filename>hardware.kcf</filename> or
- <filename>non-hardware.kcf</filename>).
- </para></listitem>
- </itemizedlist>
- Here is a specific example using the
- <filename>kernel-cache/bsp/mti-malta32/hardware.cfg</filename>:
- <literallayout class='monospaced'>
- CONFIG_SERIAL_8250
- CONFIG_SERIAL_8250_CONSOLE
- CONFIG_SERIAL_8250_NR_UARTS
- CONFIG_SERIAL_8250_PCI
- CONFIG_SERIAL_CORE
- CONFIG_SERIAL_CORE_CONSOLE
- CONFIG_VGA_ARB
- </literallayout>
- The kernel configuration audit automatically detects these
- files (hence the names must be exactly the ones discussed here),
- and uses them as inputs when generating warnings about the
- final <filename>.config</filename> file.
- </para>
+ However, the above is only true with the "live" IMAGE_FSTYPE. Wic is
+ another beast entirely, with current wic kickstart files not supporting
+ initrds, and only partial support in the source plugins. That being said,
+ I know the generic bootfs work Ed is working on will help immensely in this
+ aspect. He or Saul can provide more details here.
- <para>
- A user-specified kernel Metadata repository, or recipe space
- feature, can use these same files to classify options that are
- found within its <filename>.cfg</filename> files as hardware
- or non-hardware, to prevent the OpenEmbedded build system from
- producing an error or warning when an option is not in the
- final <filename>.config</filename> file.
- </para>
- </section>
+ Anyhow, its rather fractured and confusing and could probably use a
+ rework honestly. I don't know how feasible it is to document all the
+ details and corner cases of this area.
+-->
+ <listitem><para>
+ <emphasis>Optionally Add Items to the initramfs Image
+ Through the initramfs Image Recipe:</emphasis>
+ If you add items to the initramfs image by way of its
+ recipe, you should use
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>
+ rather than
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>.
+ <filename>PACKAGE_INSTALL</filename> gives more direct
+ control of what is added to the image as compared to
+ the defaults you might not necessarily want that are
+ set by the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
+ or
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-core-image'><filename>core-image</filename></ulink>
+ classes.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Kernel Image and the initramfs
+ Image:</emphasis>
+ Build your kernel image using BitBake.
+ Because the initramfs image recipe is a dependency of the
+ kernel image, the initramfs image is built as well and
+ bundled with the kernel image if you used the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
+ variable described earlier.
+ </para></listitem>
+ </orderedlist>
+ </para>
</section>
- <section id="patching-the-kernel">
- <title>Patching the Kernel</title>
+ <section id='flashing-images-using-bmaptool'>
+ <title>Flashing Images Using <filename>bmaptool</filename></title>
<para>
- Patching the kernel involves changing or adding configurations to an existing kernel,
- changing or adding recipes to the kernel that are needed to support specific hardware features,
- or even altering the source code itself.
- <note>
- You can use the <filename>yocto-kernel</filename> script
- found in the <link linkend='source-directory'>Source Directory</link>
- under <filename>scripts</filename> to manage kernel patches and configuration.
- See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>"
- section in the Yocto Project Board Support Packages (BSP) Developer's Guide for
- more information.</note>
- </para>
-
- <para>
- This example creates a simple patch by adding some QEMU emulator console
- output at boot time through <filename>printk</filename> statements in the kernel's
- <filename>calibrate.c</filename> source code file.
- Applying the patch and booting the modified image causes the added
- messages to appear on the emulator's console.
+ An easy way to flash an image to a bootable device is to use
+ <filename>bmaptool</filename>, which is integrated into the
+ OpenEmbedded build system.
</para>
<para>
- The example assumes a clean build exists for the <filename>qemux86</filename>
- machine in a
- <link linkend='source-directory'>Source Directory</link>
- named <filename>poky</filename>.
- Furthermore, the <link linkend='build-directory'>Build Directory</link> is
- <filename>build</filename> and is located in <filename>poky</filename> and
- the kernel is based on the Linux 3.4 kernel.
+ Following, is an example that shows how to flash a Wic image.
+ <note>
+ You can use <filename>bmaptool</filename> to flash any
+ type of image.
+ </note>
+ Use these steps to flash an image using
+ <filename>bmaptool</filename>:
+ <note>
+ Unless you are able to install the
+ <filename>bmap-tools</filename> package as mentioned in the note
+ in the second bullet of step 3 further down, you will need to build
+ <filename>bmaptool</filename> before using it.
+ Build the tool using the following command:
+ <literallayout class='monospaced'>
+ $ bitbake bmap-tools-native
+ </literallayout>
+ </note>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Update the <filename>local.conf</filename> File:</emphasis>
+ Add the following to your <filename>local.conf</filename>
+ file:
+ <literallayout class='monospaced'>
+ IMAGE_FSTYPES += "wic wic.bmap"
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Get Your Image:</emphasis>
+ Either have your image ready (pre-built) or take the step
+ build the image:
+ <literallayout class='monospaced'>
+ $ bitbake <replaceable>image</replaceable>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Flash the Device:</emphasis>
+ Flash the device with the image by using
+ <filename>bmaptool</filename> depending on your particular
+ setup:
+ <itemizedlist>
+ <listitem><para>
+ If you have write access to the media,
+ use this command form:
+ <literallayout class='monospaced'>
+ $ oe-run-native bmap-tools-native bmaptool copy ./tmp/deploy/images/qemux86-64-core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ If you do not have write access to
+ the media, use the following
+ commands:
+ <literallayout class='monospaced'>
+ $ sudo chmod 666 /dev/sd<replaceable>X</replaceable>
+ $ oe-run-native bmap-tools-native bmaptool copy ./tmp/deploy/images/qemux86-64-core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
+ </literallayout>
+ <note>
+ If you are using Ubuntu or Debian distributions,
+ you can install the
+ <filename>bmap-tools</filename> package using
+ the following command and then use the tool
+ without specifying
+ <filename>PATH</filename> even from the
+ root account:
+ <literallayout class='monospaced'>
+ $ sudo apt-get install bmap-tools
+ </literallayout>
+ </note>
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ </orderedlist>
</para>
<para>
- Also, for more information on patching the kernel, see the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#applying-patches'>Applying Patches</ulink>"
- section in the Yocto Project Linux Kernel Development Manual.
+ For help on the <filename>bmaptool</filename> command, use the
+ following command:
+ <literallayout class='monospaced'>
+ $ bmaptool --help
+ </literallayout>
</para>
-
- <section id='create-a-layer-for-your-changes'>
- <title>Create a Layer for your Changes</title>
-
- <para>
- The first step is to create a layer so you can isolate your
- changes.
- Rather than use the <filename>yocto-layer</filename> script
- to create the layer, this example steps through the process
- by hand.
- If you want information on the script that creates a general
- layer, see the
- "<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
- section.
- </para>
-
- <para>
- These two commands create a directory you can use for your
- layer:
- <literallayout class='monospaced'>
- $ cd ~/poky
- $ mkdir meta-mylayer
- </literallayout>
- Creating a directory that follows the Yocto Project layer naming
- conventions sets up the layer for your changes.
- The layer is where you place your configuration files, append
- files, and patch files.
- To learn more about creating a layer and filling it with the
- files you need, see the "<link linkend='understanding-and-creating-layers'>Understanding
- and Creating Layers</link>" section.
- </para>
- </section>
-
- <section id='finding-the-kernel-source-code'>
- <title>Finding the Kernel Source Code</title>
-
- <para>
- Each time you build a kernel image, the kernel source code is fetched
- and unpacked into the following directory:
- <literallayout class='monospaced'>
- ${S}/linux
- </literallayout>
- See the "<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>"
- section and the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink> variable
- for more information about where source is kept during a build.
- </para>
-
- <para>
- For this example, we are going to patch the
- <filename>init/calibrate.c</filename> file
- by adding some simple console <filename>printk</filename> statements that we can
- see when we boot the image using QEMU.
- </para>
- </section>
-
- <section id='creating-the-patch'>
- <title>Creating the Patch</title>
-
- <para>
- Two methods exist by which you can create the patch:
- <link linkend='using-devtool-in-your-workflow'><filename>devtool</filename></link> and
- <link linkend='using-a-quilt-workflow'>Quilt</link>.
- For kernel patches, the Git workflow is more appropriate.
- This section assumes the Git workflow and shows the steps specific to
- this example.
- <orderedlist>
- <listitem><para><emphasis>Change the working directory</emphasis>:
- Change to where the kernel source code is before making
- your edits to the <filename>calibrate.c</filename> file:
- <literallayout class='monospaced'>
- $ cd ~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-${PV}-${PR}/linux
- </literallayout>
- Because you are working in an established Git repository,
- you must be in this directory in order to commit your changes
- and create the patch file.
- <note>The <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink> and
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink> variables
- represent the version and revision for the
- <filename>linux-yocto</filename> recipe.
- The <filename>PV</filename> variable includes the Git meta and machine
- hashes, which make the directory name longer than you might
- expect.
- </note></para></listitem>
- <listitem><para><emphasis>Edit the source file</emphasis>:
- Edit the <filename>init/calibrate.c</filename> file to have the
- following changes:
- <literallayout class='monospaced'>
- void calibrate_delay(void)
- {
- unsigned long lpj;
- static bool printed;
- int this_cpu = smp_processor_id();
-
- printk("*************************************\n");
- printk("* *\n");
- printk("* HELLO YOCTO KERNEL *\n");
- printk("* *\n");
- printk("*************************************\n");
-
- if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
- .
- .
- .
- </literallayout></para></listitem>
- <listitem><para><emphasis>Stage and commit your changes</emphasis>:
- These Git commands display the modified file, stage it, and then
- commit the file:
- <literallayout class='monospaced'>
- $ git status
- $ git add init/calibrate.c
- $ git commit -m "calibrate: Add printk example"
- </literallayout></para></listitem>
- <listitem><para><emphasis>Generate the patch file</emphasis>:
- This Git command creates the a patch file named
- <filename>0001-calibrate-Add-printk-example.patch</filename>
- in the current directory.
- <literallayout class='monospaced'>
- $ git format-patch -1
- </literallayout>
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='set-up-your-layer-for-the-build'>
- <title>Set Up Your Layer for the Build</title>
-
- <para>These steps get your layer set up for the build:
- <orderedlist>
- <listitem><para><emphasis>Create additional structure</emphasis>:
- Create the additional layer structure:
- <literallayout class='monospaced'>
- $ cd ~/poky/meta-mylayer
- $ mkdir conf
- $ mkdir recipes-kernel
- $ mkdir recipes-kernel/linux
- $ mkdir recipes-kernel/linux/linux-yocto
- </literallayout>
- The <filename>conf</filename> directory holds your configuration files, while the
- <filename>recipes-kernel</filename> directory holds your append file and
- your patch file.</para></listitem>
- <listitem><para><emphasis>Create the layer configuration file</emphasis>:
- Move to the <filename>meta-mylayer/conf</filename> directory and create
- the <filename>layer.conf</filename> file as follows:
- <literallayout class='monospaced'>
- # We have a conf and classes directory, add to BBPATH
- BBPATH .= ":${LAYERDIR}"
-
- # We have recipes-* directories, add to BBFILES
- BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
- ${LAYERDIR}/recipes-*/*/*.bbappend"
-
- BBFILE_COLLECTIONS += "mylayer"
- BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
- BBFILE_PRIORITY_mylayer = "5"
- </literallayout>
- Notice <filename>mylayer</filename> as part of the last three
- statements.</para></listitem>
- <listitem><para><emphasis>Create the kernel recipe append file</emphasis>:
- Move to the <filename>meta-mylayer/recipes-kernel/linux</filename> directory and create
- the <filename>linux-yocto_3.4.bbappend</filename> file as follows:
- <literallayout class='monospaced'>
- FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
- SRC_URI += "file://0001-calibrate-Add-printk-example.patch"
- </literallayout>
- The <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
- and <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- statements enable the OpenEmbedded build system to find the patch file.
- For more information on using append files, see the
- "<link linkend='using-bbappend-files'>Using .bbappend Files in Your Layer</link>"
- section.
- </para></listitem>
- <listitem><para><emphasis>Put the patch file in your layer</emphasis>:
- Move the <filename>0001-calibrate-Add-printk-example.patch</filename> file to
- the <filename>meta-mylayer/recipes-kernel/linux/linux-yocto</filename>
- directory.</para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='set-up-for-the-build'>
- <title>Set Up for the Build</title>
-
- <para>
- Do the following to make sure the build parameters are set up for the example.
- Once you set up these build parameters, they do not have to change unless you
- change the target architecture of the machine you are building:
- <itemizedlist>
- <listitem><para><emphasis>Build for the correct target architecture:</emphasis> Your
- selected <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- definition within the <filename>local.conf</filename> file in the
- <link linkend='build-directory'>Build Directory</link>
- specifies the target architecture used when building the Linux kernel.
- By default, <filename>MACHINE</filename> is set to
- <filename>qemux86</filename>, which specifies a 32-bit
- <trademark class='registered'>Intel</trademark> Architecture
- target machine suitable for the QEMU emulator.</para></listitem>
- <listitem><para><emphasis>Identify your <filename>meta-mylayer</filename>
- layer:</emphasis> The
- <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
- variable in the
- <filename>bblayers.conf</filename> file found in the
- <filename>poky/build/conf</filename> directory needs to have the path to your local
- <filename>meta-mylayer</filename> layer.
- By default, the <filename>BBLAYERS</filename> variable contains paths to
- <filename>meta</filename>, <filename>meta-poky</filename>, and
- <filename>meta-yocto-bsp</filename> in the
- <filename>poky</filename> Git repository.
- Add the path to your <filename>meta-mylayer</filename> location:
- <literallayout class='monospaced'>
- BBLAYERS ?= " \
- $HOME/poky/meta \
- $HOME/poky/meta-poky \
- $HOME/poky/meta-yocto-bsp \
- $HOME/poky/meta-mylayer \
- "
- </literallayout></para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section id='build-the-modified-qemu-kernel-image'>
- <title>Build the Modified QEMU Kernel Image</title>
-
- <para>
- The following steps build your modified kernel image:
- <orderedlist>
- <listitem><para><emphasis>Be sure your build environment is initialized</emphasis>:
- Your environment should be set up since you previously sourced
- the
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- script.
- If it is not, source the script again from <filename>poky</filename>.
- <literallayout class='monospaced'>
- $ cd ~/poky
- $ source &OE_INIT_FILE;
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Clean up</emphasis>:
- Be sure to clean the shared state out by using BitBake
- to run from within the Build Directory the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleansstate'><filename>do_cleansstate</filename></ulink>
- task as follows:
- <literallayout class='monospaced'>
- $ bitbake -c cleansstate linux-yocto
- </literallayout></para>
- <para>
- <note>
- Never remove any files by hand from the
- <filename>tmp/deploy</filename>
- directory inside the
- <link linkend='build-directory'>Build Directory</link>.
- Always use the various BitBake clean tasks to
- clear out previous build artifacts.
- For information on the clean tasks, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-clean'><filename>do_clean</filename></ulink>",
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>",
- and
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleansstate'><filename>do_cleansstate</filename></ulink>"
- sections all in the Yocto Project Reference
- Manual.
- </note>
- </para></listitem>
- <listitem><para><emphasis>Build the image</emphasis>:
- Next, build the kernel image using this command:
- <literallayout class='monospaced'>
- $ bitbake -k linux-yocto
- </literallayout></para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='boot-the-image-and-verify-your-changes'>
- <title>Boot the Image and Verify Your Changes</title>
-
- <para>
- These steps boot the image and allow you to see the changes
- <orderedlist>
- <listitem><para><emphasis>Boot the image</emphasis>:
- Boot the modified image in the QEMU emulator
- using this command:
- <literallayout class='monospaced'>
- $ runqemu qemux86
- </literallayout></para></listitem>
- <listitem><para><emphasis>Verify the changes</emphasis>:
- Log into the machine using <filename>root</filename> with no password and then
- use the following shell command to scroll through the console's boot output.
- <literallayout class='monospaced'>
- # dmesg | less
- </literallayout>
- You should see the results of your <filename>printk</filename> statements
- as part of the output.</para></listitem>
- </orderedlist>
- </para>
- </section>
</section>
<section id='making-images-more-secure'>
@@ -6812,7 +5951,7 @@
The security flags are in the
<filename>meta/conf/distro/include/security_flags.inc</filename>
file in your
- <link linkend='source-directory'>Source Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky</filename>).
<note>
Depending on the recipe, certain security flags are enabled
@@ -6932,8 +6071,8 @@
<para>
When you build an image using the Yocto Project and
do not alter any distribution
- <link linkend='metadata'>Metadata</link>, you are creating a
- Poky distribution.
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
+ you are creating a Poky distribution.
If you wish to gain more control over package alternative
selections, compile-time options, and other low-level
configurations, you can create your own distribution.
@@ -6956,7 +6095,7 @@
configuration file makes it easier to reproduce the same
build configuration when using multiple build machines.
See the
- "<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
+ "<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
section for information on how to quickly set up a layer.
</para></listitem>
<listitem><para><emphasis>Create the distribution configuration file:</emphasis>
@@ -7019,7 +6158,7 @@
previous bulleted item.</para></listitem>
<listitem><para><emphasis>Point to Your distribution configuration file:</emphasis>
In your <filename>local.conf</filename> file in the
- <link linkend='build-directory'>Build Directory</link>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
set your
<ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
variable to point to your distribution's configuration file.
@@ -7044,7 +6183,7 @@
on how to add recipes to your layer, see the
"<link linkend='creating-your-own-layer'>Creating Your Own Layer</link>"
and
- "<link linkend='best-practices-to-follow-when-creating-layers'>Best Practices to Follow When Creating Layers</link>"
+ "<link linkend='best-practices-to-follow-when-creating-layers'>Following Best Practices When Creating Layers</link>"
sections.</para></listitem>
<listitem><para>Add any image recipes that are specific
to your distribution.</para></listitem>
@@ -7079,7 +6218,7 @@
<filename>TEMPLATECONF</filename> to locate the directory
from which it gathers configuration information that ultimately
ends up in the
- <link linkend='build-directory'>Build Directory's</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
<filename>conf</filename> directory.
By default, <filename>TEMPLATECONF</filename> is set as
follows in the <filename>poky</filename> repository:
@@ -7106,7 +6245,7 @@
The <filename>TEMPLATECONF</filename> variable is set in the
<filename>.templateconf</filename> file, which is in the
top-level
- <link linkend='source-directory'>Source Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
folder (e.g. <filename>poky</filename>).
Edit the <filename>.templateconf</filename> so that it can locate
your directory.
@@ -7137,12 +6276,10 @@
Aside from the <filename>*.sample</filename> configuration files,
the <filename>conf-notes.txt</filename> also resides in the
default <filename>meta-poky/conf</filename> directory.
- The scripts that set up the build environment
+ The script that sets up the build environment
(i.e.
- <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>
- and
- <ulink url="&YOCTO_DOCS_REF_URL;#structure-memres-core-script"><filename>oe-init-build-env-memres</filename></ulink>)
- use this file to display BitBake targets as part of the script
+ <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>)
+ uses this file to display BitBake targets as part of the script
output.
Customizing this <filename>conf-notes.txt</filename> file is a
good way to make sure your list of custom targets appears
@@ -7296,7 +6433,7 @@
<para>
To help you see where you currently are with kernel and root
filesystem sizes, you can use two tools found in the
- <link linkend='source-directory'>Source Directory</link> in
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> in
the <filename>scripts/tiny/</filename> directory:
<itemizedlist>
<listitem><para><filename>ksize.py</filename>: Reports
@@ -7328,10 +6465,10 @@
<filename>scripts/kconfig</filename> directory.</para>
<para>For more information on configuration fragments,
see the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
- section of the Yocto Project Linux Kernel Development
- Manual and the "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
- section, which is in this manual.</para></listitem>
+ "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
+ section in the Yocto Project Linux Kernel Development
+ Manual.
+ </para></listitem>
<listitem><para><filename>bitbake -u taskexp -g <replaceable>bitbake_target</replaceable></filename>:
Using the BitBake command with these options brings up
a Dependency Explorer from which you can view file
@@ -7957,7 +7094,7 @@
<para>
As mentioned, attempting to maintain revision numbers in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
is error prone, inaccurate, and causes problems for people
submitting recipes.
Conversely, the PR Service automatically generates
@@ -8032,7 +7169,7 @@
setting
<ulink url='&YOCTO_DOCS_REF_URL;#var-PRSERV_HOST'><filename>PRSERV_HOST</filename></ulink>
in your <filename>local.conf</filename> file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
<literallayout class='monospaced'>
PRSERV_HOST = "localhost:0"
</literallayout>
@@ -8333,7 +7470,7 @@
<filename>connman.inc</filename> file in the
<filename>meta/recipes-connectivity/connman/</filename>
directory of the <filename>poky</filename>
- <link linkend='yocto-project-repositories'>source repository</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>source repository</ulink>.
You can also find examples in
<filename>meta/classes/kernel.bbclass</filename>.
</para>
@@ -8568,7 +7705,7 @@
<listitem><para>
Open the <filename>local.conf</filename> file
inside your
- <link linkend='build-directory'>Build Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
(e.g. <filename>~/poky/build/conf/local.conf</filename>).
</para></listitem>
<listitem><para>
@@ -8738,7 +7875,7 @@
file with the following content:
<literallayout class='monospaced'>
[oe-packages]
- baseurl="http://my.server/rpm/i586 http://my.server/rpm/qemux86 http://my.server/rpm/all"
+ baseurl=http://my.server/rpm/i586 http://my.server/rpm/qemux86 http://my.server/rpm/all
</literallayout>
From the target machine, fetch the repository:
<literallayout class='monospaced'>
@@ -8920,13 +8057,10 @@
<para>
In addition to being able to sign RPM packages, you can
- also enable the OpenEmbedded build system to be able to
- handle previously signed package feeds for IPK
- packages.
- <note>
- The OpenEmbedded build system does not currently
- support signed DPKG or RPM package feeds.
- </note>
+ also enable signed package feeds for IPK and RPM packages.
+ </para>
+
+ <para>
The steps you need to take to enable signed package feed
use are similar to the steps used to sign RPM packages.
You must define the following in your
@@ -9026,7 +8160,7 @@
and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
variables to your <filename>local.conf</filename> file,
which is found in the
- <link linkend='build-directory'>Build Directory</link>:
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
<literallayout class='monospaced'>
DISTRO_FEATURES_append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs"
@@ -9262,8 +8396,8 @@
<para>
By default, the OpenEmbedded build system uses the
- <link linkend='build-directory'>Build Directory</link> when
- building source code.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ when building source code.
The build process involves fetching the source files, unpacking
them, and then patching them if necessary before the build takes
place.
@@ -9627,7 +8761,7 @@
Using either of the following statements in your
image recipe or from within the
<filename>local.conf</filename> file found in the
- <link linkend='build-directory'>Build Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
causes the build system to create a read-only root filesystem:
<literallayout class='monospaced'>
IMAGE_FEATURES = "read-only-rootfs"
@@ -10221,7 +9355,7 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_IMAGE'><filename>TEST_IMAGE</filename></ulink>
variable to "1" in your <filename>local.conf</filename>
file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
<literallayout class='monospaced'>
TEST_IMAGE = "1"
</literallayout>
@@ -10249,7 +9383,7 @@
<para>
All test files reside in
<filename>meta/lib/oeqa/runtime</filename> in the
- <link linkend='source-directory'>Source Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
A test name maps directly to a Python module.
Each test module may contain a number of individual tests.
Tests are usually grouped together by the area
@@ -10353,7 +9487,8 @@
$ bitbake <replaceable>image</replaceable> -c testexport
</literallayout>
Exporting the tests places them in the
- <link linkend='build-directory'>Build Directory</link> in
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ in
<filename>tmp/testexport/</filename><replaceable>image</replaceable>,
which is controlled by the
<filename>TEST_EXPORT_DIR</filename> variable.
@@ -10893,182 +10028,6 @@
</para>
</section>
-<!--
- <section id='platdev-gdb-remotedebug-setup'>
- <title>Set Up the Cross-Development Debugging Environment</title>
-
- <para>
- Before you can initiate a remote debugging session, you need
- to be sure you have set up the cross-development environment,
- toolchain, and sysroot.
- The <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
- describes this process.
- </para>
- </section>
-
- <section id="platdev-gdb-remotedebug-launch-gdbserver">
- <title>Launch gdbserver on the Target</title>
-
- <para>
- Make sure gdbserver is installed on the target.
- If it is not, install the package
- <filename>gdbserver</filename>, which needs the
- <filename>libthread-db1</filename> package.
- </para>
-
- <para>
- Here is an example, that when entered from the host,
- connects to the target and launches gdbserver in order to
- "debug" a binary named <filename>helloworld</filename>:
- <literallayout class='monospaced'>
- $ gdbserver localhost:2345 /usr/bin/helloworld
- </literallayout>
- gdbserver should now be listening on port 2345 for debugging
- commands coming from a remote GDB process that is running on
- the host computer.
- Communication between gdbserver and the host GDB are done
- using TCP.
- To use other communication protocols, please refer to the
- <ulink url='http://www.gnu.org/software/gdb/'>Gdbserver documentation</ulink>.
- </para>
- </section>
-
- <section id="platdev-gdb-remotedebug-launch-gdb">
- <title>Launch GDB on the Host Computer</title>
-
- <para>
- Running GDB on the host computer takes a number of stages, which
- this section describes.
- </para>
-
- <section id="platdev-gdb-remotedebug-launch-gdb-buildcross">
- <title>Build the Cross-GDB Package</title>
- <para>
- A suitable GDB cross-binary is required that runs on your
- host computer but also knows about the the ABI of the
- remote target.
- You can get this binary from the
- <link linkend='cross-development-toolchain'>Cross-Development Toolchain</link>.
- Here is an example where the toolchain has been installed
- in the default directory
- <filename>/opt/poky/&DISTRO;</filename>:
- <literallayout class='monospaced'>
- /opt/poky/&DISTRO;/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
- </literallayout>
- where <filename>arm</filename> is the target architecture
- and <filename>linux-gnueabi</filename> is the target ABI.
- </para>
-
- <para>
- Alternatively, you can use BitBake to build the
- <filename>gdb-cross</filename> binary.
- Here is an example:
- <literallayout class='monospaced'>
- $ bitbake gdb-cross
- </literallayout>
- Once the binary is built, you can find it here:
- <literallayout class='monospaced'>
- tmp/sysroots/<replaceable>host-arch</replaceable>/usr/bin/<replaceable>target-platform</replaceable>/<replaceable>target-abi</replaceable>-gdb
- </literallayout>
- </para>
- </section>
-
- <section id='create-the-gdb-initialization-file'>
- <title>Create the GDB Initialization File and Point to Your Root Filesystem</title>
-
- <para>
- Aside from the GDB cross-binary, you also need a GDB
- initialization file in the same top directory in which
- your binary resides.
- When you start GDB on your host development system, GDB
- finds this initialization file and executes all the
- commands within.
- For information on the <filename>.gdbinit</filename>, see
- "<ulink url='http://sourceware.org/gdb/onlinedocs/gdb/'>Debugging with GDB</ulink>",
- which is maintained by
- <ulink url='http://www.sourceware.org'>sourceware.org</ulink>.
- </para>
-
- <para>
- You need to add a statement in the
- <filename>~/.gdbinit</filename> file that points to your
- root filesystem.
- Here is an example that points to the root filesystem for
- an ARM-based target device:
- <literallayout class='monospaced'>
- set sysroot ~/sysroot_arm
- </literallayout>
- </para>
- </section>
-
- <section id="platdev-gdb-remotedebug-launch-gdb-launchhost">
- <title>Launch the Host GDB</title>
-
- <para>
- Before launching the host GDB, you need to be sure
- you have sourced the cross-debugging environment script,
- which if you installed the root filesystem in the default
- location is at <filename>/opt/poky/&DISTRO;</filename>
- and begins with the string "environment-setup".
- For more information, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's
- Guide</ulink>.
- </para>
-
- <para>
- Finally, switch to the directory where the binary resides
- and run the <filename>cross-gdb</filename> binary.
- Provide the binary file you are going to debug.
- For example, the following command continues with the
- example used in the previous section by loading
- the <filename>helloworld</filename> binary as well as the
- debugging information:
- <literallayout class='monospaced'>
- $ arm-poky-linux-gnuabi-gdb helloworld
- </literallayout>
- The commands in your <filename>.gdbinit</filename> execute
- and the GDB prompt appears.
- </para>
- </section>
- </section>
-
- <section id='platdev-gdb-connect-to-the-remote-gdb-server'>
- <title>Connect to the Remote GDB Server</title>
-
- <para>
- From the target, you need to connect to the remote GDB
- server that is running on the host.
- You need to specify the remote host and port.
- Here is the command continuing with the example:
- <literallayout class='monospaced'>
- target remote 192.168.7.2:2345
- </literallayout>
- </para>
- </section>
-
- <section id="platdev-gdb-remotedebug-launch-gdb-using">
- <title>Use the Debugger</title>
-
- <para>
- You can now proceed with debugging as normal - as if you were debugging
- on the local machine.
- For example, to instruct GDB to break in the "main" function and then
- continue with execution of the inferior binary use the following commands
- from within GDB:
- <literallayout class='monospaced'>
- (gdb) break main
- (gdb) continue
- </literallayout>
- </para>
-
- <para>
- For more information about using GDB, see the project's online documentation at
- <ulink url="http://sourceware.org/gdb/download/onlinedocs/"/>.
- </para>
- </section>
- </section>
--->
-
<section id='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>
<title>Debugging with the GNU Project Debugger (GDB) on the Target</title>
@@ -11347,7 +10306,7 @@
Once the patch file exists, you need to add it back to the
originating recipe folder.
Here is an example assuming a top-level
- <link linkend='source-directory'>Source Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
named <filename>poky</filename>:
<literallayout class='monospaced'>
$ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard
@@ -11407,7 +10366,7 @@
need to submit the fix for the recipe in OE-Core and upstream
so that the problem is taken care of at its source.
See the
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
+ "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
section for more information.
</para>
</section>
@@ -11510,7 +10469,7 @@
release just the source as a tarball.
You can do this by adding the following to the
<filename>local.conf</filename> file found in the
- <link linkend='build-directory'>Build Directory</link>:
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
<literallayout class='monospaced'>
INHERIT += "archiver"
ARCHIVER_MODE[src] = "original"
@@ -11678,8 +10637,8 @@
"
</literallayout>
Creating and providing an archive of the
- <link linkend='metadata'>Metadata</link> layers
- (recipes, configuration files, and so forth)
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
+ layers (recipes, configuration files, and so forth)
enables you to meet your
requirements to include the scripts to control compilation
as well as any modifications to the original source.
@@ -11697,7 +10656,7 @@
browse errors, view statistics, and query for errors.
The tool works using a client-server system where the client
portion is integrated with the installed Yocto Project
- <link linkend='source-directory'>Source Directory</link>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky</filename>).
The server receives the information collected and saves it in a
database.
@@ -11725,7 +10684,7 @@
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-report-error'><filename>report-error</filename></ulink>
class by adding the following statement to the end of
your <filename>local.conf</filename> file in your
- <link linkend='build-directory'>Build Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
<literallayout class='monospaced'>
INHERIT += "report-error"
</literallayout>
@@ -11784,7 +10743,7 @@
To disable the error reporting feature, simply remove or comment
out the following statement from the end of your
<filename>local.conf</filename> file in your
- <link linkend='build-directory'>Build Directory</link>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
<literallayout class='monospaced'>
INHERIT += "report-error"
</literallayout>
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
index 49148abead..47c80061be 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
@@ -4,102 +4,73 @@
<chapter id='dev-manual-intro'>
-<title>The Yocto Project Development Manual</title>
- <section id='dev-intro'>
- <title>Introduction</title>
+<title>The Yocto Project Development Tasks Manual</title>
+ <section id='dev-welcome'>
+ <title>Welcome</title>
<para>
- Welcome to the Yocto Project Development Manual!
- This manual provides information on how to use the Yocto Project to
- develop embedded Linux images and user-space applications that
- run on targeted devices.
- The manual provides an overview of image, kernel, and
- user-space application development using the Yocto Project.
- Because much of the information in this manual is general, it
- contains many references to other sources where you can find more
- detail.
- For example, you can find detailed information on Git, repositories,
- and open source in general in many places on the Internet.
- Another example specific to the Yocto Project is how to quickly
- set up your host development system and build an image, which you
- find in the
- <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+ Welcome to the Yocto Project Development Tasks Manual!
+ This manual provides relevant procedures necessary for developing
+ in the Yocto Project environment (i.e. developing embedded Linux
+ images and user-space applications that run on targeted devices).
+ The manual groups related procedures into higher-level sections.
+ Procedures can consist of high-level steps or low-level steps
+ depending on the topic.
+ You can find conceptual information related to a procedure by
+ following appropriate links to the Yocto Project Reference
+ Manual.
</para>
<para>
- The Yocto Project Development Manual does, however, provide
- guidance and examples on how to change the kernel source code,
- reconfigure the kernel, and develop an application using
- <filename>devtool</filename>.
- </para>
-
- <note>
- By default, using the Yocto Project creates a Poky distribution.
- However, you can create your own distribution by providing key
- <link linkend='metadata'>Metadata</link>.
- A good example is Angstrom, which has had a distribution
- based on the Yocto Project since its inception.
- Other examples include commercial distributions like
- <ulink url='https://www.yoctoproject.org/organization/wind-river-systems'>Wind River Linux</ulink>,
- <ulink url='https://www.yoctoproject.org/organization/mentor-graphics'>Mentor Embedded Linux</ulink>,
- <ulink url='https://www.yoctoproject.org/organization/enea-ab'>ENEA Linux</ulink>
- and <ulink url='https://www.yoctoproject.org/ecosystem/member-organizations'>others</ulink>.
- See the "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
- section for more information.
- </note>
- </section>
-
- <section id='what-this-manual-provides'>
- <title>What This Manual Provides</title>
-
- <para>
The following list describes what you can get from this manual:
<itemizedlist>
- <listitem><para>Information that lets you get set
- up to develop using the Yocto Project.</para></listitem>
- <listitem><para>Information to help developers who are new to
- the open source environment and to the distributed revision
- control system Git, which the Yocto Project uses.
- </para></listitem>
- <listitem><para>An understanding of common end-to-end
- development models and tasks.</para></listitem>
- <listitem><para>Information about common development tasks
- generally used during image development for
- embedded devices.
- </para></listitem>
- <listitem><para>Information on using the Yocto Project
- integration of the QuickEMUlator (QEMU), which lets you
- simulate running on hardware an image you have built using
- the OpenEmbedded build system.
+ <listitem><para>
+ <emphasis>Setup Procedures:</emphasis>
+ Procedures that show you how to set
+ up a Yocto Project Development environment and how
+ to accomplish the change workflow through logging
+ defects and submitting changes.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Emulation Procedures:</emphasis>
+ Procedures that show you how to use the
+ Yocto Project integrated QuickEMUlator (QEMU), which lets
+ you simulate running on hardware an image you have built
+ using the OpenEmbedded build system.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Common Procedures:</emphasis>
+ Procedures related to "everyday" tasks you perform while
+ developing images and applications using the Yocto
+ Project.
</para></listitem>
- <listitem><para>Many references to other sources of related
- information.</para></listitem>
</itemizedlist>
</para>
- </section>
-
- <section id='what-this-manual-does-not-provide'>
- <title>What this Manual Does Not Provide</title>
<para>
This manual will not give you the following:
<itemizedlist>
- <listitem><para><emphasis>Step-by-step instructions when those instructions exist in other Yocto
- Project documentation:</emphasis>
+ <listitem><para>
+ <emphasis>Redundant Step-by-step Instructions:</emphasis>
For example, the
- <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
manual contains detailed instructions on how to install an
SDK, which is used to develop applications for target
hardware.
</para></listitem>
- <listitem><para><emphasis>Reference material:</emphasis>
+ <listitem><para>
+ <emphasis>Reference or Conceptual Material:</emphasis>
This type of material resides in an appropriate reference manual.
For example, system variables are documented in the
<ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
</para></listitem>
- <listitem><para><emphasis>Detailed public information that is not specific to the Yocto Project:</emphasis>
- For example, exhaustive information on how to use Git is covered better through the
- Internet than in this manual.
+ <listitem><para>
+ <emphasis>Detailed Public Information Not Specific to the
+ Yocto Project:</emphasis>
+ For example, exhaustive information on how to use the
+ Source Control Manager Git is better covered with Internet
+ searches and official Git Documentation than through the
+ Yocto Project documentation.
</para></listitem>
</itemizedlist>
</para>
@@ -109,144 +80,23 @@
<title>Other Information</title>
<para>
- Because this manual presents overview information for many different
+ Because this manual presents information for many different
topics, supplemental information is recommended for full
comprehension.
- The following list presents other sources of information you might find helpful:
- <itemizedlist>
- <listitem><para><emphasis><ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
- </emphasis> The home page for the Yocto Project provides lots of information on the project
- as well as links to software and documentation.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:</emphasis>
- This short document lets you get started
- with the Yocto Project and quickly begin building an image.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:</emphasis>
- This manual is a reference
- guide to the OpenEmbedded build system, which is based on BitBake.
- The build system is sometimes referred to as "Poky".
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>:</emphasis>
- This guide provides information that lets you get going
- with the standard or extensible SDK.
- An SDK, with its cross-development toolchains, allows you
- to develop projects inside or outside of the Yocto Project
- environment.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
- This guide defines the structure for BSP components.
- Having a commonly understood structure encourages standardization.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>:</emphasis>
- This manual describes how to work with Linux Yocto kernels as well as provides a bit
- of conceptual information on the construction of the Yocto Linux kernel tree.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>:</emphasis>
- This manual presents a set of common and generally useful tracing and
- profiling schemes along with their applications (as appropriate) to each tool.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>:</emphasis>
- This manual introduces and describes how to set up and use
- Toaster, which is a web interface to the Yocto Project's
- <link linkend='build-system-term'>OpenEmbedded Build System</link>.
- </para></listitem>
-<!--
- <listitem><para><emphasis>
- <ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
- Eclipse IDE Yocto Plug-in</ulink>:</emphasis>
- A step-by-step instructional video that
- demonstrates how an application developer uses Yocto Plug-in features within
- the Eclipse IDE.
- </para></listitem>
--->
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-appendix-latest-yp-eclipse-plug-in'>Eclipse IDE Yocto Plug-in</ulink>:</emphasis>
- Instructions that demonstrate how an application developer
- uses the Eclipse Yocto Project Plug-in feature within
- the Eclipse IDE.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:</emphasis>
- A list of commonly asked questions and their answers.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>:</emphasis>
- Features, updates and known issues for the current
- release of the Yocto Project.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/toaster'>Toaster</ulink>:</emphasis>
- An Application Programming Interface (API) and web-based
- interface to the OpenEmbedded build system, which uses
- BitBake, that reports build information.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/build-appliance'>Build Appliance</ulink>:</emphasis>
- A virtual machine that
- enables you to build and boot a custom embedded Linux image
- with the Yocto Project using a non-Linux development system.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
- The bug tracking application the Yocto Project uses.
- If you find problems with the Yocto Project, you should report them using this
- application.
- </para></listitem>
- <listitem><para><emphasis>Yocto Project Mailing Lists:</emphasis>
- To subscribe to the Yocto Project mailing
- lists, click on the following URLs and follow the instructions:
- <itemizedlist>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink>
- for a Yocto Project Discussions mailing list.
- </para></listitem>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink>
- for a Yocto Project Discussions mailing list about the
- OpenEmbedded build system (Poky).
- </para></listitem>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink>
- for a mailing list to receive official Yocto Project announcements
- as well as Yocto Project milestones.
- </para></listitem>
- <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo'></ulink>
- for a listing of all public mailing lists on
- <filename>lists.yoctoproject.org</filename>.
- </para></listitem>
- </itemizedlist></para></listitem>
- <listitem><para><emphasis>Internet Relay Chat (IRC):</emphasis>
- Two IRC channels on freenode are available
- for Yocto Project and Poky discussions: <filename>#yocto</filename> and
- <filename>#poky</filename>, respectively.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
- The build system used by the Yocto Project.
- This project is the upstream, generic, embedded distribution
- from which the Yocto Project derives its build system (Poky)
- and to which it contributes.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='http://www.openembedded.org/wiki/BitBake'>BitBake</ulink>:</emphasis>
- The tool used by the OpenEmbedded build system
- to process project metadata.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual:</ulink></emphasis>
- A comprehensive guide to the BitBake tool.
- If you want information on BitBake, see this manual.
- </para></listitem>
- <listitem><para><emphasis>
- <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:</emphasis>
- An open-source machine emulator and virtualizer.
- </para></listitem>
- </itemizedlist>
+ For introductory information on the Yocto Project, see the
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
+ You can find an introductory to using the Yocto Project by working
+ through the
+ <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+ </para>
+
+ <para>
+ For a comprehensive list of links and other documentation, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
+ section in the Yocto Project Reference Manual.
+ </para>
+
+ <para>
</para>
</section>
</chapter>
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-model.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-model.xml
deleted file mode 100644
index 1008e11696..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-model.xml
+++ /dev/null
@@ -1,1654 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='dev-manual-model'>
-
-<title>Common Development Models</title>
-
-<para>
- Many development models exist for which you can use the Yocto Project.
- This chapter overviews simple methods that use tools provided by the
- Yocto Project:
- <itemizedlist>
- <listitem><para><emphasis>System Development:</emphasis>
- System Development covers Board Support Package (BSP) development
- and kernel modification or configuration.
- For an example on how to create a BSP, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
- section in the Yocto Project Board Support Package (BSP)
- Developer's Guide.
- For more complete information on how to work with the kernel,
- see the
- <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
- </para></listitem>
- <listitem><para><emphasis>User Application Development:</emphasis>
- User Application Development covers development of applications
- that you intend to run on target hardware.
- For information on how to set up your host development system for
- user-space application development, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
- For a simple example of user-space application development using
- the <trademark class='trade'>Eclipse</trademark> IDE, see the
- "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-developing-applications-using-eclipse'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></ulink>" section.
- </para></listitem>
- <listitem><para><emphasis>Temporary Source Code Modification:</emphasis>
- Direct modification of temporary source code is a convenient
- development model to quickly iterate and develop towards a
- solution.
- Once you implement the solution, you should of course take
- steps to get the changes upstream and applied in the affected
- recipes.
- </para></listitem>
- <listitem><para><emphasis>Image Development using Toaster:</emphasis>
- You can use <ulink url='&YOCTO_HOME_URL;/Tools-resources/projects/toaster'>Toaster</ulink>
- to build custom operating system images within the build
- environment.
- Toaster provides an efficient interface to the OpenEmbedded build
- that allows you to start builds and examine build statistics.
- </para></listitem>
- <listitem><para><emphasis>Using a Development Shell:</emphasis>
- You can use a
- <link linkend='platdev-appdev-devshell'><filename>devshell</filename></link>
- to efficiently debug
- commands or simply edit packages.
- Working inside a development shell is a quick way to set up the
- OpenEmbedded build environment to work on parts of a project.
- </para></listitem>
- </itemizedlist>
-</para>
-
-<section id='system-development-model'>
- <title>System Development Workflow</title>
-
- <para>
- System development involves modification or creation of an image that you want to run on
- a specific hardware target.
- Usually, when you want to create an image that runs on embedded hardware, the image does
- not require the same number of features that a full-fledged Linux distribution provides.
- Thus, you can create a much smaller image that is designed to use only the
- features for your particular hardware.
- </para>
-
- <para>
- To help you understand how system development works in the Yocto Project, this section
- covers two types of image development: BSP creation and kernel modification or
- configuration.
- </para>
-
- <section id='developing-a-board-support-package-bsp'>
- <title>Developing a Board Support Package (BSP)</title>
-
- <para>
- A BSP is a collection of recipes that, when applied during a build, results in
- an image that you can run on a particular board.
- Thus, the package when compiled into the new image, supports the operation of the board.
- </para>
-
- <note>
- For a brief list of terms used when describing the development process in the Yocto Project,
- see the "<link linkend='yocto-project-terms'>Yocto Project Terms</link>" section.
- </note>
-
- <para>
- The remainder of this section presents the basic
- steps used to create a BSP using the Yocto Project's
- <ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>BSP Tools</ulink>.
- Although not required for BSP creation, the
- <filename>meta-intel</filename> repository, which contains
- many BSPs supported by the Yocto Project, is part of the example.
- </para>
-
- <para>
- For an example that shows how to create a new layer using the tools, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
- section in the Yocto Project Board Support Package (BSP) Developer's Guide.
- </para>
-
- <para>
- The following illustration and list summarize the BSP creation general workflow.
- </para>
-
- <para>
- <imagedata fileref="figures/bsp-dev-flow.png" width="6in" depth="7in" align="center" scalefit="1" />
- </para>
-
- <para>
- <orderedlist>
- <listitem><para><emphasis>Set up your host development system to support
- development using the Yocto Project</emphasis>: See the
- "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>"
- and the
- "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>" sections both
- in the Yocto Project Quick Start for requirements.</para></listitem>
- <listitem><para><emphasis>Establish a local copy of the project files on your
- system</emphasis>: You need this <link linkend='source-directory'>Source
- Directory</link> available on your host system.
- Having these files on your system gives you access to the build
- process and to the tools you need.
- For information on how to set up the Source Directory,
- see the
- "<link linkend='getting-setup'>Getting Set Up</link>" section.</para></listitem>
- <listitem><para><emphasis>Establish the <filename>meta-intel</filename>
- repository on your system</emphasis>: Having local copies
- of these supported BSP layers on your system gives you
- access to layers you might be able to build on or modify
- to create your BSP.
- For information on how to get these files, see the
- "<link linkend='getting-setup'>Getting Set Up</link>" section.</para></listitem>
- <listitem><para><emphasis>Create your own BSP layer using the
- <ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></ulink> script</emphasis>:
- Layers are ideal for
- isolating and storing work for a given piece of hardware.
- A layer is really just a location or area in which you place
- the recipes and configurations for your BSP.
- In fact, a BSP is, in itself, a special type of layer.
- The simplest way to create a new BSP layer that is compliant with the
- Yocto Project is to use the <filename>yocto-bsp</filename> script.
- For information about that script, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
- section in the Yocto Project Board Support (BSP) Developer's Guide.
- </para>
-
- <para>
- Another example that illustrates a layer
- is an application.
- Suppose you are creating an application that has
- library or other dependencies in order for it to
- compile and run.
- The layer, in this case, would be where all the
- recipes that define those dependencies are kept.
- The key point for a layer is that it is an isolated
- area that contains all the relevant information for
- the project that the OpenEmbedded build system knows
- about.
- For more information on layers, see the
- "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
- section.
- For more information on BSP layers, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
- section in the Yocto Project Board Support Package (BSP)
- Developer's Guide.
- <note>
- <para>
- Five BSPs exist that are part of the Yocto Project release:
- <filename>beaglebone</filename> (ARM),
- <filename>mpc8315e</filename> (PowerPC),
- and <filename>edgerouter</filename> (MIPS).
- The recipes and configurations for these five BSPs
- are located and dispersed within the
- <link linkend='source-directory'>Source Directory</link>.
- </para>
-
- <para>
- Three core Intel BSPs exist as part of the Yocto
- Project release in the
- <filename>meta-intel</filename> layer:
- <itemizedlist>
- <listitem><para><filename>intel-core2-32</filename>,
- which is a BSP optimized for the Core2 family of CPUs
- as well as all CPUs prior to the Silvermont core.
- </para></listitem>
- <listitem><para><filename>intel-corei7-64</filename>,
- which is a BSP optimized for Nehalem and later
- Core and Xeon CPUs as well as Silvermont and later
- Atom CPUs, such as the Baytrail SoCs.
- </para></listitem>
- <listitem><para><filename>intel-quark</filename>,
- which is a BSP optimized for the Intel Galileo
- gen1 &amp; gen2 development boards.
- </para></listitem>
- </itemizedlist>
- </para>
- </note>
- </para>
-
- <para>When you set up a layer for a new BSP, you should follow a standard layout.
- This layout is described in the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
- section of the Board Support Package (BSP) Development Guide.
- In the standard layout, you will notice a suggested structure for recipes and
- configuration information.
- You can see the standard layout for a BSP by examining
- any supported BSP found in the <filename>meta-intel</filename> layer inside
- the Source Directory.</para></listitem>
- <listitem><para><emphasis>Make configuration changes to your new BSP
- layer</emphasis>: The standard BSP layer structure organizes the files you need
- to edit in <filename>conf</filename> and several <filename>recipes-*</filename>
- directories within the BSP layer.
- Configuration changes identify where your new layer is on the local system
- and identify which kernel you are going to use.
- When you run the <filename>yocto-bsp</filename> script, you are able to interactively
- configure many things for the BSP (e.g. keyboard, touchscreen, and so forth).
- </para></listitem>
- <listitem><para><emphasis>Make recipe changes to your new BSP layer</emphasis>: Recipe
- changes include altering recipes (<filename>.bb</filename> files), removing
- recipes you do not use, and adding new recipes or append files
- (<filename>.bbappend</filename>) that you need to support your hardware.
- </para></listitem>
- <listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
- changes to your BSP layer, there remains a few things
- you need to do for the OpenEmbedded build system in order for it to create your image.
- You need to get the build environment ready by sourcing an environment setup script
- (i.e. <filename>oe-init-build-env</filename> or
- <filename>oe-init-build-env-memres</filename>)
- and you need to be sure two key configuration files are configured appropriately:
- the <filename>conf/local.conf</filename> and the
- <filename>conf/bblayers.conf</filename> file.
- You must make the OpenEmbedded build system aware of your new layer.
- See the
- "<link linkend='enabling-your-layer'>Enabling Your Layer</link>" section
- for information on how to let the build system know about your new layer.</para>
- <para>The entire process for building an image is overviewed in the section
- "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>" section
- of the Yocto Project Quick Start.
- You might want to reference this information.</para></listitem>
- <listitem><para><emphasis>Build the image</emphasis>: The OpenEmbedded build system
- uses the BitBake tool to build images based on the type of image you want to create.
- You can find more information about BitBake in the
- <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
- </para>
- <para>The build process supports several types of images to satisfy different needs.
- See the
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter
- in the Yocto Project Reference Manual for information on
- supported images.</para></listitem>
- </orderedlist>
- </para>
-
- <para>
- You can view a video presentation on "Building Custom Embedded Images with Yocto"
- at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>.
- After going to the page, just search for "Embedded".
- You can also find supplemental information in the
- <ulink url='&YOCTO_DOCS_BSP_URL;'>
- Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
- Finally, there is helpful material and links on this
- <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>wiki page</ulink>.
- Although a bit dated, you might find the information on the wiki
- helpful.
- </para>
- </section>
-
- <section id='modifying-the-kernel'>
- <title><anchor id='kernel-spot' />Modifying the Kernel</title>
-
- <para>
- Kernel modification involves changing the Yocto Project kernel, which could involve changing
- configuration options as well as adding new kernel recipes.
- Configuration changes can be added in the form of configuration fragments, while recipe
- modification comes through the kernel's <filename>recipes-kernel</filename> area
- in a kernel layer you create.
- </para>
-
- <para>
- The remainder of this section presents a high-level overview of the Yocto Project
- kernel architecture and the steps to modify the kernel.
- You can reference the
- "<link linkend='patching-the-kernel'>Patching the Kernel</link>" section
- for an example that changes the source code of the kernel.
- For information on how to configure the kernel, see the
- "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>" section.
- For more information on the kernel and on modifying the kernel, see the
- <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
- </para>
-
- <section id='kernel-overview'>
- <title>Kernel Overview</title>
-
- <para>
- Traditionally, when one thinks of a patched kernel, they think of a base kernel
- source tree and a fixed structure that contains kernel patches.
- The Yocto Project, however, employs mechanisms that, in a sense, result in a kernel source
- generator.
- By the end of this section, this analogy will become clearer.
- </para>
-
- <para>
- You can find a web interface to the Yocto Project kernel source repositories at
- <ulink url='&YOCTO_GIT_URL;'></ulink>.
- If you look at the interface, you will see to the left a grouping of
- Git repositories titled "Yocto Linux Kernel."
- Within this group, you will find several kernels supported by
- the Yocto Project:
- <itemizedlist>
- <listitem><para><emphasis>
- <filename>linux-yocto-3.14</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto
- Project Releases 1.6 and 1.7.
- This kernel is based on the Linux 3.14 released kernel.
- </para></listitem>
- <listitem><para><emphasis>
- <filename>linux-yocto-3.17</filename></emphasis> - An
- additional, unsupported Yocto Project kernel used with
- the Yocto Project Release 1.7.
- This kernel is based on the Linux 3.17 released kernel.
- </para></listitem>
- <listitem><para><emphasis>
- <filename>linux-yocto-3.19</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto
- Project Release 1.8.
- This kernel is based on the Linux 3.19 released kernel.
- </para></listitem>
- <listitem><para><emphasis>
- <filename>linux-yocto-4.1</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto
- Project Release 2.0.
- This kernel is based on the Linux 4.1 released kernel.
- </para></listitem>
- <listitem><para><emphasis>
- <filename>linux-yocto-4.4</filename></emphasis> - The
- stable Yocto Project kernel to use with the Yocto
- Project Release 2.1.
- This kernel is based on the Linux 4.4 released kernel.
- </para></listitem>
- <listitem><para><emphasis>
- <filename>linux-yocto-dev</filename></emphasis> - A
- development kernel based on the latest upstream release
- candidate available.
- </para></listitem>
- </itemizedlist>
- <note>
- Long Term Support Initiative (LTSI) for Yocto Project kernels
- is as follows:
- <itemizedlist>
- <listitem><para>For Yocto Project releases 1.7, 1.8, and 2.0,
- the LTSI kernel is <filename>linux-yocto-3.14</filename>.
- </para></listitem>
- <listitem><para>For Yocto Project release 2.1, the
- LTSI kernel is <filename>linux-yocto-4.1</filename>.
- </para></listitem>
- </itemizedlist>
- </note>
- </para>
-
- <para>
- The kernels are maintained using the Git revision control system
- that structures them using the familiar "tree", "branch", and "leaf" scheme.
- Branches represent diversions from general code to more specific code, while leaves
- represent the end-points for a complete and unique kernel whose source files,
- when gathered from the root of the tree to the leaf, accumulate to create the files
- necessary for a specific piece of hardware and its features.
- The following figure displays this concept:
- <para>
- <imagedata fileref="figures/kernel-overview-1.png"
- width="6in" depth="6in" align="center" scale="100" />
- </para>
-
- <para>
- Within the figure, the "Kernel.org Branch Point" represents the point in the tree
- where a supported base kernel is modified from the Linux kernel.
- For example, this could be the branch point for the <filename>linux-yocto-3.19</filename>
- kernel.
- Thus, everything further to the right in the structure is based on the
- <filename>linux-yocto-3.19</filename> kernel.
- Branch points to the right in the figure represent where the
- <filename>linux-yocto-3.19</filename> kernel is modified for specific hardware
- or types of kernels, such as real-time kernels.
- Each leaf thus represents the end-point for a kernel designed to run on a specific
- targeted device.
- </para>
-
- <para>
- The overall result is a Git-maintained repository from which all the supported
- kernel types can be derived for all the supported devices.
- A big advantage to this scheme is the sharing of common features by keeping them in
- "larger" branches within the tree.
- This practice eliminates redundant storage of similar features shared among kernels.
- </para>
-
- <note>
- Keep in mind the figure does not take into account all the supported Yocto
- Project kernel types, but rather shows a single generic kernel just for conceptual purposes.
- Also keep in mind that this structure represents the Yocto Project source repositories
- that are either pulled from during the build or established on the host development system
- prior to the build by either cloning a particular kernel's Git repository or by
- downloading and unpacking a tarball.
- </note>
-
- <para>
- Upstream storage of all the available kernel source code is one thing, while
- representing and using the code on your host development system is another.
- Conceptually, you can think of the kernel source repositories as all the
- source files necessary for all the supported kernels.
- As a developer, you are just interested in the source files for the kernel on
- which you are working.
- And, furthermore, you need them available on your host system.
- </para>
-
- <para>
- Kernel source code is available on your host system a couple of different
- ways.
- If you are working in the kernel all the time, you probably would want
- to set up your own local Git repository of the kernel tree.
- If you just need to make some patches to the kernel, you can access
- temporary kernel source files that were extracted and used
- during a build.
- We will just talk about working with the temporary source code.
- For more information on how to get kernel source code onto your
- host system, see the
- "<link linkend='local-kernel-files'>Yocto Project Kernel</link>"
- bulleted item earlier in the manual.
- </para>
-
- <para>
- What happens during the build?
- When you build the kernel on your development system, all files needed for the build
- are taken from the source repositories pointed to by the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> variable
- and gathered in a temporary work area
- where they are subsequently used to create the unique kernel.
- Thus, in a sense, the process constructs a local source tree specific to your
- kernel to generate the new kernel image - a source generator if you will.
- </para>
- The following figure shows the temporary file structure
- created on your host system when the build occurs.
- This
- <link linkend='build-directory'>Build Directory</link> contains all the
- source files used during the build.
- </para>
-
- <para>
- <imagedata fileref="figures/kernel-overview-2-generic.png"
- width="6in" depth="5in" align="center" scale="100" />
- </para>
-
- <para>
- Again, for additional information on the Yocto Project kernel's
- architecture and its branching strategy, see the
- <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
- You can also reference the
- "<link linkend='patching-the-kernel'>Patching the Kernel</link>"
- section for a detailed example that modifies the kernel.
- </para>
- </section>
-
- <section id='kernel-modification-workflow'>
- <title>Kernel Modification Workflow</title>
-
- <para>
- This illustration and the following list summarizes the kernel modification general workflow.
- </para>
-
- <para>
- <imagedata fileref="figures/kernel-dev-flow.png"
- width="6in" depth="5in" align="center" scalefit="1" />
- </para>
-
- <para>
- <orderedlist>
- <listitem><para><emphasis>Set up your host development system to support
- development using the Yocto Project</emphasis>: See
- "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>" and
- "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>" sections both
- in the Yocto Project Quick Start for requirements.</para></listitem>
- <listitem><para><emphasis>Establish a local copy of project files on your
- system</emphasis>: Having the <link linkend='source-directory'>Source
- Directory</link> on your system gives you access to the build process and tools
- you need.
- For information on how to get these files, see the bulleted item
- "<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
- </para></listitem>
- <listitem><para><emphasis>Establish the temporary kernel source files</emphasis>:
- Temporary kernel source files are kept in the
- <link linkend='build-directory'>Build Directory</link>
- created by the
- OpenEmbedded build system when you run BitBake.
- If you have never built the kernel in which you are
- interested, you need to run an initial build to
- establish local kernel source files.</para>
- <para>If you are building an image for the first time, you need to get the build
- environment ready by sourcing an environment setup script
- (i.e. <filename>oe-init-build-env</filename> or
- <filename>oe-init-build-env-memres</filename>).
- You also need to be sure two key configuration files
- (<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
- are configured appropriately.</para>
- <para>The entire process for building an image is overviewed in the
- "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
- section of the Yocto Project Quick Start.
- You might want to reference this information.
- You can find more information on BitBake in the
- <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
- </para>
- <para>The build process supports several types of images to satisfy different needs.
- See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
- the Yocto Project Reference Manual for information on supported images.
- </para></listitem>
- <listitem><para><emphasis>Make changes to the kernel source code if
- applicable</emphasis>: Modifying the kernel does not always mean directly
- changing source files.
- However, if you have to do this, you make the changes to the files in the
- Build Directory.</para></listitem>
- <listitem><para><emphasis>Make kernel configuration changes if applicable</emphasis>:
- If your situation calls for changing the kernel's
- configuration, you can use
- <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'><filename>menuconfig</filename></ulink>,
- which allows you to interactively develop and test the
- configuration changes you are making to the kernel.
- Saving changes you make with
- <filename>menuconfig</filename> updates
- the kernel's <filename>.config</filename> file.
- <note><title>Warning</title>
- Try to resist the temptation to directly edit an
- existing <filename>.config</filename> file, which is
- found in the Build Directory at
- <filename>tmp/sysroots/<replaceable>machine-name</replaceable>/kernel</filename>.
- Doing so, can produce unexpected results when the
- OpenEmbedded build system regenerates the configuration
- file.
- </note>
- Once you are satisfied with the configuration
- changes made using <filename>menuconfig</filename>
- and you have saved them, you can directly compare the
- resulting <filename>.config</filename> file against an
- existing original and gather those changes into a
- <link linkend='creating-config-fragments'>configuration fragment file</link>
- to be referenced from within the kernel's
- <filename>.bbappend</filename> file.</para>
-
- <para>Additionally, if you are working in a BSP layer
- and need to modify the BSP's kernel's configuration,
- you can use the
- <ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'><filename>yocto-kernel</filename></ulink>
- script as well as <filename>menuconfig</filename>.
- The <filename>yocto-kernel</filename> script lets
- you interactively set up kernel configurations.
- </para></listitem>
- <listitem><para><emphasis>Rebuild the kernel image with your changes</emphasis>:
- Rebuilding the kernel image applies your changes.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
- </section>
-</section>
-
-<section id='application-development-workflow-using-an-sdk'>
- <title>Application Development Workflow Using an SDK</title>
-
- <para>
- Standard and extensible Software Development Kits (SDK) make it easy
- to develop applications inside or outside of the Yocto Project
- development environment.
- Tools exist to help the application developer during any phase
- of development.
- For information on how to install and use an SDK, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
- </para>
-</section>
-
-<section id="dev-modifying-source-code">
- <title>Modifying Source Code</title>
-
- <para>
- A common development workflow consists of modifying project source
- files that are external to the Yocto Project and then integrating
- that project's build output into an image built using the
- OpenEmbedded build system.
- Given this scenario, development engineers typically want to stick
- to their familiar project development tools and methods, which allows
- them to just focus on the project.
- </para>
-
- <para>
- Several workflows exist that allow you to develop, build, and test
- code that is going to be integrated into an image built using the
- OpenEmbedded build system.
- This section describes two:
- <itemizedlist>
- <listitem><para><emphasis><filename>devtool</filename>:</emphasis>
- A set of tools to aid in working on the source code built by
- the OpenEmbedded build system.
- Section
- "<link linkend='using-devtool-in-your-workflow'>Using <filename>devtool</filename> in Your Workflow</link>"
- describes this workflow.
- If you want more information that showcases the workflow, click
- <ulink url='https://drive.google.com/a/linaro.org/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view'>here</ulink>
- for a presentation by Trevor Woerner that, while somewhat dated,
- provides detailed background information and a complete
- working tutorial.
- </para></listitem>
- <listitem><para><emphasis><ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>:</emphasis>
- A powerful tool that allows you to capture source
- code changes without having a clean source tree.
- While Quilt is not the preferred workflow of the two, this
- section includes it for users that are committed to using
- the tool.
- See the
- "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
- section for more information.
- </para></listitem>
- </itemizedlist>
- </para>
-
- <section id='using-devtool-in-your-workflow'>
- <title>Using <filename>devtool</filename> in Your Workflow</title>
-
- <para>
- As mentioned earlier, <filename>devtool</filename> helps
- you easily develop projects whose build output must be part of
- an image built using the OpenEmbedded build system.
- </para>
-
- <para>
- Three entry points exist that allow you to develop using
- <filename>devtool</filename>:
- <itemizedlist>
- <listitem><para><emphasis><filename>devtool add</filename></emphasis>
- </para></listitem>
- <listitem><para><emphasis><filename>devtool modify</filename></emphasis>
- </para></listitem>
- <listitem><para><emphasis><filename>devtool upgrade</filename></emphasis>
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- The remainder of this section presents these workflows.
- See the
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool</filename>&nbsp;Quick Reference</ulink>"
- in the Yocto Project Reference Manual for a
- <filename>devtool</filename> quick reference.
- </para>
-
- <section id='use-devtool-to-integrate-new-code'>
- <title>Use <filename>devtool add</filename> to Add an Application</title>
-
- <para>
- The <filename>devtool add</filename> command generates
- a new recipe based on existing source code.
- This command takes advantage of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>
- layer that many <filename>devtool</filename> commands
- use.
- The command is flexible enough to allow you to extract source
- code into both the workspace or a separate local Git repository
- and to use existing code that does not need to be extracted.
- </para>
-
- <para>
- Depending on your particular scenario, the arguments and options
- you use with <filename>devtool add</filename> form different
- combinations.
- The following diagram shows common development flows
- you would use with the <filename>devtool add</filename>
- command:
- </para>
-
- <para>
- <imagedata fileref="figures/devtool-add-flow.png" align="center" />
- </para>
-
- <para>
- <orderedlist>
- <listitem><para><emphasis>Generating the New Recipe</emphasis>:
- The top part of the flow shows three scenarios by which
- you could use <filename>devtool add</filename> to
- generate a recipe based on existing source code.</para>
-
- <para>In a shared development environment, it is
- typical where other developers are responsible for
- various areas of source code.
- As a developer, you are probably interested in using
- that source code as part of your development using
- the Yocto Project.
- All you need is access to the code, a recipe, and a
- controlled area in which to do your work.</para>
-
- <para>Within the diagram, three possible scenarios
- feed into the <filename>devtool add</filename> workflow:
- <itemizedlist>
- <listitem><para><emphasis>Left</emphasis>:
- The left scenario represents a common situation
- where the source code does not exist locally
- and needs to be extracted.
- In this situation, you just let it get
- extracted to the default workspace - you do not
- want it in some specific location outside of the
- workspace.
- Thus, everything you need will be located in the
- workspace:
- <literallayout class='monospaced'>
- $ devtool add <replaceable>recipe fetchuri</replaceable>
- </literallayout>
- With this command, <filename>devtool</filename>
- creates a recipe and an append file in the
- workspace as well as extracts the upstream
- source files into a local Git repository also
- within the <filename>sources</filename> folder.
- </para></listitem>
- <listitem><para><emphasis>Middle</emphasis>:
- The middle scenario also represents a situation where
- the source code does not exist locally.
- In this case, the code is again upstream
- and needs to be extracted to some
- local area - this time outside of the default
- workspace.
- If required, <filename>devtool</filename>
- always creates
- a Git repository locally during the extraction.
- Furthermore, the first positional argument
- <replaceable>srctree</replaceable> in this case
- identifies where the
- <filename>devtool add</filename> command
- will locate the extracted code outside of the
- workspace:
- <literallayout class='monospaced'>
- $ devtool add <replaceable>recipe srctree fetchuri</replaceable>
- </literallayout>
- In summary, the source code is pulled from
- <replaceable>fetchuri</replaceable> and extracted
- into the location defined by
- <replaceable>srctree</replaceable> as a local
- Git repository.</para>
-
- <para>Within workspace, <filename>devtool</filename>
- creates both the recipe and an append file
- for the recipe.
- </para></listitem>
- <listitem><para><emphasis>Right</emphasis>:
- The right scenario represents a situation
- where the source tree (srctree) has been
- previously prepared outside of the
- <filename>devtool</filename> workspace.
- </para>
-
- <para>The following command names the recipe
- and identifies where the existing source tree
- is located:
- <literallayout class='monospaced'>
- $ devtool add <replaceable>recipe srctree</replaceable>
- </literallayout>
- The command examines the source code and creates
- a recipe for it placing the recipe into the
- workspace.</para>
-
- <para>Because the extracted source code already exists,
- <filename>devtool</filename> does not try to
- relocate it into the workspace - just the new
- the recipe is placed in the workspace.</para>
-
- <para>Aside from a recipe folder, the command
- also creates an append folder and places an initial
- <filename>*.bbappend</filename> within.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- <listitem><para><emphasis>Edit the Recipe</emphasis>:
- At this point, you can use <filename>devtool edit-recipe</filename>
- to open up the editor as defined by the
- <filename>$EDITOR</filename> environment variable
- and modify the file:
- <literallayout class='monospaced'>
- $ devtool edit-recipe <replaceable>recipe</replaceable>
- </literallayout>
- From within the editor, you can make modifications to the
- recipe that take affect when you build it later.
- </para></listitem>
- <listitem><para><emphasis>Build the Recipe or Rebuild the Image</emphasis>:
- At this point in the flow, the next step you
- take depends on what you are going to do with
- the new code.</para>
- <para>If you need to take the build output and eventually
- move it to the target hardware, you would use
- <filename>devtool build</filename>:
- <literallayout class='monospaced'>
- $ devtool build <replaceable>recipe</replaceable>
- </literallayout></para>
- <para>On the other hand, if you want an image to
- contain the recipe's packages for immediate deployment
- onto a device (e.g. for testing purposes), you can use
- the <filename>devtool build-image</filename> command:
- <literallayout class='monospaced'>
- $ devtool build-image <replaceable>image</replaceable>
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Deploy the Build Output</emphasis>:
- When you use the <filename>devtool build</filename>
- command to build out your recipe, you probably want to
- see if the resulting build output works as expected on target
- hardware.
- <note>
- This step assumes you have a previously built
- image that is already either running in QEMU or
- running on actual hardware.
- Also, it is assumed that for deployment of the image
- to the target, SSH is installed in the image and if
- the image is running on real hardware that you have
- network access to and from your development machine.
- </note>
- You can deploy your build output to that target hardware by
- using the <filename>devtool deploy-target</filename> command:
- <literallayout class='monospaced'>
- $ devtool deploy-target <replaceable>recipe target</replaceable>
- </literallayout>
- The <replaceable>target</replaceable> is a live target machine
- running as an SSH server.</para>
-
- <para>You can, of course, also deploy the image you build
- using the <filename>devtool build-image</filename> command
- to actual hardware.
- However, <filename>devtool</filename> does not provide a
- specific command that allows you to do this.
- </para></listitem>
- <listitem><para>
- <emphasis>Finish Your Work With the Recipe</emphasis>:
- The <filename>devtool finish</filename> command creates
- any patches corresponding to commits in the local
- Git repository, moves the new recipe to a more permanent
- layer, and then resets the recipe so that the recipe is
- built normally rather than from the workspace.
- <literallayout class='monospaced'>
- $ devtool finish <replaceable>recipe layer</replaceable>
- </literallayout>
- <note>
- Any changes you want to turn into patches must be
- committed to the Git repository in the source tree.
- </note></para>
-
- <para>As mentioned, the <filename>devtool finish</filename>
- command moves the final recipe to its permanent layer.
- </para>
-
- <para>As a final process of the
- <filename>devtool finish</filename> command, the state
- of the standard layers and the upstream source is
- restored so that you can build the recipe from those
- areas rather than the workspace.
- <note>
- You can use the <filename>devtool reset</filename>
- command to put things back should you decide you
- do not want to proceed with your work.
- If you do use this command, realize that the source
- tree is preserved.
- </note>
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='devtool-use-devtool-modify-to-enable-work-on-code-associated-with-an-existing-recipe'>
- <title>Use <filename>devtool modify</filename> to Modify the Source of an Existing Component</title>
-
- <para>
- The <filename>devtool modify</filename> command prepares the
- way to work on existing code that already has a recipe in
- place.
- The command is flexible enough to allow you to extract code,
- specify the existing recipe, and keep track of and gather any
- patch files from other developers that are
- associated with the code.
- </para>
-
- <para>
- Depending on your particular scenario, the arguments and options
- you use with <filename>devtool modify</filename> form different
- combinations.
- The following diagram shows common development flows
- you would use with the <filename>devtool modify</filename>
- command:
- </para>
-
- <para>
- <imagedata fileref="figures/devtool-modify-flow.png" align="center" />
- </para>
-
- <para>
- <orderedlist>
- <listitem><para><emphasis>Preparing to Modify the Code</emphasis>:
- The top part of the flow shows three scenarios by which
- you could use <filename>devtool modify</filename> to
- prepare to work on source files.
- Each scenario assumes the following:
- <itemizedlist>
- <listitem><para>The recipe exists in some layer external
- to the <filename>devtool</filename> workspace.
- </para></listitem>
- <listitem><para>The source files exist upstream in an
- un-extracted state or locally in a previously
- extracted state.
- </para></listitem>
- </itemizedlist>
- The typical situation is where another developer has
- created some layer for use with the Yocto Project and
- their recipe already resides in that layer.
- Furthermore, their source code is readily available
- either upstream or locally.
- <itemizedlist>
- <listitem><para><emphasis>Left</emphasis>:
- The left scenario represents a common situation
- where the source code does not exist locally
- and needs to be extracted.
- In this situation, the source is extracted
- into the default workspace location.
- The recipe, in this scenario, is in its own
- layer outside the workspace
- (i.e.
- <filename>meta-</filename><replaceable>layername</replaceable>).
- </para>
-
- <para>The following command identifies the recipe
- and by default extracts the source files:
- <literallayout class='monospaced'>
- $ devtool modify <replaceable>recipe</replaceable>
- </literallayout>
- Once <filename>devtool</filename>locates the recipe,
- it uses the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- variable to locate the source code and
- any local patch files from other developers are
- located.
- <note>
- You cannot provide an URL for
- <replaceable>srctree</replaceable> when using the
- <filename>devtool modify</filename> command.
- </note>
- With this scenario, however, since no
- <replaceable>srctree</replaceable> argument exists, the
- <filename>devtool modify</filename> command by default
- extracts the source files to a Git structure.
- Furthermore, the location for the extracted source is the
- default area within the workspace.
- The result is that the command sets up both the source
- code and an append file within the workspace with the
- recipe remaining in its original location.
- </para></listitem>
- <listitem><para><emphasis>Middle</emphasis>:
- The middle scenario represents a situation where
- the source code also does not exist locally.
- In this case, the code is again upstream
- and needs to be extracted to some
- local area as a Git repository.
- The recipe, in this scenario, is again in its own
- layer outside the workspace.</para>
-
- <para>The following command tells
- <filename>devtool</filename> what recipe with
- which to work and, in this case, identifies a local
- area for the extracted source files that is outside
- of the default workspace:
- <literallayout class='monospaced'>
- $ devtool modify <replaceable>recipe srctree</replaceable>
- </literallayout>
- As with all extractions, the command uses
- the recipe's <filename>SRC_URI</filename> to locate the
- source files.
- Once the files are located, the command by default
- extracts them.
- Providing the <replaceable>srctree</replaceable>
- argument instructs <filename>devtool</filename> where
- place the extracted source.</para>
-
- <para>Within workspace, <filename>devtool</filename>
- creates an append file for the recipe.
- The recipe remains in its original location but
- the source files are extracted to the location you
- provided with <replaceable>srctree</replaceable>.
- </para></listitem>
- <listitem><para><emphasis>Right</emphasis>:
- The right scenario represents a situation
- where the source tree
- (<replaceable>srctree</replaceable>) exists as a
- previously extracted Git structure outside of
- the <filename>devtool</filename> workspace.
- In this example, the recipe also exists
- elsewhere in its own layer.
- </para>
-
- <para>The following command tells
- <filename>devtool</filename> the recipe
- with which to work, uses the "-n" option to indicate
- source does not need to be extracted, and uses
- <replaceable>srctree</replaceable> to point to the
- previously extracted source files:
- <literallayout class='monospaced'>
- $ devtool modify -n <replaceable>recipe srctree</replaceable>
- </literallayout>
- </para>
-
- <para>Once the command finishes, it creates only
- an append file for the recipe in the workspace.
- The recipe and the source code remain in their
- original locations.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- <listitem><para><emphasis>Edit the Source</emphasis>:
- Once you have used the <filename>devtool modify</filename>
- command, you are free to make changes to the source
- files.
- You can use any editor you like to make and save
- your source code modifications.
- </para></listitem>
- <listitem><para><emphasis>Build the Recipe</emphasis>:
- Once you have updated the source files, you can build
- the recipe.
- </para></listitem>
- <listitem><para><emphasis>Deploy the Build Output</emphasis>:
- When you use the <filename>devtool build</filename>
- command to build out your recipe, you probably want to see
- if the resulting build output works as expected on target
- hardware.
- <note>
- This step assumes you have a previously built
- image that is already either running in QEMU or
- running on actual hardware.
- Also, it is assumed that for deployment of the image
- to the target, SSH is installed in the image and if
- the image is running on real hardware that you have
- network access to and from your development machine.
- </note>
- You can deploy your build output to that target hardware by
- using the <filename>devtool deploy-target</filename> command:
- <literallayout class='monospaced'>
- $ devtool deploy-target <replaceable>recipe target</replaceable>
- </literallayout>
- The <replaceable>target</replaceable> is a live target machine
- running as an SSH server.</para>
-
- <para>You can, of course, also deploy the image you build
- using the <filename>devtool build-image</filename> command
- to actual hardware.
- However, <filename>devtool</filename> does not provide a
- specific command that allows you to do this.
- </para></listitem>
- <listitem><para>
- <emphasis>Finish Your Work With the Recipe</emphasis>:
- The <filename>devtool finish</filename> command creates
- any patches corresponding to commits in the local
- Git repository, updates the recipe to point to them
- (or creates a <filename>.bbappend</filename> file to do
- so, depending on the specified destination layer), and
- then resets the recipe so that the recipe is built normally
- rather than from the workspace.
- <literallayout class='monospaced'>
- $ devtool finish <replaceable>recipe layer</replaceable>
- </literallayout>
- <note>
- Any changes you want to turn into patches must be
- committed to the Git repository in the source tree.
- </note></para>
-
- <para>Because there is no need to move the recipe,
- <filename>devtool finish</filename> either updates the
- original recipe in the original layer or the command
- creates a <filename>.bbappend</filename> in a different
- layer as provided by <replaceable>layer</replaceable>.
- </para>
-
- <para>As a final process of the
- <filename>devtool finish</filename> command, the state
- of the standard layers and the upstream source is
- restored so that you can build the recipe from those
- areas rather than the workspace.
- <note>
- You can use the <filename>devtool reset</filename>
- command to put things back should you decide you
- do not want to proceed with your work.
- If you do use this command, realize that the source
- tree is preserved.
- </note>
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>
- <title>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</title>
-
- <para>
- The <filename>devtool upgrade</filename> command updates
- an existing recipe so that you can build it for an updated
- set of source files.
- The command is flexible enough to allow you to specify
- source code revision and versioning schemes, extract code into
- or out of the <filename>devtool</filename> workspace, and
- work with any source file forms that the fetchers support.
- </para>
-
- <para>
- Depending on your particular scenario, the arguments and options
- you use with <filename>devtool upgrade</filename> form different
- combinations.
- The following diagram shows a common development flow
- you would use with the <filename>devtool modify</filename>
- command:
- </para>
-
- <para>
- <imagedata fileref="figures/devtool-upgrade-flow.png" align="center" />
- </para>
-
- <para>
- <orderedlist>
- <listitem><para><emphasis>Initiate the Upgrade</emphasis>:
- The top part of the flow shows a typical scenario by which
- you could use <filename>devtool upgrade</filename>.
- The following conditions exist:
- <itemizedlist>
- <listitem><para>The recipe exists in some layer external
- to the <filename>devtool</filename> workspace.
- </para></listitem>
- <listitem><para>The source files for the new release
- exist adjacent to the same location pointed to by
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- in the recipe (e.g. a tarball with the new version
- number in the name, or as a different revision in
- the upstream Git repository).
- </para></listitem>
- </itemizedlist>
- A common situation is where third-party software has
- undergone a revision so that it has been upgraded.
- The recipe you have access to is likely in your own layer.
- Thus, you need to upgrade the recipe to use the
- newer version of the software:
- <literallayout class='monospaced'>
- $ devtool upgrade -V <replaceable>version recipe</replaceable>
- </literallayout>
- By default, the <filename>devtool upgrade</filename> command
- extracts source code into the <filename>sources</filename>
- directory in the workspace.
- If you want the code extracted to any other location, you
- need to provide the <replaceable>srctree</replaceable>
- positional argument with the command as follows:
- <literallayout class='monospaced'>
- $ devtool upgrade -V <replaceable>version recipe srctree</replaceable>
- </literallayout>
- Also, in this example, the "-V" option is used to specify
- the new version.
- If the source files pointed to by the
- <filename>SRC_URI</filename> statement in the recipe are
- in a Git repository, you must provide the "-S" option and
- specify a revision for the software.</para>
-
- <para>Once <filename>devtool</filename> locates the recipe,
- it uses the <filename>SRC_URI</filename> variable to locate
- the source code and any local patch files from other
- developers are located.
- The result is that the command sets up the source
- code, the new version of the recipe, and an append file
- all within the workspace.
- </para></listitem>
- <listitem><para><emphasis>Resolve any Conflicts created by the Upgrade</emphasis>:
- At this point, there could be some conflicts due to the
- software being upgraded to a new version.
- This would occur if your recipe specifies some patch files in
- <filename>SRC_URI</filename> that conflict with changes
- made in the new version of the software.
- If this is the case, you need to resolve the conflicts
- by editing the source and following the normal
- <filename>git rebase</filename> conflict resolution
- process.</para>
-
- <para>Before moving onto the next step, be sure to resolve any
- such conflicts created through use of a newer or different
- version of the software.
- </para></listitem>
- <listitem><para><emphasis>Build the Recipe</emphasis>:
- Once you have your recipe in order, you can build it.
- You can either use <filename>devtool build</filename> or
- <filename>bitbake</filename>.
- Either method produces build output that is stored
- in
- <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>.
- </para></listitem>
- <listitem><para><emphasis>Deploy the Build Output</emphasis>:
- When you use the <filename>devtool build</filename>
- command or <filename>bitbake</filename> to build out your
- recipe, you probably want to see if the resulting build
- output works as expected on target hardware.
- <note>
- This step assumes you have a previously built
- image that is already either running in QEMU or
- running on actual hardware.
- Also, it is assumed that for deployment of the image
- to the target, SSH is installed in the image and if
- the image is running on real hardware that you have
- network access to and from your development machine.
- </note>
- You can deploy your build output to that target hardware by
- using the <filename>devtool deploy-target</filename> command:
- <literallayout class='monospaced'>
- $ devtool deploy-target <replaceable>recipe target</replaceable>
- </literallayout>
- The <replaceable>target</replaceable> is a live target machine
- running as an SSH server.</para>
-
- <para>You can, of course, also deploy the image you build
- using the <filename>devtool build-image</filename> command
- to actual hardware.
- However, <filename>devtool</filename> does not provide a
- specific command that allows you to do this.
- </para></listitem>
- <listitem><para>
- <emphasis>Finish Your Work With the Recipe</emphasis>:
- The <filename>devtool finish</filename> command creates
- any patches corresponding to commits in the local
- Git repository, moves the new recipe to a more permanent
- layer, and then resets the recipe so that the recipe is
- built normally rather than from the workspace.
- If you specify a destination layer that is the same as
- the original source, then the old version of the
- recipe and associated files will be removed prior to
- adding the new version.
- <literallayout class='monospaced'>
- $ devtool finish <replaceable>recipe layer</replaceable>
- </literallayout>
- <note>
- Any changes you want to turn into patches must be
- committed to the Git repository in the source tree.
- </note></para>
- <para>As a final process of the
- <filename>devtool finish</filename> command, the state
- of the standard layers and the upstream source is
- restored so that you can build the recipe from those
- areas rather than the workspace.
- <note>
- You can use the <filename>devtool reset</filename>
- command to put things back should you decide you
- do not want to proceed with your work.
- If you do use this command, realize that the source
- tree is preserved.
- </note>
- </para></listitem>
- </orderedlist>
- </para>
- </section>
- </section>
-
- <section id="using-a-quilt-workflow">
- <title>Using Quilt in Your Workflow</title>
-
- <para>
- <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
- is a powerful tool that allows you to capture source code changes
- without having a clean source tree.
- This section outlines the typical workflow you can use to modify
- source code, test changes, and then preserve the changes in the
- form of a patch all using Quilt.
- <note><title>Tip</title>
- With regard to preserving changes to source files if you
- clean a recipe or have <filename>rm_work</filename> enabled,
- the workflow described in the
- "<link linkend='using-devtool-in-your-workflow'>Using <filename>devtool</filename> in Your Workflow</link>"
- section is a safer development flow than than the flow that
- uses Quilt.
- </note>
- </para>
-
- <para>
- Follow these general steps:
- <orderedlist>
- <listitem><para><emphasis>Find the Source Code:</emphasis>
- Temporary source code used by the OpenEmbedded build system
- is kept in the
- <link linkend='build-directory'>Build Directory</link>.
- See the
- "<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>"
- section to learn how to locate the directory that has the
- temporary source code for a particular package.
- </para></listitem>
- <listitem><para><emphasis>Change Your Working Directory:</emphasis>
- You need to be in the directory that has the temporary source code.
- That directory is defined by the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
- variable.</para></listitem>
- <listitem><para><emphasis>Create a New Patch:</emphasis>
- Before modifying source code, you need to create a new patch.
- To create a new patch file, use <filename>quilt new</filename> as below:
- <literallayout class='monospaced'>
- $ quilt new my_changes.patch
- </literallayout></para></listitem>
- <listitem><para><emphasis>Notify Quilt and Add Files:</emphasis>
- After creating the patch, you need to notify Quilt about the files
- you plan to edit.
- You notify Quilt by adding the files to the patch you just created:
- <literallayout class='monospaced'>
- $ quilt add file1.c file2.c file3.c
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Edit the Files:</emphasis>
- Make your changes in the source code to the files you added
- to the patch.
- </para></listitem>
- <listitem><para><emphasis>Test Your Changes:</emphasis>
- Once you have modified the source code, the easiest way to
- your changes is by calling the
- <filename>do_compile</filename> task as shown in the
- following example:
- <literallayout class='monospaced'>
- $ bitbake -c compile -f <replaceable>package</replaceable>
- </literallayout>
- The <filename>-f</filename> or <filename>--force</filename>
- option forces the specified task to execute.
- If you find problems with your code, you can just keep editing and
- re-testing iteratively until things work as expected.
- <note>All the modifications you make to the temporary source code
- disappear once you run the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-clean'><filename>do_clean</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>
- tasks using BitBake (i.e.
- <filename>bitbake -c clean <replaceable>package</replaceable></filename>
- and
- <filename>bitbake -c cleanall <replaceable>package</replaceable></filename>).
- Modifications will also disappear if you use the <filename>rm_work</filename>
- feature as described in the
- "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
- section of the Yocto Project Quick Start.
- </note></para></listitem>
- <listitem><para><emphasis>Generate the Patch:</emphasis>
- Once your changes work as expected, you need to use Quilt to generate the final patch that
- contains all your modifications.
- <literallayout class='monospaced'>
- $ quilt refresh
- </literallayout>
- At this point, the <filename>my_changes.patch</filename> file has all your edits made
- to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
- <filename>file3.c</filename> files.</para>
- <para>You can find the resulting patch file in the <filename>patches/</filename>
- subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
- <listitem><para><emphasis>Copy the Patch File:</emphasis>
- For simplicity, copy the patch file into a directory named <filename>files</filename>,
- which you can create in the same directory that holds the recipe
- (<filename>.bb</filename>) file or the
- append (<filename>.bbappend</filename>) file.
- Placing the patch here guarantees that the OpenEmbedded build system will find
- the patch.
- Next, add the patch into the
- <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
- of the recipe.
- Here is an example:
- <literallayout class='monospaced'>
- SRC_URI += "file://my_changes.patch"
- </literallayout></para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='finding-the-temporary-source-code'>
- <title>Finding Temporary Source Code</title>
-
- <para>
- You might find it helpful during development to modify the
- temporary source code used by recipes to build packages.
- For example, suppose you are developing a patch and you need to
- experiment a bit to figure out your solution.
- After you have initially built the package, you can iteratively
- tweak the source code, which is located in the
- <link linkend='build-directory'>Build Directory</link>, and then
- you can force a re-compile and quickly test your altered code.
- Once you settle on a solution, you can then preserve your changes
- in the form of patches.
- If you are using Quilt for development, see the
- "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
- section for more information.
- </para>
-
- <para>
- During a build, the unpacked temporary source code used by recipes
- to build packages is available in the Build Directory as
- defined by the
- <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> variable.
- Below is the default value for the <filename>S</filename> variable as defined in the
- <filename>meta/conf/bitbake.conf</filename> configuration file in the
- <link linkend='source-directory'>Source Directory</link>:
- <literallayout class='monospaced'>
- S = "${WORKDIR}/${BP}"
- </literallayout>
- You should be aware that many recipes override the <filename>S</filename> variable.
- For example, recipes that fetch their source from Git usually set
- <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
- <note>
- The
- <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
- represents the base recipe name, which consists of the name and version:
- <literallayout class='monospaced'>
- BP = "${BPN}-${PV}"
- </literallayout>
- </note>
- </para>
-
- <para>
- The path to the work directory for the recipe
- (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>)
- is defined as follows:
- <literallayout class='monospaced'>
- ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
- </literallayout>
- The actual directory depends on several things:
- <itemizedlist>
- <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
- The top-level build output directory</listitem>
- <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>:
- The target system identifier</listitem>
- <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
- The recipe name</listitem>
- <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTENDPE'><filename>EXTENDPE</filename></ulink>:
- The epoch - (if
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>
- is not specified, which is usually the case for most
- recipes, then <filename>EXTENDPE</filename> is blank)</listitem>
- <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
- The recipe version</listitem>
- <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
- The recipe revision</listitem>
- </itemizedlist>
- </para>
-
- <para>
- As an example, assume a Source Directory top-level folder
- named <filename>poky</filename>, a default Build Directory at
- <filename>poky/build</filename>, and a
- <filename>qemux86-poky-linux</filename> machine target
- system.
- Furthermore, suppose your recipe is named
- <filename>foo_1.3.0.bb</filename>.
- In this case, the work directory the build system uses to
- build the package would be as follows:
- <literallayout class='monospaced'>
- poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
- </literallayout>
- </para>
-
- <para>
- Now that you know where to locate the directory that has the
- temporary source code, you can use a Quilt as described in section
- "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
- to make your edits, test the changes, and preserve the changes in
- the form of patches.
- </para>
- </section>
-</section>
-
-<section id='image-development-using-toaster'>
- <title>Image Development Using Toaster</title>
-
- <para>
- Toaster is a web interface to the Yocto Project's OpenEmbedded build
- system.
- You can initiate builds using Toaster as well as examine the results
- and statistics of builds.
- See the
- <ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-intro'>Toaster User Manual</ulink>
- for information on how to set up and use Toaster to build images.
- </para>
-</section>
-
-<section id="platdev-appdev-devshell">
- <title>Using a Development Shell</title>
-
- <para>
- When debugging certain commands or even when just editing packages,
- <filename>devshell</filename> can be a useful tool.
- When you invoke <filename>devshell</filename>, all tasks up to and
- including
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
- are run for the specified target.
- Then, a new terminal is opened and you are placed in
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>,
- the source directory.
- In the new terminal, all the OpenEmbedded build-related environment variables are
- still defined so you can use commands such as <filename>configure</filename> and
- <filename>make</filename>.
- The commands execute just as if the OpenEmbedded build system were executing them.
- Consequently, working this way can be helpful when debugging a build or preparing
- software to be used with the OpenEmbedded build system.
- </para>
-
- <para>
- Following is an example that uses <filename>devshell</filename> on a target named
- <filename>matchbox-desktop</filename>:
- <literallayout class='monospaced'>
- $ bitbake matchbox-desktop -c devshell
- </literallayout>
- </para>
-
- <para>
- This command spawns a terminal with a shell prompt within the OpenEmbedded build environment.
- The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
- variable controls what type of shell is opened.
- </para>
-
- <para>
- For spawned terminals, the following occurs:
- <itemizedlist>
- <listitem><para>The <filename>PATH</filename> variable includes the
- cross-toolchain.</para></listitem>
- <listitem><para>The <filename>pkgconfig</filename> variables find the correct
- <filename>.pc</filename> files.</para></listitem>
- <listitem><para>The <filename>configure</filename> command finds the
- Yocto Project site files as well as any other necessary files.</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Within this environment, you can run configure or compile
- commands as if they were being run by
- the OpenEmbedded build system itself.
- As noted earlier, the working directory also automatically changes to the
- Source Directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
- </para>
-
- <para>
- To manually run a specific task using <filename>devshell</filename>,
- run the corresponding <filename>run.*</filename> script in
- the
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/temp</filename>
- directory (e.g.,
- <filename>run.do_configure.</filename><replaceable>pid</replaceable>).
- If a task's script does not exist, which would be the case if the task was
- skipped by way of the sstate cache, you can create the task by first running
- it outside of the <filename>devshell</filename>:
- <literallayout class='monospaced'>
- $ bitbake -c <replaceable>task</replaceable>
- </literallayout>
- <note><title>Notes</title>
- <itemizedlist>
- <listitem><para>Execution of a task's <filename>run.*</filename>
- script and BitBake's execution of a task are identical.
- In other words, running the script re-runs the task
- just as it would be run using the
- <filename>bitbake -c</filename> command.
- </para></listitem>
- <listitem><para>Any <filename>run.*</filename> file that does not
- have a <filename>.pid</filename> extension is a
- symbolic link (symlink) to the most recent version of that
- file.
- </para></listitem>
- </itemizedlist>
- </note>
- </para>
-
- <para>
- Remember, that the <filename>devshell</filename> is a mechanism that allows
- you to get into the BitBake task execution environment.
- And as such, all commands must be called just as BitBake would call them.
- That means you need to provide the appropriate options for
- cross-compilation and so forth as applicable.
- </para>
-
- <para>
- When you are finished using <filename>devshell</filename>, exit the shell
- or close the terminal window.
- </para>
-
- <note><title>Notes</title>
- <itemizedlist>
- <listitem><para>
- It is worth remembering that when using <filename>devshell</filename>
- you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
- instead of just using <filename>gcc</filename>.
- The same applies to other applications such as <filename>binutils</filename>,
- <filename>libtool</filename> and so forth.
- BitBake sets up environment variables such as <filename>CC</filename>
- to assist applications, such as <filename>make</filename> to find the correct tools.
- </para></listitem>
- <listitem><para>
- It is also worth noting that <filename>devshell</filename> still works over
- X11 forwarding and similar situations.
- </para></listitem>
- </itemizedlist>
- </note>
-</section>
-
-<section id="platdev-appdev-devpyshell">
- <title>Using a Development Python Shell</title>
-
- <para>
- Similar to working within a development shell as described in
- the previous section, you can also spawn and work within an
- interactive Python development shell.
- When debugging certain commands or even when just editing packages,
- <filename>devpyshell</filename> can be a useful tool.
- When you invoke <filename>devpyshell</filename>, all tasks up to and
- including
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
- are run for the specified target.
- Then a new terminal is opened.
- Additionally, key Python objects and code are available in the same
- way they are to BitBake tasks, in particular, the data store 'd'.
- So, commands such as the following are useful when exploring the data
- store and running functions:
- <literallayout class='monospaced'>
- pydevshell> d.getVar("STAGING_DIR", True)
- '/media/build1/poky/build/tmp/sysroots'
- pydevshell> d.getVar("STAGING_DIR", False)
- '${TMPDIR}/sysroots'
- pydevshell> d.setVar("FOO", "bar")
- pydevshell> d.getVar("FOO", True)
- 'bar'
- pydevshell> d.delVar("FOO")
- pydevshell> d.getVar("FOO", True)
- pydevshell> bb.build.exec_func("do_unpack", d)
- pydevshell>
- </literallayout>
- The commands execute just as if the OpenEmbedded build system were executing them.
- Consequently, working this way can be helpful when debugging a build or preparing
- software to be used with the OpenEmbedded build system.
- </para>
-
- <para>
- Following is an example that uses <filename>devpyshell</filename> on a target named
- <filename>matchbox-desktop</filename>:
- <literallayout class='monospaced'>
- $ bitbake matchbox-desktop -c devpyshell
- </literallayout>
- </para>
-
- <para>
- This command spawns a terminal and places you in an interactive
- Python interpreter within the OpenEmbedded build environment.
- The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
- variable controls what type of shell is opened.
- </para>
-
- <para>
- When you are finished using <filename>devpyshell</filename>, you
- can exit the shell either by using Ctrl+d or closing the terminal
- window.
- </para>
-</section>
-
-</chapter>
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
index ad32ac6291..a0fbb4bfd1 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
@@ -6,63 +6,13 @@
<title>The Yocto Project Open Source Development Environment</title>
-<para>
- This chapter helps you understand the Yocto Project as an open source development project.
- In general, working in an open source environment is very different from working in a
- closed, proprietary environment.
- Additionally, the Yocto Project uses specific tools and constructs as part of its development
- environment.
- This chapter specifically addresses open source philosophy, using the
- Yocto Project in a team environment, source repositories, Yocto Project
- terms, licensing, the open source distributed version control system Git,
- workflows, bug tracking, and how to submit changes.
-</para>
-
-<section id='open-source-philosophy'>
- <title>Open Source Philosophy</title>
-
- <para>
- Open source philosophy is characterized by software development directed by peer production
- and collaboration through an active community of developers.
- Contrast this to the more standard centralized development models used by commercial software
- companies where a finite set of developers produces a product for sale using a defined set
- of procedures that ultimately result in an end product whose architecture and source material
- are closed to the public.
- </para>
-
- <para>
- Open source projects conceptually have differing concurrent agendas, approaches, and production.
- These facets of the development process can come from anyone in the public (community) that has a
- stake in the software project.
- The open source environment contains new copyright, licensing, domain, and consumer issues
- that differ from the more traditional development environment.
- In an open source environment, the end product, source material, and documentation are
- all available to the public at no cost.
- </para>
-
- <para>
- A benchmark example of an open source project is the Linux kernel, which was initially conceived
- and created by Finnish computer science student Linus Torvalds in 1991.
- Conversely, a good example of a non-open source project is the
- <trademark class='registered'>Windows</trademark> family of operating
- systems developed by <trademark class='registered'>Microsoft</trademark> Corporation.
- </para>
-
- <para>
- Wikipedia has a good historical description of the Open Source Philosophy
- <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
- You can also find helpful information on how to participate in the Linux Community
- <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
- </para>
-</section>
-
<section id="usingpoky-changes-collaborate">
- <title>Using the Yocto Project in a Team Environment</title>
+ <title>Setting Up a Team Yocto Project Development Environment</title>
<para>
It might not be immediately clear how you can use the Yocto
- Project in a team environment, or scale it for a large team of
- developers.
+ Project in a team development environment, or scale it for a large
+ team of developers.
One of the strengths of the Yocto Project is that it is extremely
flexible.
Thus, you can adapt it to many different use cases and scenarios.
@@ -71,1505 +21,615 @@
</para>
<para>
- To help with these types of situations, this section presents
- some of the project's most successful experiences,
- practices, solutions, and available technologies that work well.
- Keep in mind, the information here is a starting point.
+ To help you understand how to set up this type of environment,
+ this section presents a procedure that gives you the information
+ to learn how to get the results you want.
+ The procedure is high-level and presents some of the project's most
+ successful experiences, practices, solutions, and available
+ technologies that work well.
+ Keep in mind, the procedure here is a starting point.
You can build off it and customize it to fit any
particular working environment and set of practices.
- </para>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Determine Who is Going to be Developing:</emphasis>
+ You need to understand who is going to be doing anything
+ related to the Yocto Project and what their roles would be.
+ Making this determination is essential to completing the
+ steps two and three, which are to get your equipment together
+ and set up your development environment's hardware topology.
+ </para>
- <section id='best-practices-system-configurations'>
- <title>System Configurations</title>
+ <para>The following roles exist:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Application Development:</emphasis>
+ These types of developers do application level work
+ on top of an existing software stack.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Core System Development:</emphasis>
+ These types of developers work on the contents of the
+ operating system image itself.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build Engineer:</emphasis>
+ This type of developer manages Autobuilders and
+ releases.
+ Not all environments need a Build Engineer.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Test Engineer:</emphasis>
+ This type of developer creates and manages automated
+ tests needed to ensure all application and core
+ system development meets desired quality standards.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Gather the Hardware:</emphasis>
+ Based on the size and make-up of the team, get the hardware
+ together.
+ Any development, build, or test engineer should be using
+ a system that is running a supported Linux distribution.
+ Systems, in general, should be high performance (e.g. dual,
+ six-core Xeons with 24 Gbytes of RAM and plenty of disk space).
+ You can help ensure efficiency by having any machines used
+ for testing or that run Autobuilders be as high performance
+ as possible.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Understand the Hardware Topology of the Environment:</emphasis>
+ Now that you know how many developers and support engineers
+ are required, you can understand the topology of the
+ hardware environment.
+ The following figure shows a moderately sized Yocto Project
+ development environment.
- <para>
- Systems across a large team should meet the needs of
- two types of developers: those working on the contents of the
- operating system image itself and those developing applications.
- Regardless of the type of developer, their workstations must
- be both reasonably powerful and run Linux.
- </para>
+ <para role="writernotes">
+ Need figure.</para>
- <section id='best-practices-application-development'>
- <title>Application Development</title>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Use Git as Your Source Control Manager (SCM):</emphasis>
+ Keeping your
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
+ and any software you are developing under the
+ control of an SCM system that is compatible
+ with the OpenEmbedded build system is advisable.
+ Of the SCMs BitBake supports, the
+ Yocto Project team strongly recommends using
+ <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>.
+ Git is a distributed system that is easy to backup,
+ allows you to work remotely, and then connects back to the
+ infrastructure.
+ <note>
+ For information about BitBake, see the
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+ </note></para>
- <para>
- For developers who mainly do application level work
- on top of an existing software stack,
- the following list shows practices that work best.
- For information on using a Software Development Kit (SDK), see
- the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>:
+ <para>It is relatively easy to set up Git services and create
+ infrastructure like
+ <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>,
+ which is based on server software called
+ <filename>gitolite</filename> with <filename>cgit</filename>
+ being used to generate the web interface that lets you view the
+ repositories.
+ The <filename>gitolite</filename> software identifies users
+ using SSH keys and allows branch-based
+ access controls to repositories that you can control as little
+ or as much as necessary.
+
+ <note>
+ The setup of these services is beyond the scope of this
+ manual.
+ However, sites such as these exist that describe how to
+ perform setup:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>:
+ Describes how to install <filename>gitolite</filename>
+ on the server.
+ </para></listitem>
+ <listitem><para>
+ <ulink url='http://sitaramc.github.com/gitolite/master-toc.html'>The <filename>gitolite</filename> master index</ulink>:
+ All topics for <filename>gitolite</filename>.
+ </para></listitem>
+ <listitem><para>
+ <ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>:
+ Documentation on how to create interfaces and frontends
+ for Git.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Set up the Application Development Machines:</emphasis>
+ As mentioned earlier, application developers are creating
+ applications on top of existing software stacks.
+ Following are some best practices for setting up machines
+ that do application development:
<itemizedlist>
- <listitem><para>Use a pre-built toolchain that
+ <listitem><para>
+ Use a pre-built toolchain that
contains the software stack itself.
Then, develop the application code on top of the
stack.
This method works well for small numbers of relatively
- isolated applications.</para></listitem>
- <listitem><para>When possible, use the Yocto Project
- plug-in for the <trademark class='trade'>Eclipse</trademark> IDE
+ isolated applications.
+ </para></listitem>
+ <listitem><para>
+ When possible, use the Yocto Project
+ plug-in for the
+ <trademark class='trade'>Eclipse</trademark> IDE
and SDK development practices.
For more information, see the
- "<ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>".
+ "<ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>"
+ manual.
</para></listitem>
- <listitem><para>Keep your cross-development toolchains
- updated.
+ <listitem><para>
+ Keep your cross-development toolchains updated.
You can do this through provisioning either as new
toolchain downloads or as updates through a package
update mechanism using <filename>opkg</filename>
to provide updates to an existing toolchain.
The exact mechanics of how and when to do this are a
- question for local policy.</para></listitem>
- <listitem><para>Use multiple toolchains installed locally
+ question for local policy.
+ </para></listitem>
+ <listitem><para>
+ Use multiple toolchains installed locally
into different locations to allow development across
- versions.</para></listitem>
+ versions.
+ </para></listitem>
</itemizedlist>
- </para>
- </section>
-
- <section id='best-practices-core-system-development'>
- <title>Core System Development</title>
-
- <para>
- For core system development, it is often best to have the
- build system itself available on the developer workstations
- so developers can run their own builds and directly
- rebuild the software stack.
- You should keep the core system unchanged as much as
- possible and do your work in layers on top of the core system.
- Doing so gives you a greater level of portability when
- upgrading to new versions of the core system or Board
- Support Packages (BSPs).
- You can share layers amongst the developers of a particular
- project and contain the policy configuration that defines
- the project.
- </para>
-
- <para>
- Aside from the previous best practices, there exists a number
- of tips and tricks that can help speed up core development
- projects:
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Set up the Core Development Machines:</emphasis>
+ As mentioned earlier, these types of developers work on the
+ contents of the operating system itself.
+ Following are some best practices for setting up machines
+ used for developing images:
<itemizedlist>
- <listitem><para>Use a
- <ulink url='&YOCTO_DOCS_REF_URL;#shared-state-cache'>Shared State Cache</ulink>
- (sstate) among groups of developers who are on a
- fast network.
- The best way to share sstate is through a
- Network File System (NFS) share.
- The first user to build a given component for the
- first time contributes that object to the sstate,
- while subsequent builds from other developers then
- reuse the object rather than rebuild it themselves.
- </para>
- <para>Although it is possible to use other protocols for the
- sstate such as HTTP and FTP, you should avoid these.
- Using HTTP limits the sstate to read-only and
- FTP provides poor performance.
+ <listitem><para>
+ Have the Yocto Project build system itself available on
+ the developer workstations so developers can run their own
+ builds and directly rebuild the software stack.
</para></listitem>
- <listitem><para>Have autobuilders contribute to the sstate
- pool similarly to how the developer workstations
- contribute.
- For information, see the
- "<link linkend='best-practices-autobuilders'>Autobuilders</link>"
- section.</para></listitem>
- <listitem><para>Build stand-alone tarballs that contain
- "missing" system requirements if for some reason
- developer workstations do not meet minimum system
- requirements such as latest Python versions,
- <filename>chrpath</filename>, or other tools.
- You can install and relocate the tarball exactly as you
- would the usual cross-development toolchain so that
- all developers can meet minimum version requirements
- on most distributions.</para></listitem>
- <listitem><para>Use a small number of shared,
- high performance systems for testing purposes
- (e.g. dual, six-core Xeons with 24 Gbytes of RAM
- and plenty of disk space).
- Developers can use these systems for wider, more
- extensive testing while they continue to develop
- locally using their primary development system.
+ <listitem><para>
+ Keep the core system unchanged as much as
+ possible and do your work in layers on top of the
+ core system.
+ Doing so gives you a greater level of portability when
+ upgrading to new versions of the core system or Board
+ Support Packages (BSPs).
</para></listitem>
- <listitem><para>Enable the PR Service when package feeds
- need to be incremental with continually increasing
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink>
- values.
- Typically, this situation occurs when you use or
- publish package feeds and use a shared state.
- You should enable the PR Service for all users who
- use the shared state pool.
- For more information on the PR Service, see the
- "<link linkend='working-with-a-pr-service'>Working With a PR Service</link>".
+ <listitem><para>
+ Share layers amongst the developers of a
+ particular project and contain the policy configuration
+ that defines the project.
</para></listitem>
</itemizedlist>
- </para>
- </section>
- </section>
-
- <section id='best-practices-source-control-management'>
- <title>Source Control Management (SCM)</title>
-
- <para>
- Keeping your
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
- and any software you are developing under the
- control of an SCM system that is compatible
- with the OpenEmbedded build system is advisable.
- Of the SCMs BitBake supports, the
- Yocto Project team strongly recommends using
- <link linkend='git'>Git</link>.
- Git is a distributed system that is easy to backup,
- allows you to work remotely, and then connects back to the
- infrastructure.
- <note>
- For information about BitBake, see the
- <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
- </note>
- </para>
-
- <para>
- It is relatively easy to set up Git services and create
- infrastructure like
- <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>,
- which is based on server software called
- <filename>gitolite</filename> with <filename>cgit</filename>
- being used to generate the web interface that lets you view the
- repositories.
- The <filename>gitolite</filename> software identifies users
- using SSH keys and allows branch-based
- access controls to repositories that you can control as little
- or as much as necessary.
- </para>
-
- <note>
- The setup of these services is beyond the scope of this manual.
- However, sites such as these exist that describe how to perform
- setup:
- <itemizedlist>
- <listitem><para><ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>:
- Describes how to install <filename>gitolite</filename>
- on the server.</para></listitem>
- <listitem><para><ulink url='http://sitaramc.github.com/gitolite/master-toc.html'>The <filename>gitolite</filename> master index</ulink>:
- All topics for <filename>gitolite</filename>.
- </para></listitem>
- <listitem><para><ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>:
- Documentation on how to create interfaces and frontends
- for Git.</para></listitem>
- </itemizedlist>
- </note>
- </section>
-
- <section id='best-practices-autobuilders'>
- <title>Autobuilders</title>
-
- <para>
- Autobuilders are often the core of a development project.
- It is here that changes from individual developers are brought
- together and centrally tested and subsequent decisions about
- releases can be made.
- Autobuilders also allow for "continuous integration" style
- testing of software components and regression identification
- and tracking.
- </para>
-
- <para>
- See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>"
- for more information and links to buildbot.
- The Yocto Project team has found this implementation
- works well in this role.
- A public example of this is the Yocto Project
- Autobuilders, which we use to test the overall health of the
- project.
- </para>
-
- <para>
- The features of this system are:
- <itemizedlist>
- <listitem><para>Highlights when commits break the build.
- </para></listitem>
- <listitem><para>Populates an sstate cache from which
- developers can pull rather than requiring local
- builds.</para></listitem>
- <listitem><para>Allows commit hook triggers,
- which trigger builds when commits are made.
- </para></listitem>
- <listitem><para>Allows triggering of automated image booting
- and testing under the QuickEMUlator (QEMU).
- </para></listitem>
- <listitem><para>Supports incremental build testing and
- from-scratch builds.</para></listitem>
- <listitem><para>Shares output that allows developer
- testing and historical regression investigation.
- </para></listitem>
- <listitem><para>Creates output that can be used for releases.
- </para></listitem>
- <listitem><para>Allows scheduling of builds so that resources
- can be used efficiently.</para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section id='best-practices-policies-and-change-flow'>
- <title>Policies and Change Flow</title>
-
- <para>
- The Yocto Project itself uses a hierarchical structure and a
- pull model.
- Scripts exist to create and send pull requests
- (i.e. <filename>create-pull-request</filename> and
- <filename>send-pull-request</filename>).
- This model is in line with other open source projects where
- maintainers are responsible for specific areas of the project
- and a single maintainer handles the final "top-of-tree" merges.
- </para>
-
- <note>
- You can also use a more collective push model.
- The <filename>gitolite</filename> software supports both the
- push and pull models quite easily.
- </note>
-
- <para>
- As with any development environment, it is important
- to document the policy used as well as any main project
- guidelines so they are understood by everyone.
- It is also a good idea to have well structured
- commit messages, which are usually a part of a project's
- guidelines.
- Good commit messages are essential when looking back in time and
- trying to understand why changes were made.
- </para>
-
- <para>
- If you discover that changes are needed to the core layer of the
- project, it is worth sharing those with the community as soon
- as possible.
- Chances are if you have discovered the need for changes, someone
- else in the community needs them also.
- </para>
- </section>
-
- <section id='best-practices-summary'>
- <title>Summary</title>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Set up an Autobuilder:</emphasis>
+ Autobuilders are often the core of the development
+ environment.
+ It is here that changes from individual developers are brought
+ together and centrally tested and subsequent decisions about
+ releases can be made.
+ Autobuilders also allow for "continuous integration" style
+ testing of software components and regression identification
+ and tracking.</para>
+
+ <para>See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>"
+ for more information and links to buildbot.
+ The Yocto Project team has found this implementation
+ works well in this role.
+ A public example of this is the Yocto Project
+ Autobuilders, which we use to test the overall health of the
+ project.</para>
+
+ <para>The features of this system are:
+ <itemizedlist>
+ <listitem><para>
+ Highlights when commits break the build.
+ </para></listitem>
+ <listitem><para>
+ Populates an sstate cache from which
+ developers can pull rather than requiring local
+ builds.
+ </para></listitem>
+ <listitem><para>
+ Allows commit hook triggers,
+ which trigger builds when commits are made.
+ </para></listitem>
+ <listitem><para>
+ Allows triggering of automated image booting
+ and testing under the QuickEMUlator (QEMU).
+ </para></listitem>
+ <listitem><para>
+ Supports incremental build testing and
+ from-scratch builds.
+ </para></listitem>
+ <listitem><para>
+ Shares output that allows developer
+ testing and historical regression investigation.
+ </para></listitem>
+ <listitem><para>
+ Creates output that can be used for releases.
+ </para></listitem>
+ <listitem><para>
+ Allows scheduling of builds so that resources
+ can be used efficiently.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Set up Test Machines:</emphasis>
+ Use a small number of shared, high performance systems
+ for testing purposes.
+ Developers can use these systems for wider, more
+ extensive testing while they continue to develop
+ locally using their primary development system.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Document Policies and Change Flow:</emphasis>
+ The Yocto Project itself uses a hierarchical structure and a
+ pull model.
+ Scripts exist to create and send pull requests
+ (i.e. <filename>create-pull-request</filename> and
+ <filename>send-pull-request</filename>).
+ This model is in line with other open source projects where
+ maintainers are responsible for specific areas of the project
+ and a single maintainer handles the final "top-of-tree" merges.
+ <note>
+ You can also use a more collective push model.
+ The <filename>gitolite</filename> software supports both the
+ push and pull models quite easily.
+ </note></para>
- <para>
- This section summarizes the key recommendations described in the
- previous sections:
- <itemizedlist>
- <listitem><para>Use <link linkend='git'>Git</link>
- as the source control system.</para></listitem>
- <listitem><para>Maintain your Metadata in layers that make sense
- for your situation.
- See the "<link linkend='understanding-and-creating-layers'>Understanding
- and Creating Layers</link>" section for more information on
- layers.</para></listitem>
- <listitem><para>
- Separate the project's Metadata and code by using
- separate Git repositories.
- See the
- "<link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>"
- section for information on these repositories.
- See the
- "<link linkend='getting-setup'>Getting Set Up</link>"
- section for information on how to set up local Git
- repositories for related upstream Yocto Project
- Git repositories.
- </para></listitem>
- <listitem><para>Set up the directory for the shared state cache
- (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
- where it makes sense.
- For example, set up the sstate cache on a system used
- by developers in the same organization and share the
- same source directories on their machines.
- </para></listitem>
- <listitem><para>Set up an Autobuilder and have it populate the
- sstate cache and source directories.</para></listitem>
- <listitem><para>The Yocto Project community encourages you
- to send patches to the project to fix bugs or add features.
- If you do submit patches, follow the project commit
- guidelines for writing good commit messages.
- See the "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- section.</para></listitem>
- <listitem><para>Send changes to the core sooner than later
- as others are likely to run into the same issues.
- For some guidance on mailing lists to use, see the list in the
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- section.
- For a description of the available mailing lists, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
- section in the Yocto Project Reference Manual.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
+ <para>As with any development environment, it is important
+ to document the policy used as well as any main project
+ guidelines so they are understood by everyone.
+ It is also a good idea to have well structured
+ commit messages, which are usually a part of a project's
+ guidelines.
+ Good commit messages are essential when looking back in time and
+ trying to understand why changes were made.</para>
+
+ <para>If you discover that changes are needed to the core
+ layer of the project, it is worth sharing those with the
+ community as soon as possible.
+ Chances are if you have discovered the need for changes,
+ someone else in the community needs them also.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Development Environment Summary:</emphasis>
+ Aside from the previous steps, some best practices exist
+ within the Yocto Project development environment.
+ Consider the following:
+ <itemizedlist>
+ <listitem><para>
+ Use <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>
+ as the source control system.
+ </para></listitem>
+ <listitem><para>
+ Maintain your Metadata in layers that make sense
+ for your situation.
+ See the "<link linkend='understanding-and-creating-layers'>Understanding
+ and Creating Layers</link>" section for more information on
+ layers.
+ </para></listitem>
+ <listitem><para>
+ Separate the project's Metadata and code by using
+ separate Git repositories.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
+ section for information on these repositories.
+ See the
+ "<link linkend='working-with-yocto-project-source-files'>Working With Yocto Project Source Files</link>"
+ section for information on how to set up local Git
+ repositories for related upstream Yocto Project
+ Git repositories.
+ </para></listitem>
+ <listitem><para>
+ Set up the directory for the shared state cache
+ (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
+ where it makes sense.
+ For example, set up the sstate cache on a system used
+ by developers in the same organization and share the
+ same source directories on their machines.
+ </para></listitem>
+ <listitem><para>
+ Set up an Autobuilder and have it populate the
+ sstate cache and source directories.
+ </para></listitem>
+ <listitem><para>
+ The Yocto Project community encourages you
+ to send patches to the project to fix bugs or add features.
+ If you do submit patches, follow the project commit
+ guidelines for writing good commit messages.
+ See the "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ Send changes to the core sooner than later
+ as others are likely to run into the same issues.
+ For some guidance on mailing lists to use, see the list in the
+ "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
+ section.
+ For a description of the available mailing lists, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
+ section in the Yocto Project Reference Manual.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ </orderedlist>
+ </para>
</section>
-<section id='yocto-project-repositories'>
- <title>Yocto Project Source Repositories</title>
+<section id='submitting-a-defect-against-the-yocto-project'>
+ <title>Submitting a Defect Against the Yocto Project</title>
<para>
- The Yocto Project team maintains complete source repositories for all
- Yocto Project files at
- <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
- This web-based source code browser is organized into categories by
- function such as IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and
- so forth.
- From the interface, you can click on any particular item in the "Name"
- column and see the URL at the bottom of the page that you need to clone
- a Git repository for that particular item.
- Having a local Git repository of the
- <link linkend='source-directory'>Source Directory</link>, which is
- usually named "poky", allows
- you to make changes, contribute to the history, and ultimately enhance
- the Yocto Project's tools, Board Support Packages, and so forth.
+ Use the Yocto Project implementation of
+ <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink>
+ to submit a defect (bug) against the Yocto Project.
+ For additional information on this implementation of Bugzilla see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#resources-bugtracker'>Yocto Project Bugzilla</ulink>"
+ section in the Yocto Project Reference Manual.
+ For more detail on any of the following steps, see the Yocto Project
+ <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>.
</para>
<para>
- For any supported release of Yocto Project, you can also go to the
- <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
- select the "Downloads" tab and get a released tarball of the
- <filename>poky</filename> repository or any supported BSP tarballs.
- Unpacking these tarballs gives you a snapshot of the released
- files.
- <note><title>Notes</title>
- <itemizedlist>
- <listitem><para>
- The recommended method for setting up the Yocto Project
- <link linkend='source-directory'>Source Directory</link>
- and the files for supported BSPs
- (e.g., <filename>meta-intel</filename>) is to use
- <link linkend='git'>Git</link> to create a local copy of
- the upstream repositories.
- </para></listitem>
- <listitem><para>
- Be sure to always work in matching branches for both
- the selected BSP repository and the
- <link linkend='source-directory'>Source Directory</link>
- (i.e. <filename>poky</filename>) repository.
- For example, if you have checked out the "master" branch
- of <filename>poky</filename> and you are going to use
- <filename>meta-intel</filename>, be sure to checkout the
- "master" branch of <filename>meta-intel</filename>.
- </para></listitem>
- </itemizedlist>
- </note>
- </para>
+ Use the following general steps to submit a bug"
- <para>
- In summary, here is where you can get the project files needed for development:
- <itemizedlist>
- <listitem><para id='source-repositories'><emphasis><ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink></emphasis>
- This area contains IDE Plugins, Matchbox, Poky, Poky Support, Tools, Yocto Linux Kernel, and Yocto
- Metadata Layers.
- You can create local copies of Git repositories for each of these areas.</para>
- <para>
- <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
- </para></listitem>
- <listitem><para><anchor id='index-downloads' /><emphasis><ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink></emphasis>
- This is an index of releases such as
- the <trademark class='trade'>Eclipse</trademark>
- Yocto Plug-in, miscellaneous support, Poky, Pseudo, installers for cross-development toolchains,
- and all released versions of Yocto Project in the form of images or tarballs.
- Downloading and extracting these files does not produce a local copy of the
- Git repository but rather a snapshot of a particular release or image.</para>
- <para>
- <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="3.5in" />
- </para></listitem>
- <listitem><para><emphasis>"Downloads" page for the
- <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:</emphasis>
- Access this page by going to the website and then selecting
- the "Downloads" tab.
- This page allows you to download any Yocto Project
- release or Board Support Package (BSP) in tarball form.
- The tarballs are similar to those found in the
- <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para>
- <para>
- <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
- </para></listitem>
- </itemizedlist>
- </para>
-</section>
-
-<section id='yocto-project-terms'>
- <title>Yocto Project Terms</title>
-
- <para>
- Following is a list of terms and definitions users new to the Yocto Project development
- environment might find helpful.
- While some of these terms are universal, the list includes them just in case:
- <itemizedlist>
- <listitem><para><emphasis>Append Files:</emphasis> Files that append build information to
- a recipe file.
- Append files are known as BitBake append files and <filename>.bbappend</filename> files.
- The OpenEmbedded build system expects every append file to have a corresponding
- recipe (<filename>.bb</filename>) file.
- Furthermore, the append file and corresponding recipe file
- must use the same root filename.
- The filenames can differ only in the file type suffix used (e.g.
- <filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>).
- </para>
- <para>Information in append files extends or overrides the
- information in the similarly-named recipe file.
- For an example of an append file in use, see the
- "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section.
- <note>
- Append files can also use wildcard patterns in their version numbers
- so they can be applied to more than one version of the underlying recipe file.
- </note>
+ <orderedlist>
+ <listitem><para>
+ Open the Yocto Project implementation of
+ <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>.
</para></listitem>
- <listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis>
- The task executor and scheduler used by the OpenEmbedded build
- system to build images.
- For more information on BitBake, see the
- <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+ <listitem><para>
+ Click "File a Bug" to enter a new bug.
</para></listitem>
- <listitem>
- <para id='build-directory'><emphasis>Build Directory:</emphasis>
- This term refers to the area used by the OpenEmbedded build
- system for builds.
- The area is created when you <filename>source</filename> the
- setup environment script that is found in the Source Directory
- (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
- The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
- variable points to the Build Directory.</para>
-
- <para>
- You have a lot of flexibility when creating the Build
- Directory.
- Following are some examples that show how to create the
- directory.
- The examples assume your
- <link linkend='source-directory'>Source Directory</link> is
- named <filename>poky</filename>:
- <itemizedlist>
- <listitem><para>Create the Build Directory inside your
- Source Directory and let the name of the Build
- Directory default to <filename>build</filename>:
- <literallayout class='monospaced'>
- $ cd $HOME/poky
- $ source &OE_INIT_FILE;
- </literallayout></para></listitem>
- <listitem><para>Create the Build Directory inside your
- home directory and specifically name it
- <filename>test-builds</filename>:
- <literallayout class='monospaced'>
- $ cd $HOME
- $ source poky/&OE_INIT_FILE; test-builds
- </literallayout></para></listitem>
- <listitem><para>
- Provide a directory path and
- specifically name the Build Directory.
- Any intermediate folders in the pathname must
- exist.
- This next example creates a Build Directory named
- <filename>YP-&POKYVERSION;</filename>
- in your home directory within the existing
- directory <filename>mybuilds</filename>:
- <literallayout class='monospaced'>
- $cd $HOME
- $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
- </literallayout></para></listitem>
- </itemizedlist>
- <note>
- By default, the Build Directory contains
- <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>,
- which is a temporary directory the build system uses for
- its work.
- <filename>TMPDIR</filename> cannot be under NFS.
- Thus, by default, the Build Directory cannot be under NFS.
- However, if you need the Build Directory to be under NFS,
- you can set this up by setting <filename>TMPDIR</filename>
- in your <filename>local.conf</filename> file
- to use a local drive.
- Doing so effectively separates <filename>TMPDIR</filename>
- from <filename>TOPDIR</filename>, which is the Build
- Directory.
- </note>
- </para></listitem>
- <listitem><para><emphasis>Classes:</emphasis> Files that provide for logic encapsulation
- and inheritance so that commonly used patterns can be defined once and then easily used
- in multiple recipes.
- For reference information on the Yocto Project classes, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>Classes</ulink>" chapter of the
- Yocto Project Reference Manual.
- Class files end with the <filename>.bbclass</filename> filename extension.
+ <listitem><para>
+ Choose the appropriate "Classification", "Product", and
+ "Component" for which the bug was found.
+ Bugs for the Yocto Project fall into one of several
+ classifications, which in turn break down into several
+ products and components.
+ For example, for a bug against the
+ <filename>meta-intel</filename> layer, you would choose
+ "Build System, Metadata &amp; Runtime", "BSPs", and
+ "bsps-meta-intel", respectively.
</para></listitem>
- <listitem><para><emphasis>Configuration File:</emphasis>
- Configuration information in various <filename>.conf</filename>
- files provides global definitions of variables.
- The <filename>conf/local.conf</filename> configuration file in
- the
- <link linkend='build-directory'>Build Directory</link>
- contains user-defined variables that affect every build.
- The <filename>meta-poky/conf/distro/poky.conf</filename>
- configuration file defines Yocto "distro" configuration
- variables used only when building with this policy.
- Machine configuration files, which
- are located throughout the
- <link linkend='source-directory'>Source Directory</link>, define
- variables for specific hardware and are only used when building
- for that target (e.g. the
- <filename>machine/beaglebone.conf</filename> configuration
- file defines variables for the Texas Instruments ARM Cortex-A8
- development board).
- Configuration files end with a <filename>.conf</filename>
- filename extension.
+ <listitem><para>
+ Choose the "Version" of the Yocto Project for which you found
+ the bug (e.g. &DISTRO;).
</para></listitem>
- <listitem><para id='cross-development-toolchain'>
- <emphasis>Cross-Development Toolchain:</emphasis>
- In general, a cross-development toolchain is a collection of
- software development tools and utilities that run on one
- architecture and allow you to develop software for a
- different, or targeted, architecture.
- These toolchains contain cross-compilers, linkers, and
- debuggers that are specific to the target architecture.
- </para>
-
- <para>The Yocto Project supports two different cross-development
- toolchains:
- <itemizedlist>
- <listitem><para>A toolchain only used by and within
- BitBake when building an image for a target
- architecture.</para></listitem>
- <listitem><para>A relocatable toolchain used outside of
- BitBake by developers when developing applications
- that will run on a targeted device.
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Creation of these toolchains is simple and automated.
- For information on toolchain concepts as they apply to the
- Yocto Project, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
- section in the Yocto Project Reference Manual.
- You can also find more information on using the
- relocatable toolchain in the
- <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ <listitem><para>
+ Determine and select the "Severity" of the bug.
+ The severity indicates how the bug impacted your work.
</para></listitem>
- <listitem><para><emphasis>Image:</emphasis>
- An image is an artifact of the BitBake build process given
- a collection of recipes and related Metadata.
- Images are the binary output that run on specific hardware or
- QEMU and are used for specific use-cases.
- For a list of the supported image types that the Yocto Project provides, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
- chapter in the Yocto Project Reference Manual.</para></listitem>
- <listitem><para id='layer'><emphasis>Layer:</emphasis> A collection of recipes representing the core,
- a BSP, or an application stack.
- For a discussion specifically on BSP Layers, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
- section in the Yocto Project Board Support Packages (BSP)
- Developer's Guide.</para></listitem>
- <listitem><para id='metadata'><emphasis>Metadata:</emphasis>
- The files that BitBake parses when building an image.
- In general, Metadata includes recipes, classes, and
- configuration files.
- In the context of the kernel ("kernel Metadata"),
- it refers to Metadata in the <filename>meta</filename>
- branches of the kernel source Git repositories.
+ <listitem><para>
+ Choose the "Hardware" that the bug impacts.
</para></listitem>
- <listitem><para id='oe-core'><emphasis>OE-Core:</emphasis> A core set of Metadata originating
- with OpenEmbedded (OE) that is shared between OE and the Yocto Project.
- This Metadata is found in the <filename>meta</filename> directory of the
- <link linkend='source-directory'>Source Directory</link>.</para></listitem>
- <listitem><para id='build-system-term'><emphasis>OpenEmbedded Build System:</emphasis>
- The build system specific to the Yocto Project.
- The OpenEmbedded build system is based on another project known
- as "Poky", which uses
- <link linkend='bitbake-term'>BitBake</link> as the task
- executor.
- Throughout the Yocto Project documentation set, the
- OpenEmbedded build system is sometimes referred to simply
- as "the build system".
- If other build systems, such as a host or target build system
- are referenced, the documentation clearly states the
- difference.
- <note>
- For some historical information about Poky, see the
- <link linkend='poky'>Poky</link> term.
- </note>
+ <listitem><para>
+ Choose the "Architecture" that the bug impacts.
</para></listitem>
- <listitem><para><emphasis>Package:</emphasis>
- In the context of the Yocto Project, this term refers to a
- recipe's packaged output produced by BitBake (i.e. a
- "baked recipe").
- A package is generally the compiled binaries produced from the
- recipe's sources.
- You "bake" something by running it through BitBake.</para>
- <para>It is worth noting that the term "package" can, in general, have subtle
- meanings. For example, the packages referred to in the
- "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>" section are
- compiled binaries that, when installed, add functionality to your Linux
- distribution.</para>
- <para>Another point worth noting is that historically within the Yocto Project,
- recipes were referred to as packages - thus, the existence of several BitBake
- variables that are seemingly mis-named,
- (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>,
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
- <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
+ <listitem><para>
+ Choose a "Documentation change" item for the bug.
+ Fixing a bug might or might not affect the Yocto Project
+ documentation.
+ If you are unsure of the impact to the documentation, select
+ "Don't Know".
</para></listitem>
- <listitem><para><emphasis>Package Groups:</emphasis>
- Arbitrary groups of software Recipes.
- You use package groups to hold recipes that, when built,
- usually accomplish a single task.
- For example, a package group could contain the recipes for a
- company’s proprietary or value-add software.
- Or, the package group could contain the recipes that enable
- graphics.
- A package group is really just another recipe.
- Because package group files are recipes, they end with the
- <filename>.bb</filename> filename extension.</para></listitem>
- <listitem><para id='poky'><emphasis>Poky:</emphasis>
- The term "poky" can mean several things.
- In its most general sense, it is an open-source
- project that was initially developed by OpenedHand.
- With OpenedHand, poky was developed off of the existing
- OpenEmbedded build system becoming a commercially
- supportable build system for embedded Linux.
- After Intel Corporation acquired OpenedHand, the
- project poky became the basis for the Yocto Project's
- build system.</para>
- <para>Within the Yocto Project source repositories,
- <filename>poky</filename> exists as a separate Git
- repository you can clone to yield a local copy on your
- host system.
- Thus, "poky" can refer to the local copy of the Source
- Directory used for development within the Yocto
- Project.</para>
- <para>Finally, "poky" can refer to the default
- <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
- (i.e. distribution) created when you use the Yocto
- Project in conjunction with the
- <filename>poky</filename> repository to build an image.
+ <listitem><para>
+ Provide a brief "Summary" of the bug.
+ Try to limit your summary to just a line or two and be sure
+ to capture the essence of the bug.
</para></listitem>
- <listitem><para><emphasis>Recipe:</emphasis>
- A set of instructions for building packages.
- A recipe describes where you get source code, which patches
- to apply, how to configure the source, how to compile it and so on.
- Recipes also describe dependencies for libraries or for other
- recipes.
- Recipes represent the logical unit of execution, the software
- to build, the images to build, and use the
- <filename>.bb</filename> file extension.
+ <listitem><para>
+ Provide a detailed "Description" of the bug.
+ You should provide as much detail as you can about the context,
+ behavior, output, and so forth that surrounds the bug.
+ You can even attach supporting files for output from logs by
+ using the "Add an attachment" button.
</para></listitem>
- <listitem>
- <para id='source-directory'><emphasis>Source Directory:</emphasis>
- This term refers to the directory structure created as a result
- of creating a local copy of the <filename>poky</filename> Git
- repository <filename>git://git.yoctoproject.org/poky</filename>
- or expanding a released <filename>poky</filename> tarball.
- <note>
- Creating a local copy of the <filename>poky</filename>
- Git repository is the recommended method for setting up
- your Source Directory.
- </note>
- Sometimes you might hear the term "poky directory" used to refer
- to this directory structure.
- <note>
- The OpenEmbedded build system does not support file or
- directory names that contain spaces.
- Be sure that the Source Directory you use does not contain
- these types of names.
- </note></para>
-
- <para>The Source Directory contains BitBake, Documentation,
- Metadata and other files that all support the Yocto Project.
- Consequently, you must have the Source Directory in place on
- your development system in order to do any development using
- the Yocto Project.</para>
-
- <para>When you create a local copy of the Git repository, you
- can name the repository anything you like.
- Throughout much of the documentation, "poky"
- is used as the name of the top-level folder of the local copy of
- the poky Git repository.
- So, for example, cloning the <filename>poky</filename> Git
- repository results in a local Git repository whose top-level
- folder is also named "poky".</para>
-
- <para>While it is not recommended that you use tarball expansion
- to set up the Source Directory, if you do, the top-level
- directory name of the Source Directory is derived from the
- Yocto Project release tarball.
- For example, downloading and unpacking
- <filename>&YOCTO_POKY_TARBALL;</filename> results in a
- Source Directory whose root folder is named
- <filename>&YOCTO_POKY;</filename>.</para>
-
- <para>It is important to understand the differences between the
- Source Directory created by unpacking a released tarball as
- compared to cloning
- <filename>git://git.yoctoproject.org/poky</filename>.
- When you unpack a tarball, you have an exact copy of the files
- based on the time of release - a fixed release point.
- Any changes you make to your local files in the Source Directory
- are on top of the release and will remain local only.
- On the other hand, when you clone the <filename>poky</filename>
- Git repository, you have an active development repository with
- access to the upstream repository's branches and tags.
- In this case, any local changes you make to the local
- Source Directory can be later applied to active development
- branches of the upstream <filename>poky</filename> Git
- repository.</para>
-
- <para>For more information on concepts related to Git
- repositories, branches, and tags, see the
- "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>"
- section.</para></listitem>
- <listitem><para><emphasis>Task:</emphasis>
- A unit of execution for BitBake (e.g.
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>,
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>,
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>,
- and so forth).
+ <listitem><para>
+ Click the "Submit Bug" button submit the bug.
+ A new Bugzilla number is assigned to the bug and the defect
+ is logged in the bug tracking system.
</para></listitem>
- <listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories
- that are not local to the development system but located in a master area that is controlled
- by the maintainer of the source code.
- For example, in order for a developer to work on a particular piece of code, they need to
- first get a copy of it from an "upstream" source.</para></listitem>
- </itemizedlist>
+ </orderedlist>
+ Once you file a bug, the bug is processed by the Yocto Project Bug
+ Triage Team and further details concerning the bug are assigned
+ (e.g. priority and owner).
+ You are the "Submitter" of the bug and any further categorization,
+ progress, or comments on the bug result in Bugzilla sending you an
+ automated email concerning the particular change or progress to the
+ bug.
</para>
</section>
-<section id='licensing'>
- <title>Licensing</title>
-
- <para>
- Because open source projects are open to the public, they have different licensing structures in place.
- License evolution for both Open Source and Free Software has an interesting history.
- If you are interested in this history, you can find basic information here:
- <itemizedlist>
- <listitem><para><ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
- </para></listitem>
- <listitem><para><ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license
- history</ulink></para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- In general, the Yocto Project is broadly licensed under the Massachusetts Institute of Technology
- (MIT) License.
- MIT licensing permits the reuse of software within proprietary software as long as the
- license is distributed with that software.
- MIT is also compatible with the GNU General Public License (GPL).
- Patches to the Yocto Project follow the upstream licensing scheme.
- You can find information on the MIT license
- <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
- You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>
- here</ulink>.
- </para>
-
- <para>
- When you build an image using the Yocto Project, the build process uses a
- known list of licenses to ensure compliance.
- You can find this list in the
- <link linkend='source-directory'>Source Directory</link> at
- <filename>meta/files/common-licenses</filename>.
- Once the build completes, the list of all licenses found and used during that build are
- kept in the
- <link linkend='build-directory'>Build Directory</link> at
- <filename>tmp/deploy/licenses</filename>.
- </para>
-
- <para>
- If a module requires a license that is not in the base list, the build process
- generates a warning during the build.
- These tools make it easier for a developer to be certain of the licenses with which
- their shipped products must comply.
- However, even with these tools it is still up to the developer to resolve potential licensing issues.
- </para>
-
- <para>
- The base list of licenses used by the build process is a combination of the Software Package
- Data Exchange (SPDX) list and the Open Source Initiative (OSI) projects.
- <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of the Linux Foundation
- that maintains a specification
- for a standard format for communicating the components, licenses, and copyrights
- associated with a software package.
- <ulink url='http://opensource.org'>OSI</ulink> is a corporation dedicated to the Open Source
- Definition and the effort for reviewing and approving licenses that
- conform to the Open Source Definition (OSD).
- </para>
-
- <para>
- You can find a list of the combined SPDX and OSI licenses that the
- Yocto Project uses in the
- <filename>meta/files/common-licenses</filename> directory in your
- <link linkend='source-directory'>Source Directory</link>.
- </para>
+<section id='how-to-submit-a-change'>
+ <title>Submitting a Change to the Yocto Project</title>
<para>
- For information that can help you maintain compliance with various
- open source licensing during the lifecycle of a product created using
- the Yocto Project, see the
- "<link linkend='maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</link>"
- section.
+ Contributions to the Yocto Project and OpenEmbedded are very welcome.
+ Because the system is extremely configurable and flexible, we recognize
+ that developers will want to extend, configure or optimize it for
+ their specific uses.
</para>
-</section>
-
-<section id='git'>
- <title>Git</title>
<para>
- The Yocto Project makes extensive use of Git,
- which is a free, open source distributed version control system.
- Git supports distributed development, non-linear development, and can handle large projects.
- It is best that you have some fundamental understanding of how Git tracks projects and
- how to work with Git if you are going to use the Yocto Project for development.
- This section provides a quick overview of how Git works and provides you with a summary
- of some essential Git commands.
+ The Yocto Project uses a mailing list and a patch-based workflow
+ that is similar to the Linux kernel but contains important
+ differences.
+ In general, a mailing list exists through which you can submit
+ patches.
+ You should send patches to the appropriate mailing list so that they
+ can be reviewed and merged by the appropriate maintainer.
+ The specific mailing list you need to use depends on the
+ location of the code you are changing.
+ Each component (e.g. layer) should have a
+ <filename>README</filename> file that indicates where to send
+ the changes and which process to follow.
</para>
<para>
- For more information on Git, see
- <ulink url='http://git-scm.com/documentation'></ulink>.
- If you need to download Git, go to <ulink url='http://git-scm.com/download'></ulink>.
+ You can send the patch to the mailing list using whichever approach
+ you feel comfortable with to generate the patch.
+ Once sent, the patch is usually reviewed by the community at large.
+ If somebody has concerns with the patch, they will usually voice
+ their concern over the mailing list.
+ If a patch does not receive any negative reviews, the maintainer of
+ the affected layer typically takes the patch, tests it, and then
+ based on successful testing, merges the patch.
</para>
- <section id='repositories-tags-and-branches'>
- <title>Repositories, Tags, and Branches</title>
-
- <para>
- As mentioned earlier in the section
- "<link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>",
- the Yocto Project maintains source repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
- If you look at this web-interface of the repositories, each item is a separate
- Git repository.
- </para>
-
- <para>
- Git repositories use branching techniques that track content change (not files)
- within a project (e.g. a new feature or updated documentation).
- Creating a tree-like structure based on project divergence allows for excellent historical
- information over the life of a project.
- This methodology also allows for an environment from which you can do lots of
- local experimentation on projects as you develop changes or new features.
- </para>
-
- <para>
- A Git repository represents all development efforts for a given project.
- For example, the Git repository <filename>poky</filename> contains all changes
- and developments for Poky over the course of its entire life.
- That means that all changes that make up all releases are captured.
- The repository maintains a complete history of changes.
- </para>
-
- <para>
- You can create a local copy of any repository by "cloning" it with the Git
- <filename>clone</filename> command.
- When you clone a Git repository, you end up with an identical copy of the
- repository on your development system.
- Once you have a local copy of a repository, you can take steps to develop locally.
- For examples on how to clone Git repositories, see the
- "<link linkend='getting-setup'>Getting Set Up</link>" section.
- </para>
-
- <para>
- It is important to understand that Git tracks content change and
- not files.
- Git uses "branches" to organize different development efforts.
- For example, the <filename>poky</filename> repository has
- several branches that include the current
- <filename>&DISTRO_NAME_NO_CAP;</filename> branch, the
- <filename>master</filename> branch, and many branches for past
- Yocto Project releases.
- You can see all the branches by going to
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
- clicking on the
- <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
- link beneath the "Branch" heading.
- </para>
-
- <para>
- Each of these branches represents a specific area of development.
- The <filename>master</filename> branch represents the current or most recent
- development.
- All other branches represent offshoots of the <filename>master</filename>
- branch.
- </para>
-
- <para>
- When you create a local copy of a Git repository, the copy has the same set
- of branches as the original.
- This means you can use Git to create a local working area (also called a branch)
- that tracks a specific development branch from the source Git repository.
- in other words, you can define your local Git environment to work on any development
- branch in the repository.
- To help illustrate, here is a set of commands that creates a local copy of the
- <filename>poky</filename> Git repository and then creates and checks out a local
- Git branch that tracks the Yocto Project &DISTRO; Release (&DISTRO_NAME;) development:
- <literallayout class='monospaced'>
- $ cd ~
- $ git clone git://git.yoctoproject.org/poky
- $ cd poky
- $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
- </literallayout>
- In this example, the name of the top-level directory of your local
- <link linkend='source-directory'>Source Directory</link>
- is "poky" and the name of that local working area (local branch)
- you just created and checked out is "&DISTRO_NAME_NO_CAP;".
- The files in your local repository now reflect the same files that
- are in the "&DISTRO_NAME_NO_CAP;" development branch of the
- Yocto Project's "poky" upstream repository.
- It is important to understand that when you create and checkout a
- local working branch based on a branch name,
- your local environment matches the "tip" of that development branch
- at the time you created your local branch, which could be
- different from the files at the time of a similarly named release.
- In other words, creating and checking out a local branch based on
- the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
- cloning and checking out the "master" branch.
- Keep reading to see how you create a local snapshot of a Yocto
- Project Release.
- </para>
-
- <para>
- Git uses "tags" to mark specific changes in a repository.
- Typically, a tag is used to mark a special point such as the final
- change before a project is released.
- You can see the tags used with the <filename>poky</filename> Git
- repository by going to
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
- clicking on the
- <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
- link beneath the "Tag" heading.
- </para>
-
- <para>
- Some key tags are
- <filename>dizzy-12.0.0</filename>,
- <filename>fido-13.0.0</filename>,
- <filename>jethro-14.0.0</filename>, and
- <filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
- These tags represent Yocto Project releases.
- </para>
-
- <para>
- When you create a local copy of the Git repository, you also have access to all the
- tags.
- Similar to branches, you can create and checkout a local working Git branch based
- on a tag name.
- When you do this, you get a snapshot of the Git repository that reflects
- the state of the files when the change was made associated with that tag.
- The most common use is to checkout a working branch that matches a specific
- Yocto Project release.
- Here is an example:
- <literallayout class='monospaced'>
- $ cd ~
- $ git clone git://git.yoctoproject.org/poky
- $ cd poky
- $ git checkout -b my-&DISTRO_NAME_NO_CAP;-&POKYVERSION; &DISTRO_NAME_NO_CAP;-&POKYVERSION;
- </literallayout>
- In this example, the name of the top-level directory of your local Yocto Project
- Files Git repository is <filename>poky</filename>.
- And, the name of the local branch you have created and checked out is
- <filename>my-&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
- The files in your repository now exactly match the Yocto Project &DISTRO;
- Release tag (<filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>).
- It is important to understand that when you create and checkout a local
- working branch based on a tag, your environment matches a specific point
- in time and not the entire development branch.
- </para>
- </section>
-
- <section id='basic-commands'>
- <title>Basic Commands</title>
-
- <para>
- Git has an extensive set of commands that lets you manage changes and perform
- collaboration over the life of a project.
- Conveniently though, you can manage with a small set of basic operations and workflows
- once you understand the basic philosophy behind Git.
- You do not have to be an expert in Git to be functional.
- A good place to look for instruction on a minimal set of Git commands is
- <ulink url='http://git-scm.com/documentation'>here</ulink>.
- If you need to download Git, you can do so
- <ulink url='http://git-scm.com/download'>here</ulink>, although
- any reasonably current Linux distribution should already have an
- installable package for Git.
- </para>
-
- <para>
- If you do not know much about Git, you should educate
- yourself by visiting the links previously mentioned.
- </para>
-
- <para>
- The following list briefly describes some basic Git operations as a way to get started.
- As with any set of commands, this list (in most cases) simply shows the base command and
- omits the many arguments they support.
- See the Git documentation for complete descriptions and strategies on how to use these commands:
- <itemizedlist>
- <listitem><para><emphasis><filename>git init</filename>:</emphasis> Initializes an empty Git repository.
- You cannot use Git commands unless you have a <filename>.git</filename> repository.</para></listitem>
- <listitem><para><emphasis><filename>git clone</filename>:</emphasis>
- Creates a local clone of a Git repository.
- During collaboration, this command allows you to create a
- local Git repository that is on equal footing with a fellow
- developer’s Git repository.
- </para></listitem>
- <listitem><para><emphasis><filename>git add</filename>:</emphasis> Stages updated file contents
- to the index that
- Git uses to track changes.
- You must stage all files that have changed before you can commit them.</para></listitem>
- <listitem><para><emphasis><filename>git commit</filename>:</emphasis> Creates a "commit" that documents
- the changes you made.
- Commits are used for historical purposes, for determining if a maintainer of a project
- will allow the change, and for ultimately pushing the change from your local Git repository
- into the project’s upstream (or master) repository.</para></listitem>
- <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
- possibly need to be staged and committed.</para></listitem>
- <listitem><para><emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis> Changes
- your working branch.
- This command is analogous to "cd".</para></listitem>
- <listitem><para><emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable>:</emphasis> Creates
- a working branch on your local machine where you can isolate work.
- It is a good idea to use local branches when adding specific features or changes.
- This way if you do not like what you have done you can easily get rid of the work.</para></listitem>
- <listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports
- existing local branches and
- tells you the branch in which you are currently working.</para></listitem>
- <listitem><para><emphasis><filename>git branch -D</filename> <replaceable>branch-name</replaceable>:</emphasis>
- Deletes an existing local branch.
- You need to be in a local branch other than the one you are deleting
- in order to delete <replaceable>branch-name</replaceable>.</para></listitem>
- <listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information
- from an upstream Git
- repository and places it in your local Git repository.
- You use this command to make sure you are synchronized with the repository
- from which you are basing changes (.e.g. the master branch).</para></listitem>
- <listitem><para><emphasis><filename>git push</filename>:</emphasis>
- Sends all your committed local changes to an upstream Git
- repository (e.g. a contribution repository).
- The maintainer of the project draws from these repositories
- when adding changes to the project’s master repository or
- other development branch.
- </para></listitem>
- <listitem><para><emphasis><filename>git merge</filename>:</emphasis> Combines or adds changes from one
- local branch of your repository with another branch.
- When you create a local Git repository, the default branch is named "master".
- A typical workflow is to create a temporary branch for isolated work, make and commit your
- changes, switch to your local master branch, merge the changes from the temporary branch into the
- local master branch, and then delete the temporary branch.</para></listitem>
- <listitem><para><emphasis><filename>git cherry-pick</filename>:</emphasis> Choose and apply specific
- commits from one branch into another branch.
- There are times when you might not be able to merge all the changes in one branch with
- another but need to pick out certain ones.</para></listitem>
- <listitem><para><emphasis><filename>gitk</filename>:</emphasis> Provides a GUI view of the branches
- and changes in your local Git repository.
- This command is a good way to graphically see where things have diverged in your
- local repository.</para></listitem>
- <listitem><para><emphasis><filename>git log</filename>:</emphasis> Reports a history of your changes to the
- repository.</para></listitem>
- <listitem><para><emphasis><filename>git diff</filename>:</emphasis> Displays line-by-line differences
- between your local working files and the same files in the upstream Git repository that your
- branch currently tracks.</para></listitem>
- </itemizedlist>
- </para>
- </section>
-</section>
-
-<section id='workflows'>
- <title>Workflows</title>
-
- <para>
- This section provides some overview on workflows using Git.
- In particular, the information covers basic practices that describe roles and actions in a
- collaborative development environment.
- Again, if you are familiar with this type of development environment, you might want to just
- skip this section.
+ <para id='figuring-out-the-mailing-list-to-use'>
+ The "poky" repository, which is the Yocto Project's reference build
+ environment, is a hybrid repository that contains several
+ individual pieces (e.g. BitBake, Metadata, documentation,
+ and so forth) built using the combo-layer tool.
+ The upstream location used for submitting changes varies by
+ component:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Core Metadata:</emphasis>
+ Send your patch to the
+ <ulink url='http://lists.openembedded.org/mailman/listinfo/openembedded-core'>openembedded-core</ulink>
+ mailing list. For example, a change to anything under
+ the <filename>meta</filename> or
+ <filename>scripts</filename> directories should be sent
+ to this mailing list.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>BitBake:</emphasis>
+ For changes to BitBake (i.e. anything under the
+ <filename>bitbake</filename> directory), send your patch
+ to the
+ <ulink url='http://lists.openembedded.org/mailman/listinfo/bitbake-devel'>bitbake-devel</ulink>
+ mailing list.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>"meta-*" trees:</emphasis>
+ These trees contain Metadata.
+ Use the
+ <ulink url='https://lists.yoctoproject.org/listinfo/poky'>poky</ulink>
+ mailing list.
+ </para></listitem>
+ </itemizedlist>
</para>
<para>
- The Yocto Project files are maintained using Git in a "master" branch whose Git history
- tracks every change and whose structure provides branches for all diverging functionality.
- Although there is no need to use Git, many open source projects do so.
- For the Yocto Project, a key individual called the "maintainer" is responsible for the "master"
- branch of a given Git repository.
- The "master" branch is the “upstream” repository where the final builds of the project occur.
- The maintainer is responsible for accepting changes from other developers and for
- organizing the underlying branch structure to reflect release strategies and so forth.
- <note>For information on finding out who is responsible for (maintains)
- a particular area of code, see the
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- section.
+ For changes to other layers hosted in the Yocto Project source
+ repositories (i.e. <filename>yoctoproject.org</filename>), tools,
+ and the Yocto Project documentation, use the
+ <ulink url='https://lists.yoctoproject.org/listinfo/yocto'>Yocto Project</ulink>
+ general mailing list.
+ <note>
+ Sometimes a layer's documentation specifies to use a
+ particular mailing list.
+ If so, use that list.
</note>
+ For additional recipes that do not fit into the core Metadata, you
+ should determine which layer the recipe should go into and submit
+ the change in the manner recommended by the documentation (e.g.
+ the <filename>README</filename> file) supplied with the layer.
+ If in doubt, please ask on the Yocto general mailing list or on
+ the openembedded-devel mailing list.
</para>
<para>
- The project also has an upstream contribution Git repository named
- <filename>poky-contrib</filename>.
- You can see all the branches in this repository using the web interface
- of the
- <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> organized
- within the "Poky Support" area.
- These branches temporarily hold changes to the project that have been
- submitted or committed by the Yocto Project development team and by
- community members who contribute to the project.
- The maintainer determines if the changes are qualified to be moved
- from the "contrib" branches into the "master" branch of the Git
- repository.
- </para>
-
- <para>
- Developers (including contributing community members) create and maintain cloned repositories
- of the upstream "master" branch.
- These repositories are local to their development platforms and are used to develop changes.
- When a developer is satisfied with a particular feature or change, they "push" the changes
- to the appropriate "contrib" repository.
- </para>
-
- <para>
- Developers are responsible for keeping their local repository up-to-date with "master".
- They are also responsible for straightening out any conflicts that might arise within files
- that are being worked on simultaneously by more than one person.
- All this work is done locally on the developer’s machines before anything is pushed to a
- "contrib" area and examined at the maintainer’s level.
- </para>
-
- <para>
- A somewhat formal method exists by which developers commit changes and push them into the
- "contrib" area and subsequently request that the maintainer include them into "master"
- This process is called “submitting a patch” or "submitting a change."
- For information on submitting patches and changes, see the
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section.
- </para>
-
- <para>
- To summarize the environment: a single point of entry exists for
- changes into the project’s "master" branch of the Git repository,
- which is controlled by the project’s maintainer.
- And, a set of developers exist who independently develop, test, and
- submit changes to "contrib" areas for the maintainer to examine.
- The maintainer then chooses which changes are going to become a
- permanent part of the project.
- </para>
-
- <para>
- <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
+ You can also push a change upstream and request a maintainer to
+ pull the change into the component's upstream repository.
+ You do this by pushing to a contribution repository that is upstream.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#workflows'>Workflows</ulink>"
+ section in the Yocto Project Reference Manual for additional
+ concepts on working in the Yocto Project development environment.
</para>
<para>
- While each development environment is unique, there are some best practices or methods
- that help development run smoothly.
- The following list describes some of these practices.
- For more information about Git workflows, see the workflow topics in the
- <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
+ Two commonly used testing repositories exist for
+ OpenEmbedded-Core:
<itemizedlist>
- <listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep the changes you commit
- small as compared to bundling many disparate changes into a single commit.
- This practice not only keeps things manageable but also allows the maintainer
- to more easily include or refuse changes.</para>
- <para>It is also good practice to leave the repository in a state that allows you to
- still successfully build your project. In other words, do not commit half of a feature,
- then add the other half as a separate, later commit.
- Each commit should take you from one buildable project state to another
- buildable state.</para></listitem>
- <listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and
- delete local branches in your working Git repository.
- You can name these branches anything you like.
- It is helpful to give them names associated with the particular feature or change
- on which you are working.
- Once you are done with a feature or change and have merged it
- into your local master branch, simply discard the temporary
- branch.</para></listitem>
- <listitem><para><emphasis>Merge Changes:</emphasis> The <filename>git merge</filename>
- command allows you to take the
- changes from one branch and fold them into another branch.
- This process is especially helpful when more than a single developer might be working
- on different parts of the same feature.
- Merging changes also automatically identifies any collisions or "conflicts"
- that might happen as a result of the same lines of code being altered by two different
- developers.</para></listitem>
- <listitem><para><emphasis>Manage Branches:</emphasis> Because branches are easy to use, you should
- use a system where branches indicate varying levels of code readiness.
- For example, you can have a "work" branch to develop in, a "test" branch where the code or
- change is tested, a "stage" branch where changes are ready to be committed, and so forth.
- As your project develops, you can merge code across the branches to reflect ever-increasing
- stable states of the development.</para></listitem>
- <listitem><para><emphasis>Use Push and Pull:</emphasis> The push-pull workflow is based on the
- concept of developers "pushing" local commits to a remote repository, which is
- usually a contribution repository.
- This workflow is also based on developers "pulling" known states of the project down into their
- local development repositories.
- The workflow easily allows you to pull changes submitted by other developers from the
- upstream repository into your work area ensuring that you have the most recent software
- on which to develop.
- The Yocto Project has two scripts named <filename>create-pull-request</filename> and
- <filename>send-pull-request</filename> that ship with the release to facilitate this
- workflow.
- You can find these scripts in the <filename>scripts</filename>
- folder of the
- <link linkend='source-directory'>Source Directory</link>.
- For information on how to use these scripts, see the
- "<link linkend='pushing-a-change-upstream'>Using Scripts to Push a Change Upstream and Request a Pull</link>" section.
+ <listitem><para>
+ <emphasis>"ross/mut" branch:</emphasis>
+ The "mut" (master-under-test) tree
+ exists in the <filename>poky-contrib</filename> repository
+ in the
+ <ulink url='&YOCTO_GIT_URL;'>Yocto Project source repositories</ulink>.
</para></listitem>
- <listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the
- maintainer through an email that you have a change (or patch) you would like considered
- for the "master" branch of the Git repository.
- To send this type of change, you format the patch and then send the email using the Git commands
- <filename>git format-patch</filename> and <filename>git send-email</filename>.
- For information on how to use these scripts, see the
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- section.
+ <listitem><para>
+ <emphasis>"master-next" branch:</emphasis>
+ This branch is part of the main
+ "poky" repository in the Yocto Project source repositories.
</para></listitem>
</itemizedlist>
- </para>
-</section>
-
-<section id='tracking-bugs'>
- <title>Tracking Bugs</title>
-
- <para>
- The Yocto Project uses its own implementation of
- <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track bugs.
- Implementations of Bugzilla work well for group development because they track bugs and code
- changes, can be used to communicate changes and problems with developers, can be used to
- submit and review patches, and can be used to manage quality assurance.
- The home page for the Yocto Project implementation of Bugzilla is
- <ulink url='&YOCTO_BUGZILLA_URL;'>&YOCTO_BUGZILLA_URL;</ulink>.
- </para>
-
- <para>
- Sometimes it is helpful to submit, investigate, or track a bug against the Yocto Project itself
- such as when discovering an issue with some component of the build system that acts contrary
- to the documentation or your expectations.
- Following is the general procedure for submitting a new bug using the Yocto Project
- Bugzilla.
- You can find more information on defect management, bug tracking, and feature request
- processes all accomplished through the Yocto Project Bugzilla on the
- <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>wiki page</ulink>.
- <orderedlist>
- <listitem><para>Always use the Yocto Project implementation of Bugzilla to submit
- a bug.</para></listitem>
- <listitem><para>When submitting a new bug, be sure to choose the appropriate
- Classification, Product, and Component for which the issue was found.
- Defects for the Yocto Project fall into one of seven classifications:
- Yocto Project Components, Infrastructure, Build System &amp; Metadata,
- Documentation, QA/Testing, Runtime and Hardware.
- Each of these Classifications break down into multiple Products and, in some
- cases, multiple Components.</para></listitem>
- <listitem><para>Use the bug form to choose the correct Hardware and Architecture
- for which the bug applies.</para></listitem>
- <listitem><para>Indicate the Yocto Project version you were using when the issue
- occurred.</para></listitem>
- <listitem><para>Be sure to indicate the Severity of the bug.
- Severity communicates how the bug impacted your work.</para></listitem>
- <listitem><para>Select the appropriate "Documentation change" item
- for the bug.
- Fixing a bug may or may not affect the Yocto Project
- documentation.</para></listitem>
- <listitem><para>Provide a brief summary of the issue.
- Try to limit your summary to just a line or two and be sure to capture the
- essence of the issue.</para></listitem>
- <listitem><para>Provide a detailed description of the issue.
- You should provide as much detail as you can about the context, behavior, output,
- and so forth that surrounds the issue.
- You can even attach supporting files for output from logs by
- using the "Add an attachment" button.</para></listitem>
- <listitem><para>Be sure to copy the appropriate people in the
- "CC List" for the bug.
- See the "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- section for information about finding out who is responsible
- for code.</para></listitem>
- <listitem><para>Submit the bug by clicking the "Submit Bug" button.</para></listitem>
- </orderedlist>
- </para>
-</section>
-
-<section id='how-to-submit-a-change'>
- <title>How to Submit a Change</title>
-
- <para>
- Contributions to the Yocto Project and OpenEmbedded are very welcome.
- Because the system is extremely configurable and flexible, we recognize that developers
- will want to extend, configure or optimize it for their specific uses.
- You should send patches to the appropriate mailing list so that they
- can be reviewed and merged by the appropriate maintainer.
- </para>
-
- <section id='submit-change-overview'>
- <title>Overview</title>
-
- <para>
- The Yocto Project uses a mailing list and patch-based workflow
- that is similar to the Linux kernel but contains important
- differences.
- In general, a mailing list exists through which you can submit
- patches.
- The specific mailing list you need to use depends on the
- location of the code you are changing.
- Each component (e.g. layer) should have a
- <filename>README</filename> file that indicates where to send
- the changes and which process to follow.
- </para>
-
- <para>
- You can send the patch to the mailing list using whichever approach
- you feel comfortable with to generate the patch.
- Once sent, the patch is usually reviewed by the community at large.
- If somebody has concerns with the patch, they will usually voice
- their concern over the mailing list.
- If a patch does not receive any negative reviews, the maintainer of
- the affected layer typically takes the patch, tests it, and then
- based on successful testing, merges the patch.
- </para>
-
- <para>
- Specific to OpenEmbedded-Core, two commonly used testing trees
- exist:
- <itemizedlist>
- <listitem><para>
- <emphasis>"ross/mut" branch:</emphasis>
- The "mut" (master-under-test) tree
- exists in the <filename>poky-contrib</filename> repository
- in the
- <ulink url='&YOCTO_GIT_URL;'>Yocto Project source repositories</ulink>.
- </para></listitem>
- <listitem><para>
- <emphasis>"master-next" branch:</emphasis>
- This branch is part of the main
- "poky" repository in the Yocto Project source repositories.
- </para></listitem>
- </itemizedlist>
- Maintainers use these branches to test submissions prior to merging
- patches.
- Thus, you can get an idea of the status of a patch based on
- whether the patch has been merged into one of these branches.
- </para>
-
- <para>
- This system is imperfect and patches can sometimes get lost in the
+ Maintainers use these branches to test submissions prior to merging
+ patches.
+ Thus, you can get an idea of the status of a patch based on
+ whether the patch has been merged into one of these branches.
+ <note>
+ This system is imperfect and changes can sometimes get lost in the
flow.
- Asking about the status of a patch is reasonable if the patch
- has been idle for a while with no feedback.
+ Asking about the status of a patch or change is reasonable if the
+ change has been idle for a while with no feedback.
The Yocto Project does have plans to use
<ulink url='https://en.wikipedia.org/wiki/Patchwork_(software)'>Patchwork</ulink>
to track the status of patches and also to automatically preview
patches.
- </para>
-
- <para>
- The following sections provide general instructions for both
- pushing changes upstream and for submitting changes as patches.
- </para>
- </section>
-
- <section id='submit-change-submissions-to-poky'>
- <title>Submissions to Poky</title>
+ </note>
+ </para>
- <para>
- The "poky" repository, which is the Yocto Project's reference build
- environment, is a hybrid repository that contains several
- individual pieces (e.g. BitBake, OpenEmbedded-Core, meta-yocto,
- documentation, and so forth) built using the combo-layer tool.
- The upstream location used for submitting changes varies by
- component:
- <itemizedlist>
- <listitem><para>
- <emphasis>Core Metadata:</emphasis>
- Send your patch to the
- <ulink url='http://lists.openembedded.org/mailman/listinfo/openembedded-core'>openembedded-core</ulink>
- mailing list. For example, a change to anything under
- the <filename>meta</filename> or
- <filename>scripts</filename> directories should be sent
- to this mailing list.
- </para></listitem>
- <listitem><para>
- <emphasis>BitBake:</emphasis>
- For changes to BitBake (i.e. anything under the
- <filename>bitbake</filename> directory), send your patch
- to the
- <ulink url='http://lists.openembedded.org/mailman/listinfo/bitbake-devel'>bitbake-devel</ulink>
- mailing list.
- </para></listitem>
- <listitem><para>
- <emphasis>"meta-yocto-bsp" and "meta-poky" trees:</emphasis>
- These trees are
- part of the "meta-yocto" repository in the Yocto Project
- source repositories.
- Use the
- <ulink url='https://lists.yoctoproject.org/listinfo/poky'>poky</ulink>
- mailing list.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
+ <para>
+ The following sections provide procedures for submitting a change.
+ </para>
- <section id='submit-change-submissions-to-other-layers'>
- <title>Submissions to Other Layers</title>
+ <section id='pushing-a-change-upstream'>
+ <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
<para>
- For changes to other layers hosted in the Yocto Project source
- repositories (i.e. <filename>yoctoproject.org</filename>), tools,
- and the Yocto Project documentation, use the
- <ulink url='https://lists.yoctoproject.org/listinfo/yocto'>Yocto Project</ulink>
- general mailing list.
+ Follow this procedure to push a change to an upstream "contrib"
+ Git repository:
<note>
- Sometimes a layer's documentation specifies to use a
- particular mailing list.
- If so, use that list.
+ You can find general Git information on how to push a change
+ upstream in the
+ <ulink url='http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows'>Git Community Book</ulink>.
</note>
- For additional recipes that do not fit into the core Metadata, you
- should determine which layer the recipe should go into and submit
- the change in the manner recommended by the documentation (e.g.
- the <filename>README</filename> file) supplied with the layer.
- If in doubt, please ask on the Yocto general mailing list or on
- the openembedded-devel mailing list.
- </para>
- </section>
-
- <section id='submit-change-patch-submission-details'>
- <title>Patch Submission Details</title>
-
- <para>
- When submitting any change, you can check who you should be
- notifying.
- Use either of these methods to find out:
- <itemizedlist>
+ <orderedlist>
<listitem><para>
- <emphasis>Maintenance File:</emphasis>
- Examine the <filename>maintainers.inc</filename> file, which is
- located in the
- <link linkend='source-directory'>Source Directory</link>
- at <filename>meta-poky/conf/distro/include</filename>, to
- see who is responsible for code.
+ <emphasis>Make Your Changes Locally:</emphasis>
+ Make your changes in your local Git repository.
+ You should make small, controlled, isolated changes.
+ Keeping changes small and isolated aids review,
+ makes merging/rebasing easier and keeps the change
+ history clean should anyone need to refer to it in
+ future.
</para></listitem>
<listitem><para>
- <emphasis>Search by File:</emphasis>
- Using <link linkend='git'>Git</link>, you can enter the
- following command to bring up a short list of all commits
- against a specific file:
- <literallayout class='monospaced'>
- git shortlog -- <replaceable>filename</replaceable>
- </literallayout>
- Just provide the name of the file for which you are interested.
- The information returned is not ordered by history but does
- include a list of all committers grouped by name.
- From the list, you can see who is responsible for the bulk of
- the changes against the file.
+ <emphasis>Stage Your Changes:</emphasis>
+ Stage your changes by using the <filename>git add</filename>
+ command on each file you changed.
</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- For a list of the Yocto Project and related mailing lists, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
- section in the Yocto Project Reference Manual.
- </para>
-
- <para>
- When you send a patch, be sure to include a "Signed-off-by:"
- line in the same style as required by the Linux kernel.
- Adding this line signifies that you, the submitter, have agreed
- to the Developer's Certificate of Origin 1.1 as follows:
- <literallayout class='monospaced'>
+ <listitem><para id='making-sure-you-have-correct-commit-information'>
+ <emphasis>Commit Your Changes:</emphasis>
+ Commit the change by using the
+ <filename>git commit</filename> command.
+ Make sure your commit information follows standards by
+ following these accepted conventions:
+ <itemizedlist>
+ <listitem><para>
+ Be sure to include a "Signed-off-by:" line in the
+ same style as required by the Linux kernel.
+ Adding this line signifies that you, the submitter,
+ have agreed to the Developer's Certificate of
+ Origin 1.1 as follows:
+ <literallayout class='monospaced'>
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
@@ -1595,121 +655,183 @@
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
- </literallayout>
- </para>
-
- <para>
- In a collaborative environment, it is necessary to have some sort
- of standard or method through which you submit changes.
- Otherwise, things could get quite chaotic.
- One general practice to follow is to make small, controlled changes.
- Keeping changes small and isolated aids review, makes
- merging/rebasing easier and keeps the change history clean should
- anyone need to refer to it in future.
- </para>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Provide a single-line summary of the change.
+ and,
+ if more explanation is needed, provide more
+ detail in the body of the commit.
+ This summary is typically viewable in the
+ "shortlist" of changes.
+ Thus, providing something short and descriptive
+ that gives the reader a summary of the change is
+ useful when viewing a list of many commits.
+ You should prefix this short description with the
+ recipe name (if changing a recipe), or else with
+ the short form path to the file being changed.
+ </para></listitem>
+ <listitem><para>
+ For the body of the commit message, provide
+ detailed information that describes what you
+ changed, why you made the change, and the approach
+ you used.
+ It might also be helpful if you mention how you
+ tested the change.
+ Provide as much detail as you can in the body of
+ the commit message.
+ <note>
+ You do not need to provide a more detailed
+ explanation of a change if the change is
+ minor to the point of the single line
+ summary providing all the information.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ If the change addresses a specific bug or issue
+ that is associated with a bug-tracking ID,
+ include a reference to that ID in your detailed
+ description.
+ For example, the Yocto Project uses a specific
+ convention for bug references - any commit that
+ addresses a specific bug should use the following
+ form for the detailed description.
+ Be sure to use the actual bug-tracking ID from
+ Bugzilla for
+ <replaceable>bug-id</replaceable>:
+ <literallayout class='monospaced'>
+ Fixes [YOCTO #<replaceable>bug-id</replaceable>]
- <para>
- When you make a commit, you must follow certain standards
- established by the OpenEmbedded and Yocto Project development teams.
- For each commit, you must provide a single-line summary of the
- change and you should almost always provide a more detailed
- description of what you did (i.e. the body of the commit message).
- The only exceptions for not providing a detailed description would
- be if your change is a simple, self-explanatory change that needs
- no further description beyond the summary.
- Here are the guidelines for composing a commit message:
- <itemizedlist>
- <listitem><para>
- Provide a single-line, short summary of the change.
- This summary is typically viewable in the "shortlist" of
- changes.
- Thus, providing something short and descriptive that
- gives the reader a summary of the change is useful when
- viewing a list of many commits.
- You should prefix this short description with the recipe
- name (if changing a recipe), or else with the short form
- path to the file being changed.
- </para></listitem>
- <listitem><para>
- For the body of the commit message, provide detailed
- information that describes what you changed, why you made
- the change, and the approach you used.
- It might also be helpful if you mention how you tested
- the change.
- Provide as much detail as you can in the body of the
- commit message.
+ <replaceable>detailed description of change</replaceable>
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
</para></listitem>
<listitem><para>
- If the change addresses a specific bug or issue that is
- associated with a bug-tracking ID, include a reference
- to that ID in your detailed description.
- For example, the Yocto Project uses a specific convention
- for bug references - any commit that addresses a specific
- bug should use the following form for the detailed
- description.
- Be sure to use the actual bug-tracking ID from
- Bugzilla for
- <replaceable>bug-id</replaceable>:
+ <emphasis>Push Your Commits to a "Contrib" Upstream:</emphasis>
+ If you have arranged for permissions to push to an
+ upstream contrib repository, push the change to that
+ repository:
<literallayout class='monospaced'>
- Fixes [YOCTO #<replaceable>bug-id</replaceable>]
-
- <replaceable>detailed description of change</replaceable>
+ $ git push <replaceable>upstream_remote_repo</replaceable> <replaceable>local_branch_name</replaceable>
+ </literallayout>
+ For example, suppose you have permissions to push into the
+ upstream <filename>meta-intel-contrib</filename>
+ repository and you are working in a local branch named
+ <replaceable>your_name</replaceable><filename>/README</filename>.
+ The following command pushes your local commits to the
+ <filename>meta-intel-contrib</filename> upstream
+ repository and puts the commit in a branch named
+ <replaceable>your_name</replaceable><filename>/README</filename>:
+ <literallayout class='monospaced'>
+ $ git push meta-intel-contrib <replaceable>your_name</replaceable>/README
</literallayout>
</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- You can find more guidance on creating well-formed commit messages
- at this OpenEmbedded wiki page:
- <ulink url='&OE_HOME_URL;/wiki/Commit_Patch_Message_Guidelines'></ulink>.
- </para>
- </section>
-
- <section id='pushing-a-change-upstream'>
- <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
-
- <para>
- The basic flow for pushing a change to an upstream "contrib" Git repository is as follows:
- <itemizedlist>
- <listitem><para>Make your changes in your local Git repository.</para></listitem>
- <listitem><para>Stage your changes by using the <filename>git add</filename>
- command on each file you changed.</para></listitem>
- <listitem><para>
- Commit the change by using the
- <filename>git commit</filename> command.
- Be sure to provide a commit message that follows the
- project’s commit message standards as described earlier.
+ <listitem><para id='push-determine-who-to-notify'>
+ <emphasis>Determine Who to Notify:</emphasis>
+ Determine the maintainer or the mailing list
+ that you need to notify for the change.</para>
+
+ <para>Before submitting any change, you need to be sure
+ who the maintainer is or what mailing list that you need
+ to notify.
+ Use either these methods to find out:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Maintenance File:</emphasis>
+ Examine the <filename>maintainers.inc</filename>
+ file, which is located in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ at
+ <filename>meta/conf/distro/include</filename>,
+ to see who is responsible for code.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Search by File:</emphasis>
+ Using <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>,
+ you can enter the following command to bring up a
+ short list of all commits against a specific file:
+ <literallayout class='monospaced'>
+ git shortlog -- <replaceable>filename</replaceable>
+ </literallayout>
+ Just provide the name of the file for which you
+ are interested.
+ The information returned is not ordered by history
+ but does include a list of everyone who has
+ committed grouped by name.
+ From the list, you can see who is responsible for
+ the bulk of the changes against the file.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Examine the List of Mailing Lists:</emphasis>
+ For a list of the Yocto Project and related mailing
+ lists, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
+ section in the Yocto Project Reference Manual.
+ </para></listitem>
+ </itemizedlist>
</para></listitem>
<listitem><para>
- Push the change to the upstream "contrib" repository by
- using the <filename>git push</filename> command.
- </para></listitem>
- <listitem><para>Notify the maintainer that you have pushed a change by making a pull
- request.
- The Yocto Project provides two scripts that conveniently let you generate and send
- pull requests to the Yocto Project.
- These scripts are <filename>create-pull-request</filename> and
- <filename>send-pull-request</filename>.
- You can find these scripts in the <filename>scripts</filename> directory
- within the <link linkend='source-directory'>Source Directory</link>.</para>
- <para>Using these scripts correctly formats the requests without introducing any
- whitespace or HTML formatting.
- The maintainer that receives your patches needs to be able to save and apply them
- directly from your emails.
- Using these scripts is the preferred method for sending patches.</para>
- <para>For help on using these scripts, simply provide the
- <filename>-h</filename> argument as follows:
+ <emphasis>Make a Pull Request:</emphasis>
+ Notify the maintainer or the mailing list that you have
+ pushed a change by making a pull request.</para>
+
+ <para>The Yocto Project provides two scripts that
+ conveniently let you generate and send pull requests to the
+ Yocto Project.
+ These scripts are <filename>create-pull-request</filename>
+ and <filename>send-pull-request</filename>.
+ You can find these scripts in the
+ <filename>scripts</filename> directory within the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (e.g. <filename>~/poky/scripts</filename>).
+ </para>
+
+ <para>Using these scripts correctly formats the requests
+ without introducing any whitespace or HTML formatting.
+ The maintainer that receives your patches either directly
+ or through the mailing list needs to be able to save and
+ apply them directly from your emails.
+ Using these scripts is the preferred method for sending
+ patches.</para>
+
+ <para>First, create the pull request.
+ For example, the following command runs the script,
+ specifies the upstream repository in the contrib directory
+ into which you pushed the change, and provides a subject
+ line in the created patch files:
+ <literallayout class='monospaced'>
+ $ ~/poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README"
+ </literallayout>
+ Running this script forms
+ <filename>*.patch</filename> files in a folder named
+ <filename>pull-</filename><replaceable>PID</replaceable>
+ in the current directory.
+ One of the patch files is a cover letter.</para>
+
+ <para>Before running the
+ <filename>send-pull-request</filename> script, you must
+ edit the cover letter patch to insert information about
+ your change.
+ After editing the cover letter, send the pull request.
+ For example, the following command runs the script and
+ specifies the patch directory and email address.
+ In this example, the email address is a mailing list:
<literallayout class='monospaced'>
+ $ ~/poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@yoctoproject.org
+ </literallayout>
+ You need to follow the prompts as the script is
+ interactive.
+ <note>
+ For help on using these scripts, simply provide the
+ <filename>-h</filename> argument as follows:
+ <literallayout class='monospaced'>
$ poky/scripts/create-pull-request -h
$ poky/scripts/send-pull-request -h
- </literallayout></para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- You can find general Git information on how to push a change upstream in the
- <ulink url='http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows'>Git Community Book</ulink>.
+ </literallayout>
+ </note>
+ </para></listitem>
+ </orderedlist>
</para>
</section>
@@ -1717,43 +839,67 @@
<title>Using Email to Submit a Patch</title>
<para>
- You can submit patches without using the <filename>create-pull-request</filename> and
- <filename>send-pull-request</filename> scripts described in the previous section.
+ You can submit patches without using the
+ <filename>create-pull-request</filename> and
+ <filename>send-pull-request</filename> scripts described in the
+ previous section.
However, keep in mind, the preferred method is to use the scripts.
</para>
<para>
- Depending on the components changed, you need to submit the email to a specific
- mailing list.
- For some guidance on which mailing list to use, see the list in the
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- section.
- For a description of the available mailing lists, see the
+ Depending on the components changed, you need to submit the email
+ to a specific mailing list.
+ For some guidance on which mailing list to use, see the
+ <link linkend='figuring-out-the-mailing-list-to-use'>beginning</link>
+ of this section.
+ For a description of all the available mailing lists, see the
"<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
section in the Yocto Project Reference Manual.
</para>
<para>
- Here is the general procedure on how to submit a patch through email without using the
- scripts:
- <itemizedlist>
- <listitem><para>Make your changes in your local Git repository.</para></listitem>
- <listitem><para>Stage your changes by using the <filename>git add</filename>
- command on each file you changed.</para></listitem>
- <listitem><para>Commit the change by using the
+ Here is the general procedure on how to submit a patch through
+ email without using the scripts:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Make Your Changes Locally:</emphasis>
+ Make your changes in your local Git repository.
+ You should make small, controlled, isolated changes.
+ Keeping changes small and isolated aids review,
+ makes merging/rebasing easier and keeps the change
+ history clean should anyone need to refer to it in
+ future.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Stage Your Changes:</emphasis>
+ Stage your changes by using the <filename>git add</filename>
+ command on each file you changed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Commit Your Changes:</emphasis>
+ Commit the change by using the
<filename>git commit --signoff</filename> command.
- Using the <filename>--signoff</filename> option identifies you as the person
- making the change and also satisfies the Developer's Certificate of
- Origin (DCO) shown earlier.</para>
- <para>When you form a commit, you must follow certain standards established by the
- Yocto Project development team.
- See the earlier section
- "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
- for Yocto Project commit message standards.</para></listitem>
- <listitem><para>Format the commit into an email message.
- To format commits, use the <filename>git format-patch</filename> command.
- When you provide the command, you must include a revision list or a number of patches
- as part of the command.
+ Using the <filename>--signoff</filename> option identifies
+ you as the person making the change and also satisfies
+ the Developer's Certificate of Origin (DCO) shown earlier.
+ </para>
+
+ <para>When you form a commit, you must follow certain
+ standards established by the Yocto Project development
+ team.
+ See
+ <link linkend='making-sure-you-have-correct-commit-information'>Step 3</link>
+ in the previous section for information on how to
+ provide commit information that meets Yocto Project
+ commit message standards.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Format the Commit:</emphasis>
+ Format the commit into an email message.
+ To format commits, use the
+ <filename>git format-patch</filename> command.
+ When you provide the command, you must include a revision
+ list or a number of patches as part of the command.
For example, either of these two commands takes your most
recent single commit and formats it as an email message in
the current directory:
@@ -1764,50 +910,76 @@
<literallayout class='monospaced'>
$ git format-patch HEAD~
</literallayout></para>
- <para>After the command is run, the current directory contains a
- numbered <filename>.patch</filename> file for the commit.</para>
- <para>If you provide several commits as part of the command,
- the <filename>git format-patch</filename> command produces a
- series of numbered files in the current directory – one for each commit.
+
+ <para>After the command is run, the current directory
+ contains a numbered <filename>.patch</filename> file for
+ the commit.</para>
+
+ <para>If you provide several commits as part of the
+ command, the <filename>git format-patch</filename> command
+ produces a series of numbered files in the current
+ directory – one for each commit.
If you have more than one patch, you should also use the
- <filename>--cover</filename> option with the command, which generates a
- cover letter as the first "patch" in the series.
- You can then edit the cover letter to provide a description for
- the series of patches.
- For information on the <filename>git format-patch</filename> command,
- see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the
- <filename>man git-format-patch</filename> command.</para>
- <note>If you are or will be a frequent contributor to the Yocto Project
- or to OpenEmbedded, you might consider requesting a contrib area and the
- necessary associated rights.</note></listitem>
- <listitem><para>Import the files into your mail client by using the
+ <filename>--cover</filename> option with the command,
+ which generates a cover letter as the first "patch" in
+ the series.
+ You can then edit the cover letter to provide a
+ description for the series of patches.
+ For information on the
+ <filename>git format-patch</filename> command,
+ see <filename>GIT_FORMAT_PATCH(1)</filename> displayed
+ using the <filename>man git-format-patch</filename>
+ command.
+ <note>
+ If you are or will be a frequent contributor to the
+ Yocto Project or to OpenEmbedded, you might consider
+ requesting a contrib area and the necessary associated
+ rights.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Import the Files Into Your Mail Client:</emphasis>
+ Import the files into your mail client by using the
<filename>git send-email</filename> command.
- <note>In order to use <filename>git send-email</filename>, you must have the
- the proper Git packages installed.
- For Ubuntu, Debian, and Fedora the package is <filename>git-email</filename>.</note></para>
- <para>The <filename>git send-email</filename> command sends email by using a local
- or remote Mail Transport Agent (MTA) such as
- <filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct
- <filename>smtp</filename> configuration in your Git <filename>config</filename>
- file.
- If you are submitting patches through email only, it is very important
- that you submit them without any whitespace or HTML formatting that
- either you or your mailer introduces.
- The maintainer that receives your patches needs to be able to save and
- apply them directly from your emails.
- A good way to verify that what you are sending will be applicable by the
- maintainer is to do a dry run and send them to yourself and then
- save and apply them as the maintainer would.</para>
- <para>The <filename>git send-email</filename> command is the preferred method
- for sending your patches since there is no risk of compromising whitespace
- in the body of the message, which can occur when you use your own mail client.
+ <note>
+ In order to use <filename>git send-email</filename>,
+ you must have the proper Git packages installed on
+ your host.
+ For Ubuntu, Debian, and Fedora the package is
+ <filename>git-email</filename>.
+ </note></para>
+
+ <para>The <filename>git send-email</filename> command
+ sends email by using a local or remote Mail Transport Agent
+ (MTA) such as <filename>msmtp</filename>,
+ <filename>sendmail</filename>, or through a direct
+ <filename>smtp</filename> configuration in your Git
+ <filename>~/.gitconfig</filename> file.
+ If you are submitting patches through email only, it is
+ very important that you submit them without any whitespace
+ or HTML formatting that either you or your mailer
+ introduces.
+ The maintainer that receives your patches needs to be able
+ to save and apply them directly from your emails.
+ A good way to verify that what you are sending will be
+ applicable by the maintainer is to do a dry run and send
+ them to yourself and then save and apply them as the
+ maintainer would.</para>
+
+ <para>The <filename>git send-email</filename> command is
+ the preferred method for sending your patches using
+ email since there is no risk of compromising whitespace
+ in the body of the message, which can occur when you use
+ your own mail client.
The command also has several options that let you
- specify recipients and perform further editing of the email message.
- For information on how to use the <filename>git send-email</filename> command,
+ specify recipients and perform further editing of the
+ email message.
+ For information on how to use the
+ <filename>git send-email</filename> command,
see <filename>GIT-SEND-EMAIL(1)</filename> displayed using
the <filename>man git-send-email</filename> command.
</para></listitem>
- </itemizedlist>
+ </orderedlist>
</para>
</section>
</section>
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
index 41c18298a5..85e7315872 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
@@ -6,427 +6,303 @@
<title>Using the Quick EMUlator (QEMU)</title>
-<para>
- Quick EMUlator (QEMU) is an Open Source project the Yocto Project uses
- as part of its development "tool set".
- As such, the information in this chapter is limited to the
- Yocto Project integration of QEMU and not QEMU in general.
- For official information and documentation on QEMU, see the
- following references:
- <itemizedlist>
- <listitem><para><emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
- The official website for the QEMU Open Source project.
- </para></listitem>
- <listitem><para><emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
- The QEMU user manual.
- </para></listitem>
- </itemizedlist>
-</para>
-
-<para>
- This chapter provides an overview of the Yocto Project's integration of
- QEMU, a description of how you use QEMU and its various options, running
- under a Network File System (NFS) server, and a few tips and tricks you
- might find helpful when using QEMU.
-</para>
-
-<section id='qemu-overview'>
- <title>Overview</title>
-
- <para>
- Within the context of the Yocto Project, QEMU is an
- emulator and virtualization machine that allows you to run a complete
- image you have built using the Yocto Project as just another task
- on your build system.
- QEMU is useful for running and testing images and applications on
- supported Yocto Project architectures without having actual hardware.
- Among other things, the Yocto Project uses QEMU to run automated
- Quality Assurance (QA) tests on final images shipped with each
- release.
- </para>
-
<para>
- QEMU is made available with the Yocto Project a number of ways.
- One method is to install a Software Development Kit (SDK).
- For more information on how to make sure you have
- QEMU available, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ This chapter provides procedures that show you how to use the
+ Quick EMUlator (QEMU), which is an Open Source project the Yocto
+ Project uses as part of its development "tool set".
+ For reference information on the Yocto Project implementation of QEMU,
+ see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#ref-quick-emulator-qemu'>Quick EMUlator (QEMU)</ulink>"
+ section in the Yocto Project Reference Manual.
</para>
-</section>
-<section id='qemu-running-qemu'>
- <title>Running QEMU</title>
-
- <para>
- Running QEMU involves having your build environment set up, having the
- right artifacts available, and understanding how to use the many
- options that are available to you when you start QEMU using the
- <filename>runqemu</filename> command.
- </para>
-
- <section id='qemu-setting-up-the-environment'>
- <title>Setting Up the Environment</title>
+ <section id='qemu-running-qemu'>
+ <title>Running QEMU</title>
<para>
- You run QEMU in the same environment from which you run BitBake.
- This means you need to source a build environment script (i.e.
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
- </para>
- </section>
-
- <section id='qemu-using-the-runqemu-command'>
- <title>Using the <filename>runqemu</filename> Command</title>
-
- <para>
- The basic <filename>runqemu</filename> command syntax is as
- follows:
- <literallayout class='monospaced'>
- $ runqemu [<replaceable>option</replaceable> ] [...]
- </literallayout>
- Based on what you provide on the command line,
- <filename>runqemu</filename> does a good job of figuring out what
- you are trying to do.
- For example, by default, QEMU looks for the most recently built
- image according to the timestamp when it needs to look for an
- image.
- Minimally, through the use of options, you must provide either
- a machine name, a virtual machine image
- (<filename>*.vmdk</filename>), or a kernel image
- (<filename>*.bin</filename>).
- </para>
-
- <para>
- Following is a description of <filename>runqemu</filename>
- options you can provide on the command line:
- <note><title>Tip</title>
- If you do provide some "illegal" option combination or perhaps
- you do not provide enough in the way of options,
- <filename>runqemu</filename> provides appropriate error
- messaging to help you correct the problem.
- </note>
- <itemizedlist>
- <listitem><para><replaceable>QEMUARCH</replaceable>:
- The QEMU machine architecture, which must be "qemux86",
- "qemux86_64", "qemuarm", "qemumips", "qemumipsel",
- “qemumips64", "qemush4", "qemuppc", "qemumicroblaze",
- or "qemuzynq".
- </para></listitem>
- <listitem><para><filename><replaceable>VM</replaceable></filename>:
- The virtual machine image, which must be a
- <filename>.vmdk</filename> file.
- Use this option when you want to boot a
- <filename>.vmdk</filename> image.
- The image filename you provide must contain one of the
- following strings: "qemux86-64", "qemux86", "qemuarm",
- "qemumips64", "qemumips", "qemuppc", or "qemush4".
- </para></listitem>
- <listitem><para><replaceable>ROOTFS</replaceable>:
- A root filesystem that has one of the following
- filetype extensions: "ext2", "ext3", "ext4", "jffs2",
- "nfs", or "btrfs".
- If the filename you provide for this option uses “nfs”, it
- must provide an explicit root filesystem path.
- </para></listitem>
- <listitem><para><replaceable>KERNEL</replaceable>:
- A kernel image, which is a <filename>.bin</filename> file.
- When you provide a <filename>.bin</filename> file,
- <filename>runqemu</filename> detects it and assumes the
- file is a kernel image.
+ To use QEMU, you need to have QEMU installed and initialized as
+ well as have the proper artifacts (i.e. image files and root
+ filesystems) available.
+ Follow these general steps to run QEMU:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Install QEMU:</emphasis>
+ See
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
+ section in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual
+ for information on how to install QEMU.
</para></listitem>
- <listitem><para><replaceable>MACHINE</replaceable>:
- The architecture of the QEMU machine, which must be one
- of the following: "qemux86",
- "qemux86-64", "qemuarm", "qemumips", "qemumipsel",
- “qemumips64", "qemush4", "qemuppc", "qemumicroblaze",
- or "qemuzynq".
- The <replaceable>MACHINE</replaceable> and
- <replaceable>QEMUARCH</replaceable> options are basically
- identical.
- If you do not provide a <replaceable>MACHINE</replaceable>
- option, <filename>runqemu</filename> tries to determine
- it based on other options.
- </para></listitem>
- <listitem><para><filename>ramfs</filename>:
- Indicates you are booting an initial RAM disk (initramfs)
- image, which means the <filename>FSTYPE</filename> is
- <filename>cpio.gz</filename>.
- </para></listitem>
- <listitem><para><filename>iso</filename>:
- Indicates you are booting an ISO image, which means the
- <filename>FSTYPE</filename> is
- <filename>.iso</filename>.
- </para></listitem>
- <listitem><para><filename>nographic</filename>:
- Disables the video console, which sets the console to
- "ttys0".
- </para></listitem>
- <listitem><para><filename>serial</filename>:
- Enables a serial console on
- <filename>/dev/ttyS0</filename>.
- </para></listitem>
- <listitem><para><filename>biosdir</filename>:
- Establishes a custom directory for BIOS, VGA BIOS and
- keymaps.
- </para></listitem>
- <listitem><para><filename>biosfilename</filename>:
- Establishes a custom BIOS name.
- </para></listitem>
- <listitem><para><filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
- Specifies custom QEMU parameters.
- Use this option to pass options other than the simple
- "kvm" and "serial" options.
- </para></listitem>
- <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
- Specifies custom boot parameters for the kernel.
- </para></listitem>
- <listitem><para><filename>audio</filename>:
- Enables audio in QEMU.
- The <replaceable>MACHINE</replaceable> option must be
- either "qemux86" or "qemux86-64" in order for audio to be
- enabled.
- Additionally, the <filename>snd_intel8x0</filename>
- or <filename>snd_ens1370</filename> driver must be
- installed in linux guest.
- </para></listitem>
- <listitem><para><filename>slirp</filename>:
- Enables "slirp" networking, which is a different way
- of networking that does not need root access
- but also is not as easy to use or comprehensive
- as the default.
- </para></listitem>
- <listitem><para id='kvm-cond'><filename>kvm</filename>:
- Enables KVM when running "qemux86" or "qemux86-64"
- QEMU architectures.
- For KVM to work, all the following conditions must be met:
+ <listitem><para>
+ <emphasis>Setting Up the Environment:</emphasis>
+ How you set up the QEMU environment depends on how you
+ installed QEMU:
<itemizedlist>
<listitem><para>
- Your <replaceable>MACHINE</replaceable> must be either
-qemux86" or "qemux86-64".
+ If you cloned the <filename>poky</filename>
+ repository or you downloaded and unpacked a
+ Yocto Project release tarball, you can source
+ the build environment script (i.e.
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>):
+ <literallayout class='monospaced'>
+ $ cd ~/poky
+ $ source oe-init-build-env
+ </literallayout>
</para></listitem>
<listitem><para>
- Your build host has to have the KVM modules
- installed, which are
- <filename>/dev/kvm</filename>.
+ If you installed a cross-toolchain, you can
+ run the script that initializes the toolchain.
+ For example, the following commands run the
+ initialization script from the default
+ <filename>poky_sdk</filename> directory:
+ <literallayout class='monospaced'>
+ . ~/poky_sdk/environment-setup-core2-64-poky-linux
+ </literallayout>
</para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Ensure the Artifacts are in Place:</emphasis>
+ You need to be sure you have a pre-built kernel that
+ will boot in QEMU.
+ You also need the target root filesystem for your target
+ machine’s architecture:
+ <itemizedlist>
<listitem><para>
- The build host <filename>/dev/kvm</filename>
- directory has to be both writable and readable.
+ If you have previously built an image for QEMU
+ (e.g. <filename>qemux86</filename>,
+ <filename>qemuarm</filename>, and so forth),
+ then the artifacts are in place in your
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
</para></listitem>
- </itemizedlist>
+ <listitem><para>
+ If you have not built an image, you can go to the
+ <ulink url='&YOCTO_MACHINES_DL_URL;'>machines/qemu</ulink>
+ area and download a pre-built image that matches
+ your architecture and can be run on QEMU.
+ </para></listitem>
+ </itemizedlist></para>
+
+ <para>See the
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
+ section in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual
+ for information on how to extract a root filesystem.
</para></listitem>
- <listitem><para><filename>kvm-vhost</filename>:
- Enables KVM with VHOST support when running "qemux86" or "qemux86-64"
- QEMU architectures.
- For KVM with VHOST to work, the following conditions must
- be met:
+ <listitem><para>
+ <emphasis>Run QEMU:</emphasis>
+ The basic <filename>runqemu</filename> command syntax is as
+ follows:
+ <literallayout class='monospaced'>
+ $ runqemu [<replaceable>option</replaceable> ] [...]
+ </literallayout>
+ Based on what you provide on the command line,
+ <filename>runqemu</filename> does a good job of figuring
+ out what you are trying to do.
+ For example, by default, QEMU looks for the most recently
+ built image according to the timestamp when it needs to
+ look for an image.
+ Minimally, through the use of options, you must provide
+ either a machine name, a virtual machine image
+ (<filename>*wic.vmdk</filename>), or a kernel image
+ (<filename>*.bin</filename>).</para>
+
+ <para>Here are some additional examples to help illustrate
+ further QEMU:
<itemizedlist>
<listitem><para>
- <link linkend='kvm-cond'>kvm</link> option
- conditions must be met.
+ This example starts QEMU with
+ <replaceable>MACHINE</replaceable> set to "qemux86".
+ Assuming a standard
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+ <filename>runqemu</filename> automatically finds the
+ <filename>bzImage-qemux86.bin</filename> image file and
+ the
+ <filename>core-image-minimal-qemux86-20140707074611.rootfs.ext3</filename>
+ (assuming the current build created a
+ <filename>core-image-minimal</filename> image).
+ <note>
+ When more than one image with the same name exists, QEMU finds
+ and uses the most recently built image according to the
+ timestamp.
+ </note>
+ <literallayout class='monospaced'>
+ $ runqemu qemux86
+ </literallayout>
</para></listitem>
<listitem><para>
- Your build host has to have virtio net device, which
- are <filename>/dev/vhost-net</filename>.
+ This example produces the exact same results as the
+ previous example.
+ This command, however, specifically provides the image
+ and root filesystem type.
+ <literallayout class='monospaced'>
+ $ runqemu qemux86 core-image-minimal ext3
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ This example specifies to boot an initial RAM disk image
+ and to enable audio in QEMU.
+ For this case, <filename>runqemu</filename> set the
+ internal variable <filename>FSTYPE</filename> to
+ "cpio.gz".
+ Also, for audio to be enabled, an appropriate driver must
+ be installed (see the previous description for the
+ <filename>audio</filename> option for more information).
+ <literallayout class='monospaced'>
+ $ runqemu qemux86 ramfs audio
+ </literallayout>
</para></listitem>
<listitem><para>
- The build host <filename>/dev/vhost-net</filename>
- directory has to be either readable or writable
- and “slirp-enabled”.
+ This example does not provide enough information for
+ QEMU to launch.
+ While the command does provide a root filesystem type, it
+ must also minimally provide a
+ <replaceable>MACHINE</replaceable>,
+ <replaceable>KERNEL</replaceable>, or
+ <replaceable>VM</replaceable> option.
+ <literallayout class='monospaced'>
+ $ runqemu ext3
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ This example specifies to boot a virtual machine
+ image (<filename>.wic.vmdk</filename> file).
+ From the <filename>.wic.vmdk</filename>,
+ <filename>runqemu</filename> determines the QEMU
+ architecture (<replaceable>MACHINE</replaceable>) to be
+ "qemux86" and the root filesystem type to be "vmdk".
+ <literallayout class='monospaced'>
+ $ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86.wic.vmdk
+ </literallayout>
</para></listitem>
</itemizedlist>
</para></listitem>
- <listitem><para><filename>publicvnc</filename>:
- Enables a VNC server open to all hosts.
- </para></listitem>
- </itemizedlist>
+ </orderedlist>
</para>
+ </section>
- <para>
- For further understanding regarding option use with
- <filename>runqemu</filename>, consider some examples.
- </para>
+ <section id='switching-between-consoles'>
+ <title>Switching Between Consoles</title>
<para>
- This example starts QEMU with
- <replaceable>MACHINE</replaceable> set to "qemux86".
- Assuming a standard
- <link linkend='build-directory'>Build Directory</link>,
- <filename>runqemu</filename> automatically finds the
- <filename>bzImage-qemux86.bin</filename> image file and
- the
- <filename>core-image-minimal-qemux86-20140707074611.rootfs.ext3</filename>
- (assuming the current build created a
- <filename>core-image-minimal</filename> image).
+ When booting or running QEMU, you can switch between
+ supported consoles by using
+ Ctrl+Alt+<replaceable>number</replaceable>.
+ For example, Ctrl+Alt+3 switches you to the serial console
+ as long as that console is enabled.
+ Being able to switch consoles is helpful, for example, if
+ the main QEMU console breaks for some reason.
<note>
- When more than one image with the same name exists, QEMU finds
- and uses the most recently built image according to the
- timestamp.
+ Usually, "2" gets you to the main console and "3"
+ gets you to the serial console.
</note>
- <literallayout class='monospaced'>
- $ runqemu qemux86
- </literallayout>
- This example produces the exact same results as the
- previous example.
- This command, however, specifically provides the image
- and root filesystem type.
- <literallayout class='monospaced'>
- $ runqemu qemux86 core-image-minimal ext3
- </literallayout>
- This example specifies to boot an initial RAM disk image
- and to enable audio in QEMU.
- For this case, <filename>runqemu</filename> set the
- internal variable <filename>FSTYPE</filename> to
- "cpio.gz".
- Also, for audio to be enabled, an appropriate driver must
- be installed (see the previous description for the
- <filename>audio</filename> option for more information).
- <literallayout class='monospaced'>
- $ runqemu qemux86 ramfs audio
- </literallayout>
- This example does not provide enough information for
- QEMU to launch.
- While the command does provide a root filesystem type, it
- must also minimally provide a
- <replaceable>MACHINE</replaceable>,
- <replaceable>KERNEL</replaceable>, or
- <replaceable>VM</replaceable> option.
- <literallayout class='monospaced'>
- $ runqemu ext3
- </literallayout>
- This example specifies to boot a virtual machine image
- (<filename>.vmdk</filename> file).
- From the <filename>.vmdk</filename>,
- <filename>runqemu</filename> determines the QEMU
- architecture (<replaceable>MACHINE</replaceable>) to be
- "qemux86" and the root filesystem type to be "vmdk".
- <literallayout class='monospaced'>
- $ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86.vmdk
- </literallayout>
</para>
</section>
-</section>
-<section id='qemu-running-under-a-network-file-system-nfs-server'>
- <title>Running Under a Network File System (NFS) Server</title>
+ <section id='removing-the-splash-screen'>
+ <title>Removing the Splash Screen</title>
- <para>
- One method for running QEMU is to run it on an NFS server.
- This is useful when you need to access the same file system from both
- the build and the emulated system at the same time.
- It is also worth noting that the system does not need root privileges
- to run.
- It uses a user space NFS server to avoid that.
- This section describes how to set up for running QEMU using an NFS
- server and then how you can start and stop the server.
- </para>
+ <para>
+ You can remove the splash screen when QEMU is booting by
+ using Alt+left.
+ Removing the splash screen allows you to see what is
+ happening in the background.
+ </para>
+ </section>
- <section id='qemu-setting-up-to-use-nfs'>
- <title>Setting Up to Use NFS</title>
+ <section id='disabling-the-cursor-grab'>
+ <title>Disabling the Cursor Grab</title>
<para>
- Once you are able to run QEMU in your environment, you can use the
- <filename>runqemu-extract-sdk</filename> script, which is located
- in the <filename>scripts</filename> directory along with
- <filename>runqemu</filename> script.
- The <filename>runqemu-extract-sdk</filename> takes a root
- file system tarball and extracts it into a location that you
- specify.
- Then, when you run <filename>runqemu</filename>, you can specify
- the location that has the file system to pass it to QEMU.
- Here is an example that takes a file system and extracts it to
- a directory named <filename>test-nfs</filename>:
- <literallayout class='monospaced'>
- runqemu-extract-sdk ./tmp/deploy/images/qemux86/core-image-sato-qemux86.tar.bz2 test-nfs
- </literallayout>
- Once you have extracted the file system, you can run
- <filename>runqemu</filename> normally with the additional
- location of the file system.
- You can then also make changes to the files within
- <filename>./test-nfs</filename> and see those changes appear in the
- image in real time.
- Here is an example using the <filename>qemux86</filename> image:
- <literallayout class='monospaced'>
- runqemu qemux86 ./test-nfs
- </literallayout>
+ The default QEMU integration captures the cursor within the
+ main window.
+ It does this since standard mouse devices only provide
+ relative input and not absolute coordinates.
+ You then have to break out of the grab using the "Ctrl+Alt"
+ key combination.
+ However, the Yocto Project's integration of QEMU enables
+ the wacom USB touch pad driver by default to allow input
+ of absolute coordinates.
+ This default means that the mouse can enter and leave the
+ main window without the grab taking effect leading to a
+ better user experience.
</para>
</section>
- <section id='qemu-starting-and-stopping-nfs'>
- <title>Starting and Stopping NFS</title>
+ <section id='qemu-running-under-a-network-file-system-nfs-server'>
+ <title>Running Under a Network File System (NFS) Server</title>
<para>
- You can manually start and stop the NFS share using these
- commands:
- <itemizedlist>
- <listitem><para><emphasis><filename>start</filename>:</emphasis>
- Starts the NFS share:
+ One method for running QEMU is to run it on an NFS server.
+ This is useful when you need to access the same file system
+ from both the build and the emulated system at the same time.
+ It is also worth noting that the system does not need root
+ privileges to run.
+ It uses a user space NFS server to avoid that.
+ Follow these steps to set up for running QEMU using an NFS
+ server.
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Extract a Root Filesystem:</emphasis>
+ Once you are able to run QEMU in your environment, you can
+ use the <filename>runqemu-extract-sdk</filename> script,
+ which is located in the <filename>scripts</filename>
+ directory along with the <filename>runqemu</filename>
+ script.</para>
+
+ <para>The <filename>runqemu-extract-sdk</filename> takes a
+ root filesystem tarball and extracts it into a location
+ that you specify.
+ Here is an example that takes a file system and
+ extracts it to a directory named
+ <filename>test-nfs</filename>:
<literallayout class='monospaced'>
- runqemu-export-rootfs start <replaceable>file-system-location</replaceable>
+ runqemu-extract-sdk ./tmp/deploy/images/qemux86/core-image-sato-qemux86.tar.bz2 test-nfs
</literallayout>
</para></listitem>
- <listitem><para><emphasis><filename>stop</filename>:</emphasis>
- Stops the NFS share:
+ <listitem><para>
+ <emphasis>Start QEMU:</emphasis>
+ Once you have extracted the file system, you can run
+ <filename>runqemu</filename> normally with the additional
+ location of the file system.
+ You can then also make changes to the files within
+ <filename>./test-nfs</filename> and see those changes
+ appear in the image in real time.
+ Here is an example using the <filename>qemux86</filename>
+ image:
<literallayout class='monospaced'>
- runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
+ runqemu qemux86 ./test-nfs
</literallayout>
</para></listitem>
- <listitem><para><emphasis><filename>restart</filename>:</emphasis>
- Restarts the NFS share:
- <literallayout class='monospaced'>
+ </orderedlist>
+ <note>
+ <para>
+ Should you need to start, stop, or restart the NFS share,
+ you can use the following commands:
+ <itemizedlist>
+ <listitem><para>
+ The following command starts the NFS share:
+ <literallayout class='monospaced'>
+ runqemu-export-rootfs start <replaceable>file-system-location</replaceable>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ The following command stops the NFS share:
+ <literallayout class='monospaced'>
+ runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ The following command restarts the NFS share:
+ <literallayout class='monospaced'>
runqemu-export-rootfs restart <replaceable>file-system-location</replaceable>
- </literallayout>
- </para></listitem>
- </itemizedlist>
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </note>
</para>
</section>
-</section>
-
-<section id='qemu-tips-and-tricks'>
- <title>Tips and Tricks</title>
-
- <para>
- The following list describes things you can do to make running QEMU
- in the context of the Yocto Project a better experience:
- <itemizedlist>
- <listitem><para><emphasis>Switching Between Consoles:</emphasis>
- When booting or running QEMU, you can switch between
- supported consoles by using
- Ctrl+Alt+<replaceable>number</replaceable>.
- For example, Ctrl+Alt+3 switches you to the serial console as
- long as that console is enabled.
- Being able to switch consoles is helpful, for example, if the
- main QEMU console breaks for some reason.
- <note>
- Usually, "2" gets you to the main console and "3" gets you
- to the serial console.
- </note>
- </para></listitem>
- <listitem><para><emphasis>Removing the Splash Screen:</emphasis>
- You can remove the splash screen when QEMU is booting by
- using Alt+left.
- Removing the splash screen allows you to see what is happening
- in the background.
- </para></listitem>
- <listitem><para><emphasis>Disabling the Cursor Grab:</emphasis>
- The default QEMU integration captures the cursor within the
- main window.
- It does this since standard mouse devices only provide relative
- input and not absolute coordinates.
- You then have to break out of the grab using the "Ctrl+Alt" key
- combination.
- However, the Yocto Project's integration of QEMU enables the
- wacom USB touch pad driver by default to allow input of absolute
- coordinates.
- This default means that the mouse can enter and leave the
- main window without the grab taking effect leading to a better
- user experience.
- </para></listitem>
- </itemizedlist>
- </para>
-</section>
-
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml
index b8527f670a..195b22d0b1 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual-start.xml
@@ -7,523 +7,744 @@
<title>Getting Started with the Yocto Project</title>
<para>
- This chapter introduces the Yocto Project and gives you an idea of what you need to get started.
- You can find enough information to set up your development host and build or use images for
- hardware supported by the Yocto Project by reading the
+ This chapter provides procedures related to getting set up to use the
+ Yocto Project.
+ For a more front-to-end process that takes you from minimally preparing
+ a build host through building an image, see the
<ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
</para>
-<para>
- The remainder of this chapter summarizes what is in the Yocto Project Quick Start and provides
- some higher-level concepts you might want to consider.
-</para>
-
-<section id='introducing-the-yocto-project'>
- <title>Introducing the Yocto Project</title>
+<section id='setting-up-the-development-host-to-use-the-yocto-project'>
+ <title>Setting Up the Development Host to Use the Yocto Project</title>
<para>
- The Yocto Project is an open-source collaboration project focused on embedded Linux development.
- The project currently provides a build system that is
- referred to as the
- <link linkend='build-system-term'>OpenEmbedded build system</link>
- in the Yocto Project documentation.
- The Yocto Project provides various ancillary tools for the embedded developer
- and also features the Sato reference User Interface, which is optimized for
- stylus-driven, low-resolution screens.
+ This section provides procedures to set up your development host to
+ use the Yocto Project.
+ You can use the Yocto Project on a native Linux development host or
+ you can use
+ <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
+ which leverages
+ <ulink url='https://www.docker.com/'>Docker Containers</ulink>,
+ to prepare any Linux, Mac, or Windows development host.
</para>
<para>
- You can use the OpenEmbedded build system, which uses
- <link linkend='bitbake-term'>BitBake</link>, to develop complete Linux
- images and associated user-space applications for architectures based
- on ARM, MIPS, PowerPC, x86 and x86-64.
- <note>
- By default, using the Yocto Project creates a Poky distribution.
- However, you can create your own distribution by providing key
- <link linkend='metadata'>Metadata</link>.
- See the "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
- section for more information.
- </note>
- While the Yocto Project does not provide a strict testing framework,
- it does provide or generate for you artifacts that let you perform target-level and
- emulated testing and debugging.
- Additionally, if you are an <trademark class='trade'>Eclipse</trademark>
- IDE user, you can install an Eclipse Yocto Plug-in to allow you to
- develop within that familiar environment.
+ Once your development host is set up to use the Yocto Project,
+ further steps are necessary depending on what you want to
+ accomplish.
+ See the following references for information on how to prepare for
+ Board Support Package (BSP) development, kernel development, and
+ development using the <trademark class='trade'>Eclipse</trademark> IDE:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>BSP Development:</emphasis>
+ See the
+ "<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>"
+ section in the Yocto Project Board Support Package (BSP)
+ Developer's Guide.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Kernel Development:</emphasis>
+ See the
+ "<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>"
+ section in the Yocto Project Linux Kernel Development Manual.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Eclipse Development:</emphasis>
+ See the
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></ulink>"
+ Chapter in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
+ </para></listitem>
+ </itemizedlist>
</para>
+
+ <section id='setting-up-a-native-linux-host'>
+ <title>Setting Up a Native Linux Host</title>
+
+ <para>
+ Follow these steps to prepare a native Linux machine as your
+ Yocto Project development host:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Use a Supported Linux Distribution:</emphasis>
+ You should have a reasonably current Linux-based host
+ system.
+ You will have the best results with a recent release of
+ Fedora, openSUSE, Debian, Ubuntu, or CentOS as these
+ releases are frequently tested against the Yocto Project
+ and officially supported.
+ For a list of the distributions under validation and their
+ status, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
+ in the Yocto Project Reference Manual and the wiki page at
+ <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Have Enough Free Memory:</emphasis>
+ You should have at least 50 Gbytes of free disk space
+ for building images.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Meet Minimal Version Requirements:</emphasis>
+ The OpenEmbedded build system should be able to run on any
+ modern distribution that has the following versions for
+ Git, tar, and Python.
+ <itemizedlist>
+ <listitem><para>
+ Git 1.8.3.1 or greater
+ </para></listitem>
+ <listitem><para>
+ tar 1.27 or greater
+ </para></listitem>
+ <listitem><para>
+ Python 3.4.0 or greater.
+ </para></listitem>
+ </itemizedlist>
+ If your build host does not meet any of these three listed
+ version requirements, you can take steps to prepare the
+ system so that you can still use the Yocto Project.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
+ section in the Yocto Project Reference Manual for
+ information.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Install Development Host Packages:</emphasis>
+ Required development host packages vary depending on your
+ build machine and what you want to do with the Yocto
+ Project.
+ Collectively, the number of required packages is large
+ if you want to be able to cover all cases.</para>
+
+ <para>For lists of required packages for all scenarios,
+ see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
+ section in the Yocto Project Reference Manual.
+ </para></listitem>
+ </orderedlist>
+ Once you have completed the previous steps, you are ready to
+ continue using a given development path on your native Linux
+ machine.
+ If you are going to use BitBake, see the
+ "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
+ section.
+ If you are going to use the Extensible SDK, see the
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
+ Chapter in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
+ If you want to work on the kernel, see the
+ <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
+ If you are going to use Toaster, see the
+ "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>"
+ section in the Toaster User Manual.
+ </para>
+ </section>
+
+ <section id='setting-up-to-use-crops'>
+ <title>Setting Up to Use CROss PlatformS (CROPS)</title>
+
+ <para>
+ With
+ <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
+ which leverages
+ <ulink url='https://www.docker.com/'>Docker Containers</ulink>,
+ you can create a Yocto Project development environment that
+ is operating system agnostic.
+ You can set up a container in which you can develop using the
+ Yocto Project on a Windows, Mac, or Linux machine.
+ </para>
+
+ <para>
+ Follow these general steps to prepare a Windows, Mac, or Linux
+ machine as your Yocto Project development host:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Go to the Docker Installation Site:</emphasis>
+ <ulink url='https://www.docker.com/what-docker'>Docker</ulink>
+ is a software container platform that you need to install
+ on the host development machine.
+ To start the installation process, see the
+ <ulink url='https://docs.docker.com/engine/installation/'>Docker Installation</ulink>
+ site.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Choose Your Docker Edition:</emphasis>
+ Docker comes in several editions.
+ For the Yocto Project, the stable community edition
+ (i.e. "Docker CE Stable") is adequate.
+ You can learn more about the Docker editions from the
+ site.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Go the Install Site for Your Platform:</emphasis>
+ Click the link for the Docker edition associated with
+ your development host machine's native software.
+ For example, if your machine is running Microsoft
+ Windows Version 10 and you want the Docker CE Stable
+ edition, click that link under "Supported Platforms".
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Understand What You Need:</emphasis>
+ The install page has pre-requisites your machine must
+ meet.
+ Be sure you read through this page and make sure your
+ machine meets the requirements to run Docker.
+ If your machine does not meet the requirements, the page
+ has instructions to handle exceptions.
+ For example, to run Docker on Windows 10, you must have
+ the pro version of the operating system.
+ If you have the home version, you need to install the
+ <ulink url='https://docs.docker.com/toolbox/overview/#ready-to-get-started'>Docker Toolbox</ulink>.
+ </para>
+
+ <para>Another example is that a Windows machine needs to
+ have Microsoft Hyper-V.
+ If you have a legacy version of the the Microsoft
+ operating system or for any other reason you do not have
+ Microsoft Hyper-V, you would have to enter the BIOS and
+ enable virtualization.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Install the Software:</emphasis>
+ Once you have understood all the pre-requisites, you can
+ download and install the appropriate software.
+ Follow the instructions for your specific machine and
+ the type of the software you need to install.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Optionally Orient Yourself With Dockers:</emphasis>
+ If you are unfamiliar with Dockers and the container
+ concept, you can learn more here -
+ <ulink url='https://docs.docker.com/get-started/'></ulink>.
+ You should be able to launch Docker or the Docker Toolbox
+ and have a terminal shell on your development host.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Set Up the Containers to Use the Yocto Project:</emphasis>
+ Go to
+ <ulink url='https://github.com/crops/docker-win-mac-docs/wiki'></ulink>
+ and follow the directions for your particular
+ development host (i.e. Linux, Mac, or Windows).</para>
+
+ <para>Once you complete the setup instructions for your
+ machine, you have the Poky, Extensible SDK, and Toaster
+ containers available.
+ You can click those links from the page and learn more
+ about using each of those containers.
+ </para></listitem>
+ </orderedlist>
+ Once you have a container set up, everything is in place to
+ develop just as if you were running on a native Linux machine.
+ If you are going to use the Poky container, see the
+ "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
+ section.
+ If you are going to use the Extensible SDK container, see the
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
+ Chapter in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
+ If you are going to use the Toaster container, see the
+ "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>"
+ section in the Toaster User Manual.
+ </para>
+ </section>
</section>
-<section id='getting-setup'>
- <title>Getting Set Up</title>
+<section id='working-with-yocto-project-source-files'>
+ <title>Working With Yocto Project Source Files</title>
<para>
- Here is what you need to use the Yocto Project:
- <itemizedlist>
- <listitem><para><emphasis>Host System:</emphasis> You should have a reasonably current
- Linux-based host system.
- You will have the best results with a recent release of Fedora,
- openSUSE, Debian, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project
- and officially supported.
- For a list of the distributions under validation and their status, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
- in the Yocto Project Reference Manual and the wiki page at
- <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>.</para>
- <para>
- You should also have about 50 Gbytes of free disk space for building images.
- </para></listitem>
- <listitem><para><emphasis>Packages:</emphasis> The OpenEmbedded build system
- requires that certain packages exist on your development system (e.g. Python 2.7).
- See "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>"
- section in the Yocto Project Quick Start and the
- "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
- section in the Yocto Project Reference Manual for the exact
- package requirements and the installation commands to install
- them for the supported distributions.
- </para></listitem>
- <listitem id='local-yp-release'><para><emphasis>Yocto Project Release:</emphasis>
- You need a release of the Yocto Project locally installed on
- your development system.
- The documentation refers to this set of locally installed files
- as the <link linkend='source-directory'>Source Directory</link>.
- You create your Source Directory by using
- <link linkend='git'>Git</link> to clone a local copy
- of the upstream <filename>poky</filename> repository,
- or by downloading and unpacking a tarball of an official
- Yocto Project release.
- The preferred method is to create a clone of the repository.
- </para>
- <para>Working from a copy of the upstream repository allows you
- to contribute back into the Yocto Project or simply work with
- the latest software on a development branch.
- Because Git maintains and creates an upstream repository with
- a complete history of changes and you are working with a local
- clone of that repository, you have access to all the Yocto
- Project development branches and tag names used in the upstream
- repository.</para>
- <note>You can view the Yocto Project Source Repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>
- </note>
- <para>The following transcript shows how to clone the
- <filename>poky</filename> Git repository into the current
- working directory.
- The command creates the local repository in a directory
- named <filename>poky</filename>.
- For information on Git used within the Yocto Project, see
- the "<link linkend='git'>Git</link>" section.
- <literallayout class='monospaced'>
+ This section contains procedures related to locating and securing
+ Yocto Project files.
+ You establish and use these local files to work on projects.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ For concepts and introductory information about Git as it
+ is used in the Yocto Project, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>"
+ section in the Yocto Project Reference Manual.
+ </para></listitem>
+ <listitem><para>
+ For concepts on Yocto Project source repositories, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
+ section in the Yocto Project Reference Manual."
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
+
+ <section id='accessing-source-repositories'>
+ <title>Accessing Source Repositories</title>
+
+ <para>
+ Yocto Project maintains upstream Git
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ that you can examine and access using a browser-based UI:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Access Repositories:</emphasis>
+ Open a browser and go to
+ <ulink url='&YOCTO_GIT_URL;'></ulink> to access the
+ GUI-based interface into the Yocto Project source
+ repositories.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Select a Repository:</emphasis>
+ Click on any repository in which you are interested (e.g.
+ <filename>poky</filename>).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Find the URL Used to Clone the Repository:</emphasis>
+ At the bottom of the page, note the URL used to
+ <ulink url='&YOCTO_DOCS_REF_URL;#git-commands-clone'>clone</ulink>
+ that repository (e.g.
+ <filename>&YOCTO_GIT_URL;/poky</filename>).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Examine Change History of the Repository:</emphasis>
+ At the top of the page, click on any branch in which you
+ might be interested (e.g.
+ <filename>&DISTRO_NAME_NO_CAP;</filename>).
+ You can then view the commit log or tree view for that
+ development branch.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='accessing-index-of-releases'>
+ <title>Accessing Index of Releases</title>
+
+ <para>
+ Yocto Project maintains an Index of Releases area that contains
+ related files that contribute to the Yocto Project.
+ Rather than Git repositories, these files represent snapshot
+ tarballs.
+ <note><title>Tip</title>
+ The recommended method for accessing Yocto Project
+ components is to use Git to clone a repository and work from
+ within that local repository.
+ The procedure in this section exists should you desire a
+ tarball snapshot of any given component.
+ </note>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Access the Index of Releases:</emphasis>
+ Open a browser and go to
+ <ulink url='&YOCTO_DL_URL;/releases'></ulink> to access the
+ Index of Releases.
+ The list represents released components (e.g.
+ <filename>eclipse-plugin</filename>,
+ <filename>sato</filename>, and so on).
+ <note>
+ The <filename>yocto</filename> directory contains the
+ full array of released Poky tarballs.
+ The <filename>poky</filename> directory in the
+ Index of Releases was historically used for very
+ early releases and exists for retroactive
+ completeness only.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Select a Component:</emphasis>
+ Click on any released component in which you are interested
+ (e.g. <filename>yocto</filename>).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Find the Tarball:</emphasis>
+ Drill down to find the associated tarball.
+ For example, click on <filename>yocto-&DISTRO;</filename> to
+ view files associated with the Yocto Project &DISTRO;
+ release (e.g. <filename>poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;.tar.bz2</filename>,
+ which is the released Poky tarball).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Download the Tarball:</emphasis>
+ Click a tarball to download and save a snapshot of a
+ given component.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='using-the-downloads-page'>
+ <title>Using the Downloads Page</title>
+
+ <para>
+ The
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
+ uses a "Downloads" area from which you can locate and download
+ tarballs of any Yocto Project release.
+ Rather than Git repositories, these files represent snapshot
+ tarballs.
+ <note><title>Tip</title>
+ The recommended method for accessing Yocto Project
+ components is to use Git to clone a repository and work from
+ within that local repository.
+ The procedure in this section exists should you desire a
+ tarball snapshot of any given component.
+ </note>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Go to the Yocto Project Website:</emphasis>
+ Open The
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
+ in your browser.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Get to the Downloads Area:</emphasis>
+ Click the "Downloads" tab.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Select the Type of Files:</emphasis>
+ Click the type of files you want (i.e "Build System",
+ "Tools", or "Board Support Packages (BSPs)".
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Locate and Download the Tarball:</emphasis>
+ From the list of releases, locate the appropriate
+ download link and download the files.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='cloning-the-poky-repository'>
+ <title>Cloning the <filename>poky</filename> Repository</title>
+
+ <para>
+ To use the Yocto Project, you need a release of the Yocto Project
+ locally installed on your development system.
+ The locally installed set of files is referred to as the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ in the Yocto Project documentation.
+ </para>
+
+ <para>
+ You create your Source Directory by using
+ <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink> to clone a local
+ copy of the upstream <filename>poky</filename> repository.
+ <note><title>Tip</title>
+ The preferred method of getting the Yocto Project Source
+ Directory set up is to clone the repository.
+ </note>
+ Working from a copy of the upstream repository allows you
+ to contribute back into the Yocto Project or simply work with
+ the latest software on a development branch.
+ Because Git maintains and creates an upstream repository with
+ a complete history of changes and you are working with a local
+ clone of that repository, you have access to all the Yocto
+ Project development branches and tag names used in the upstream
+ repository.
+ </para>
+
+ <para>
+ Follow these steps to create a local version of the
+ upstream
+ <ulink url='&YOCTO_DOCS_REF_URL;#poky'><filename>poky</filename></ulink>
+ Git repository.
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Set Your Directory:</emphasis>
+ Be in the directory where you want to create your local
+ copy of poky.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Clone the Repository:</emphasis>
+ The following command clones the repository and uses
+ the default name "poky" for your local repository:
+ <literallayout class='monospaced'>
$ git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
- remote: Counting objects: 226790, done.
- remote: Compressing objects: 100% (57465/57465), done.
- remote: Total 226790 (delta 165212), reused 225887 (delta 164327)
- Receiving objects: 100% (226790/226790), 100.98 MiB | 263 KiB/s, done.
- Resolving deltas: 100% (165212/165212), done.
- </literallayout></para>
- <para>For another example of how to set up your own local Git
- repositories, see this
- <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
- wiki page</ulink>, which describes how to create local
- Git repositories for both
- <filename>poky</filename> and <filename>meta-intel</filename>.
- </para>
- <para>
- You can also get the Yocto Project Files by downloading
- Yocto Project releases from the
- <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
- From the website, you just click "Downloads" in the navigation
- pane to the left to display all Yocto Project downloads.
- Current and archived releases are available for download.
- Nightly and developmental builds are also maintained at
- <ulink url="&YOCTO_AB_NIGHTLY_URL;"></ulink>.
- One final site you can visit for information on Yocto Project
- releases is the
- <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
- wiki.
- </para></listitem>
- <listitem id='local-kernel-files'><para><emphasis>Yocto Project Kernel:</emphasis>
- If you are going to be making modifications to a supported Yocto Project kernel, you
- need to establish local copies of the source.
- You can find Git repositories of supported Yocto Project kernels organized under
- "Yocto Linux Kernel" in the Yocto Project Source Repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
- <para>This setup can involve creating a bare clone of the Yocto Project kernel and then
- copying that cloned repository.
- You can create the bare clone and the copy of the bare clone anywhere you like.
- For simplicity, it is recommended that you create these structures outside of the
- Source Directory, which is usually named <filename>poky</filename>.</para>
- <para>As an example, the following transcript shows how to create the bare clone
- of the <filename>linux-yocto-3.19</filename> kernel and then create a copy of
- that clone.
- <note>When you have a local Yocto Project kernel Git repository, you can
- reference that repository rather than the upstream Git repository as
- part of the <filename>clone</filename> command.
- Doing so can speed up the process.</note></para>
- <para>In the following example, the bare clone is named
- <filename>linux-yocto-3.19.git</filename>, while the
- copy is named <filename>my-linux-yocto-3.19-work</filename>:
- <literallayout class='monospaced'>
- $ git clone --bare git://git.yoctoproject.org/linux-yocto-3.19 linux-yocto-3.19.git
- Cloning into bare repository 'linux-yocto-3.19.git'...
- remote: Counting objects: 3983256, done.
- remote: Compressing objects: 100% (605006/605006), done.
- remote: Total 3983256 (delta 3352832), reused 3974503 (delta 3344079)
- Receiving objects: 100% (3983256/3983256), 843.66 MiB | 1.07 MiB/s, done.
- Resolving deltas: 100% (3352832/3352832), done.
+ remote: Counting objects: 367178, done.
+ remote: Compressing objects: 100% (88161/88161), done.
+ remote: Total 367178 (delta 272761), reused 366942 (delta 272525)
+ Receiving objects: 100% (367178/367178), 133.26 MiB | 6.40 MiB/s, done.
+ Resolving deltas: 100% (272761/272761), done.
Checking connectivity... done.
- </literallayout></para>
- <para>Now create a clone of the bare clone just created:
- <literallayout class='monospaced'>
- $ git clone linux-yocto-3.19.git my-linux-yocto-3.19-work
- Cloning into 'my-linux-yocto-3.19-work'...
- done.
- Checking out files: 100% (48440/48440), done.
- </literallayout></para></listitem>
- <listitem id='meta-yocto-kernel-extras-repo'><para><emphasis>
- The <filename>meta-yocto-kernel-extras</filename> Git Repository</emphasis>:
- The <filename>meta-yocto-kernel-extras</filename> Git repository contains Metadata needed
- only if you are modifying and building the kernel image.
- In particular, it contains the kernel BitBake append (<filename>.bbappend</filename>)
- files that you
- edit to point to your locally modified kernel source files and to build the kernel
- image.
- Pointing to these local files is much more efficient than requiring a download of the
- kernel's source files from upstream each time you make changes to the kernel.</para>
- <para>You can find the <filename>meta-yocto-kernel-extras</filename> Git Repository in the
- "Yocto Metadata Layers" area of the Yocto Project Source Repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
- It is good practice to create this Git repository inside the Source Directory.</para>
- <para>Following is an example that creates the <filename>meta-yocto-kernel-extras</filename> Git
- repository inside the Source Directory, which is named <filename>poky</filename>
- in this case:
- <literallayout class='monospaced'>
- $ cd ~/poky
- $ git clone git://git.yoctoproject.org/meta-yocto-kernel-extras meta-yocto-kernel-extras
- Cloning into 'meta-yocto-kernel-extras'...
- remote: Counting objects: 727, done.
- remote: Compressing objects: 100% (452/452), done.
- remote: Total 727 (delta 260), reused 719 (delta 252)
- Receiving objects: 100% (727/727), 536.36 KiB | 240 KiB/s, done.
- Resolving deltas: 100% (260/260), done.
- </literallayout></para></listitem>
- <listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board Support Packages (BSPs):</emphasis>
- The Yocto Project supports many BSPs, which are maintained in
- their own layers or in layers designed to contain several
- BSPs.
- To get an idea of machine support through BSP layers, you can
- look at the
- <ulink url='&YOCTO_RELEASE_DL_URL;/machines'>index of machines</ulink>
- for the release.</para>
-
- <para>The Yocto Project uses the following BSP layer naming
- scheme:
- <literallayout class='monospaced'>
- meta-<replaceable>bsp_name</replaceable>
- </literallayout>
- where <replaceable>bsp_name</replaceable> is the recognized
- BSP name.
- Here is an example:
- <literallayout class='monospaced'>
- meta-raspberrypi
- </literallayout>
- See the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
- section in the Yocto Project Board Support Package (BSP)
- Developer's Guide for more information on BSP Layers.</para>
-
- <para>A useful Git repository released with the Yocto
- Project is <filename>meta-intel</filename>, which is a
- parent layer that contains many supported
- <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>.
- You can locate the <filename>meta-intel</filename> Git
- repository in the "Yocto Metadata Layers" area of the Yocto
- Project Source Repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
-
- <para>Using
- <link linkend='git'>Git</link> to create a local clone of the
- upstream repository can be helpful if you are working with
- BSPs.
- Typically, you set up the <filename>meta-intel</filename>
- Git repository inside the Source Directory.
- For example, the following transcript shows the steps to clone
- <filename>meta-intel</filename>.
- <note>
- Be sure to work in the <filename>meta-intel</filename>
- branch that matches your
- <link linkend='source-directory'>Source Directory</link>
- (i.e. <filename>poky</filename>) branch.
- For example, if you have checked out the "master" branch
- of <filename>poky</filename> and you are going to use
- <filename>meta-intel</filename>, be sure to checkout the
- "master" branch of <filename>meta-intel</filename>.
- </note>
- <literallayout class='monospaced'>
+ </literallayout>
+ Unless you specify a specific development branch or
+ tag name, Git clones the "master" branch, which results
+ in a snapshot of the latest development changes for
+ "master".
+ For information on how to check out a specific
+ development branch or on how to check out a local
+ branch based on a tag name, see the
+ "<link linkend='checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</link>"
+ and
+ <link linkend='checkout-out-by-tag-in-poky'>Checking Out By Tag in Poky</link>",
+ respectively.</para>
+
+ <para>Once the repository is created, you can change to
+ that directory and check its status.
+ Here, the single "master" branch exists on your system
+ and by default, it is checked out:
+ <literallayout class='monospaced'>
$ cd ~/poky
- $ git clone git://git.yoctoproject.org/meta-intel.git
- Cloning into 'meta-intel'...
- remote: Counting objects: 11917, done.
- remote: Compressing objects: 100% (3842/3842), done.
- remote: Total 11917 (delta 6840), reused 11699 (delta 6622)
- Receiving objects: 100% (11917/11917), 2.92 MiB | 2.88 MiB/s, done.
- Resolving deltas: 100% (6840/6840), done.
- Checking connectivity... done.
- </literallayout></para>
+ $ git status
+ On branch master
+ Your branch is up-to-date with 'origin/master'.
+ nothing to commit, working directory clean
+ $ git branch
+ * master
+ </literallayout>
+ Your local repository of poky is identical to the
+ upstream poky repository at the time from which it was
+ cloned.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
- <para>The same
- <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink>
- referenced earlier covers how to set up the
- <filename>meta-intel</filename> Git repository.
- </para></listitem>
- <listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing
- applications using the Eclipse Integrated Development Environment (IDE),
- you will need this plug-in.
- See the
- "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-appendix-latest-yp-eclipse-plug-in'>Using Eclipse</ulink>"
- section in the Yocto Project Software Development Kit (SDK)
- Developer's Guide for more information.</para></listitem>
- </itemizedlist>
- </para>
+ <section id='checking-out-by-branch-in-poky'>
+ <title>Checking Out by Branch in Poky</title>
+
+ <para>
+ When you clone the upstream poky repository, you have access to
+ all its development branches.
+ Each development branch in a repository is unique as it forks
+ off the "master" branch.
+ To see and use the files of a particular development branch
+ locally, you need to know the branch name and then specifically
+ check out that development branch.
+ <note>
+ Checking out an active development branch by branch name
+ gives you a snapshot of that particular branch at the time
+ you check it out.
+ Further development on top of the branch that occurs after
+ check it out can occur.
+ </note>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Switch to the Poky Directory:</emphasis>
+ If you have a local poky Git repository, switch to that
+ directory.
+ If you do not have the local copy of poky, see the
+ "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Determine Existing Branch Names:</emphasis>
+ <literallayout class='monospaced'>
+ $ git branch -a
+ * master
+ remotes/origin/1.1_M1
+ remotes/origin/1.1_M2
+ remotes/origin/1.1_M3
+ remotes/origin/1.1_M4
+ remotes/origin/1.2_M1
+ remotes/origin/1.2_M2
+ remotes/origin/1.2_M3
+ .
+ .
+ .
+ remotes/origin/master-next
+ remotes/origin/master-next2
+ remotes/origin/morty
+ remotes/origin/pinky
+ remotes/origin/purple
+ remotes/origin/pyro
+ remotes/origin/rocko
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Checkout the Branch:</emphasis>
+ Checkout the development branch in which you want to work.
+ For example, to access the files for the Yocto Project
+ &DISTRO; Release (&DISTRO_NAME;), use the following command:
+ <literallayout class='monospaced'>
+ $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
+ Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
+ Switched to a new branch '&DISTRO_NAME_NO_CAP;'
+ </literallayout>
+ The previous command checks out the "&DISTRO_NAME_NO_CAP;"
+ development branch and reports that the branch is tracking
+ the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.</para>
+
+ <para>The following command displays the branches
+ that are now part of your local poky repository.
+ The asterisk character indicates the branch that is
+ currently checked out for work:
+ <literallayout class='monospaced'>
+ $ git branch
+ master
+ * &DISTRO_NAME_NO_CAP;
+ </literallayout>
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='checkout-out-by-tag-in-poky'>
+ <title>Checking Out by Tag in Poky</title>
+
+ <para>
+ Similar to branches, the upstream repository uses tags
+ to mark specific commits associated with significant points in
+ a development branch (i.e. a release point or stage of a
+ release).
+ You might want to set up a local branch based on one of those
+ points in the repository.
+ The process is similar to checking out by branch name except you
+ use tag names.
+ <note>
+ Checking out a branch based on a tag gives you a
+ stable set of files not affected by development on the
+ branch above the tag.
+ </note>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Switch to the Poky Directory:</emphasis>
+ If you have a local poky Git repository, switch to that
+ directory.
+ If you do not have the local copy of poky, see the
+ "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Fetch the Tag Names:</emphasis>
+ To checkout the branch based on a tag name, you need to
+ fetch the upstream tags into your local repository:
+ <literallayout class='monospaced'>
+ $ git fetch --tags
+ $
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>List the Tag Names:</emphasis>
+ You can list the tag names now:
+ <literallayout class='monospaced'>
+ $ git tag
+ 1.1_M1.final
+ 1.1_M1.rc1
+ 1.1_M1.rc2
+ 1.1_M2.final
+ 1.1_M2.rc1
+ .
+ .
+ .
+ yocto-2.2
+ yocto-2.2.1
+ yocto-2.3
+ yocto-2.3.1
+ yocto-2.4
+ yocto_1.5_M5.rc8
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Checkout the Branch:</emphasis>
+ <literallayout class='monospaced'>
+ $ git checkout tags/&DISTRO; -b my_yocto_&DISTRO;
+ Switched to a new branch 'my_yocto_&DISTRO;'
+ $ git branch
+ master
+ * my_yocto_&DISTRO;
+ </literallayout>
+ The previous command creates and checks out a local
+ branch named "my_yocto_&DISTRO;", which is based on
+ the commit in the upstream poky repository that has
+ the same tag.
+ In this example, the files you have available locally
+ as a result of the <filename>checkout</filename>
+ command are a snapshot of the
+ "&DISTRO_NAME_NO_CAP;" development branch at the point
+ where Yocto Project &DISTRO; was released.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
</section>
-<section id='building-images'>
- <title>Building Images</title>
+<section id='performing-a-simple-build'>
+ <title>Performing a Simple Build</title>
+
+ <para>
+ Several methods exist that allow you to build an image within the
+ Yocto Project.
+ This procedure shows how to build an image using BitBake from a
+ Linux host.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ For information on how to build an image using
+ <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>,
+ see the
+ <ulink url='&YOCTO_DOCS_TOAST_URL;'>Yocto Project Toaster Manual</ulink>.
+ </para></listitem>
+ <listitem><para>
+ For information on how to use
+ <filename>devtool</filename> to build images, see the
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow</ulink>"
+ section in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
<para>
- The build process creates an entire Linux distribution, including the toolchain, from source.
- For more information on this topic, see the
+ The build process creates an entire Linux distribution from source
+ and places it in your
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ under <filename>tmp/deploy/images</filename>.
+ For detailed information on the build process using BitBake, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#images-dev-environment'>Images</ulink>"
+ section in the Yocto Project Reference Manual.
+ You can also reference the
"<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
section in the Yocto Project Quick Start.
</para>
<para>
- The build process is as follows:
+ The following figure and list overviews the build process:
+ <imagedata fileref="figures/bitbake-build-flow.png" width="7in" depth="4in" align="center" scalefit="1" />
<orderedlist>
- <listitem><para>Make sure you have set up the Source Directory described in the
- previous section.</para></listitem>
- <listitem><para>Initialize the build environment by sourcing a build
+ <listitem><para>
+ <emphasis>Set up Your Host Development System to Support
+ Development Using the Yocto Project</emphasis>:
+ See the
+ "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
+ section in the Yocto Project Quick Start for options on how
+ to get a build host ready to use the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Initialize the Build Environment:</emphasis>
+ Initialize the build environment by sourcing the build
environment script (i.e.
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
</para></listitem>
- <listitem><para>Optionally ensure the <filename>conf/local.conf</filename> configuration file,
- which is found in the
- <link linkend='build-directory'>Build Directory</link>,
+ <listitem><para>
+ <emphasis>Make Sure Your <filename>local.conf</filename>
+ File is Correct:</emphasis>
+ Ensure the <filename>conf/local.conf</filename> configuration
+ file, which is found in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
is set up how you want it.
- This file defines many aspects of the build environment including
- the target machine architecture through the
+ This file defines many aspects of the build environment
+ including the target machine architecture through the
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable,
the packaging format used during the build
(<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>),
and a centralized tarball download directory through the
- <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'>DL_DIR</ulink></filename> variable.</para></listitem>
- <listitem><para>
- Build the image using the <filename>bitbake</filename> command.
- If you want information on BitBake, see the
- <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
- </para></listitem>
- <listitem><para>Run the image either on the actual hardware or using the QEMU
- emulator.</para></listitem>
- </orderedlist>
- </para>
-</section>
-
-<section id='flashing-images-using-bmaptool'>
- <title>Flashing Images Using <filename>bmaptool</filename></title>
-
- <para>
- An easy way to flash an image to a bootable device is to use
- <filename>bmaptool</filename>, which is integrated into the
- OpenEmbedded build system.
- </para>
-
- <para>
- Following, is an example that shows how to flash a Wic image.
- <note>
- You can use <filename>bmaptool</filename> to flash any
- type of image.
- </note>
- Use these steps to flash an image using
- <filename>bmaptool</filename>:
- <note>
- Unless you are able to install the
- <filename>bmap-tools</filename> package as mentioned in the note
- in the second bullet of step 3 further down, you will need to build
- <filename>bmaptool</filename> before using it.
- Build the tool using the following command:
- <literallayout class='monospaced'>
- $ bitbake bmap-tools-native
- </literallayout>
- </note>
- <orderedlist>
- <listitem><para>
- Add the following to your <filename>local.conf</filename>
- file:
- <literallayout class='monospaced'>
- IMAGE_FSTYPES += "wic wic.bmap"
- </literallayout>
+ <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'>DL_DIR</ulink></filename> variable.
</para></listitem>
<listitem><para>
- Either have your image ready (pre-built) or take the step
- build the image:
+ <emphasis>Build the Image:</emphasis>
+ Build the image using the <filename>bitbake</filename> command.
+ For example, the following command builds the
+ <filename>core-image-minimal</filename> image:
<literallayout class='monospaced'>
- $ bitbake <replaceable>image</replaceable>
+ $ bitbake core-image-minimal
</literallayout>
- </para></listitem>
- <listitem><para>
- Flash the image to the media by using
- <filename>bmaptool</filename> depending on your particular
- setup:
- <itemizedlist>
- <listitem><para>
- If you have write access to the media,
- use this command form:
- <literallayout class='monospaced'>
- $ oe-run-native bmaptool copy ./tmp/deploy/images/qemux86-64/core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
- </literallayout>
- </para></listitem>
- <listitem><para>
- If you do not have write access to
- the media, use the following
- commands:
- <literallayout class='monospaced'>
- $ sudo bash
- $ PATH=tmp/sysroots/x86_64-linux/usr/bin/ bmaptool copy ./tmp/deploy/images/qemux86-64/core-image-minimal-<replaceable>machine</replaceable>.wic /dev/sd<replaceable>X</replaceable>
- </literallayout>
- <note>
- If you are using Ubuntu or Debian distributions,
- you can install the
- <filename>bmap-tools</filename> package using the
- following command and then use the tool
- without specifying
- <filename>PATH</filename> even from the
- root account:
- <literallayout class='monospaced'>
- $ sudo apt-get install bmap-tools
- </literallayout>
- </note>
- </para></listitem>
- </itemizedlist>
+ For information on BitBake, see the
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
</para></listitem>
</orderedlist>
</para>
-
- <para>
- For help on the <filename>bmaptool</filename> command, use either of
- the following commands:
- <literallayout class='monospaced'>
- $ bmaptool --help
- $ oe-run-native bmaptool --help
- </literallayout>
- </para>
</section>
-<section id='using-pre-built-binaries-and-qemu'>
- <title>Using Pre-Built Binaries and QEMU</title>
-
- <para>
- Another option you have to get started is to use pre-built binaries.
- The Yocto Project provides many types of binaries with each release.
- See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
- chapter in the Yocto Project Reference Manual
- for descriptions of the types of binaries that ship with a Yocto Project
- release.
- </para>
-
- <para>
- Using a pre-built binary is ideal for developing software
- applications to run on your target hardware.
- To do this, you need to be able to access the appropriate
- cross-toolchain tarball for the architecture on which you are
- developing.
- If you are using an SDK type image, the image ships with the complete
- toolchain native to the architecture (i.e. a toolchain designed to
- run on the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>).
- If you are not using an SDK type image, you need to separately download
- and install the stand-alone Yocto Project cross-toolchain tarball.
- See the
- "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-appendix-obtain'>Obtaining the SDK</ulink>"
- appendix in the Yocto Project Software Development Kit (SDK)
- Developer's Guide for more information on locating and installing
- cross-toolchains.
- </para>
-
- <para>
- Regardless of the type of image you are using, you need to download the pre-built kernel
- that you will boot in the QEMU emulator and then download and extract the target root
- filesystem for your target machine’s architecture.
- You can get architecture-specific binaries and file systems from
- <ulink url='&YOCTO_MACHINES_DL_URL;'>machines</ulink>.
- You can get installation scripts for stand-alone toolchains from
- <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchains</ulink>.
- Once you have all your files, you set up the environment to emulate the hardware
- by sourcing an environment setup script.
- Finally, you start the QEMU emulator.
- You can find details on all these steps in the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
- You can learn more about using QEMU with the Yocto Project in the
- "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
- section.
- </para>
-
- <para>
- Using QEMU to emulate your hardware can result in speed issues
- depending on the target and host architecture mix.
- For example, using the <filename>qemux86</filename> image in the emulator
- on an Intel-based 32-bit (x86) host machine is fast because the target and
- host architectures match.
- On the other hand, using the <filename>qemuarm</filename> image on the same Intel-based
- host can be slower.
- But, you still achieve faithful emulation of ARM-specific issues.
- </para>
-
- <para>
- To speed things up, the QEMU images support using <filename>distcc</filename>
- to call a cross-compiler outside the emulated system.
- If you used <filename>runqemu</filename> to start QEMU, and the
- <filename>distccd</filename> application is present on the host system, any
- BitBake cross-compiling toolchain available from the build system is automatically
- used from within QEMU simply by calling <filename>distcc</filename>.
- You can accomplish this by defining the cross-compiler variable
- (e.g. <filename>export CC="distcc"</filename>).
- Alternatively, if you are using a suitable SDK image or the appropriate
- stand-alone toolchain is present,
- the toolchain is also automatically used.
- </para>
-
- <note>
- Several mechanisms exist that let you connect to the system running on the
- QEMU emulator:
- <itemizedlist>
- <listitem><para>QEMU provides a framebuffer interface that makes standard
- consoles available.</para></listitem>
- <listitem><para>Generally, headless embedded devices have a serial port.
- If so, you can configure the operating system of the running image
- to use that port to run a console.
- The connection uses standard IP networking.</para></listitem>
- <listitem><para>
- SSH servers exist in some QEMU images.
- The <filename>core-image-sato</filename> QEMU image has a
- Dropbear secure shell (SSH) server that runs with the root
- password disabled.
- The <filename>core-image-full-cmdline</filename> and
- <filename>core-image-lsb</filename> QEMU images
- have OpenSSH instead of Dropbear.
- Including these SSH servers allow you to use standard
- <filename>ssh</filename> and <filename>scp</filename> commands.
- The <filename>core-image-minimal</filename> QEMU image,
- however, contains no SSH server.
- </para></listitem>
- <listitem><para>You can use a provided, user-space NFS server to boot the QEMU session
- using a local copy of the root filesystem on the host.
- In order to make this connection, you must extract a root filesystem tarball by using the
- <filename>runqemu-extract-sdk</filename> command.
- After running the command, you must then point the <filename>runqemu</filename>
- script to the extracted directory instead of a root filesystem image file.</para></listitem>
- </itemizedlist>
- </note>
-</section>
+-->
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml b/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml
index 26ee974e42..ed8011dc1c 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml
+++ b/import-layers/yocto-poky/documentation/dev-manual/dev-manual.xml
@@ -17,14 +17,14 @@
</mediaobject>
<title>
- Yocto Project Development Manual
+ Yocto Project Development Tasks Manual
</title>
<authorgroup>
<author>
<firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
<email>srifenbark@gmail.com</email>
</author>
@@ -97,24 +97,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -130,33 +125,34 @@
Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
Creative Commons.
</para>
-
- <note><title>Manual Notes</title>
- <itemizedlist>
- <listitem><para>
- For the latest version of the Yocto Project Development
- Manual associated with this Yocto Project release
- (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Development Manual from the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
+ <note><title>Manual Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ This version of the
+ <emphasis>Yocto Project Development Tasks Manual</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
+ </para></listitem>
+ <listitem><para>
+ For manuals associated with other releases of the Yocto
+ Project, go to the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+ and use the drop-down "Active Releases" button
+ and choose the manual associated with the desired
+ Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
</para></listitem>
- <listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
- and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
- </para></listitem>
- <listitem><para>
- For an in-development version of the Yocto Project
- Development Manual, see
- <ulink url='&YOCTO_DOCS_URL;/latest/dev-manual/dev-manual.html'></ulink>.
- </para></listitem>
- </itemizedlist>
- </note>
+ </itemizedlist>
+ </note>
</legalnotice>
</bookinfo>
@@ -167,8 +163,6 @@
<xi:include href="dev-manual-newbie.xml"/>
- <xi:include href="dev-manual-model.xml"/>
-
<xi:include href="dev-manual-common-tasks.xml"/>
<xi:include href="dev-manual-qemu.xml"/>
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/bitbake-build-flow.png b/import-layers/yocto-poky/documentation/dev-manual/figures/bitbake-build-flow.png
new file mode 100644
index 0000000000..108265ae0c
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/dev-manual/figures/bitbake-build-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/bsp-dev-flow.png b/import-layers/yocto-poky/documentation/dev-manual/figures/bsp-dev-flow.png
deleted file mode 100644
index 540b0abb9f..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/bsp-dev-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/dev-title.png b/import-layers/yocto-poky/documentation/dev-manual/figures/dev-title.png
index d3cac4a7e5..15e67d0744 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/dev-title.png
+++ b/import-layers/yocto-poky/documentation/dev-manual/figures/dev-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.png b/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.png
deleted file mode 100644
index 985ac331f1..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.png b/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.png
deleted file mode 100644
index fd684ffbe9..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.png b/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.png
deleted file mode 100644
index 65474dad02..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/index-downloads.png b/import-layers/yocto-poky/documentation/dev-manual/figures/index-downloads.png
deleted file mode 100644
index 41251d5d18..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/index-downloads.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-dev-flow.png b/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-dev-flow.png
deleted file mode 100644
index 009105d122..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-dev-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-1.png b/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-1.png
deleted file mode 100644
index 116c0b9bd4..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-1.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-2-generic.png b/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-2-generic.png
deleted file mode 100644
index cb970eae7c..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/kernel-overview-2-generic.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/source-repos.png b/import-layers/yocto-poky/documentation/dev-manual/figures/source-repos.png
deleted file mode 100644
index 65c5f29a43..0000000000
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/source-repos.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-dev-flow.png b/import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-dev-flow.png
new file mode 100644
index 0000000000..793a395e8f
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-dev-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-overview-2-generic.png b/import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-overview-2-generic.png
new file mode 100644
index 0000000000..ee2cdb206b
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/kernel-dev/figures/kernel-overview-2-generic.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
index a5ccfdc300..c3013b8f76 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
@@ -3,7 +3,7 @@
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
<chapter id='kernel-dev-advanced'>
-<title>Working with Advanced Metadata</title>
+<title>Working with Advanced Metadata (<filename>yocto-kernel-cache</filename>)</title>
<section id='kernel-dev-advanced-overview'>
<title>Overview</title>
@@ -11,33 +11,51 @@
<para>
In addition to supporting configuration fragments and patches, the
Yocto Project kernel tools also support rich
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> that you can
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> that you can
use to define complex policies and Board Support Package (BSP) support.
- The purpose of the Metadata and the tools that manage it, known as
- the kern-tools (<filename>kern-tools-native_git.bb</filename>), is
+ The purpose of the Metadata and the tools that manage it is
to help you manage the complexity of the configuration and sources
used to support multiple BSPs and Linux kernel types.
</para>
+
+ <para>
+ Kernel Metadata exists in many places.
+ One area in the Yocto Project
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ is the <filename>yocto-kernel-cache</filename> Git repository.
+ You can find this repository grouped under the "Yocto Linux Kernel"
+ heading in the
+ <ulink url='&YOCTO_GIT_URL;'>Yocto Project Source Repositories</ulink>.
+ </para>
+
+ <para>
+ Kernel development tools ("kern-tools") exist also in the Yocto
+ Project Source Repositories under the "Yocto Linux Kernel" heading
+ in the <filename>yocto-kernel-tools</filename> Git repository.
+ The recipe that builds these tools is
+ <filename>meta/recipes-kernel/kern-tools/kern-tools-native_git.bb</filename>
+ in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (e.g. <filename>poky</filename>).
+ </para>
</section>
<section id='using-kernel-metadata-in-a-recipe'>
<title>Using Kernel Metadata in a Recipe</title>
<para>
- The kernel sources in the Yocto Project contain kernel Metadata, which
- is located in the <filename>meta</filename> branches of the kernel
- source Git repositories.
+ As mentioned in the introduction, the Yocto Project contains kernel
+ Metadata, which is located in the
+ <filename>yocto-kernel-cache</filename> Git repository.
This Metadata defines Board Support Packages (BSPs) that
- correspond to definitions in linux-yocto recipes for the same BSPs.
+ correspond to definitions in linux-yocto recipes for corresponding BSPs.
A BSP consists of an aggregation of kernel policy and enabled
hardware-specific features.
The BSP can be influenced from within the linux-yocto recipe.
<note>
- Linux kernel source that contains kernel Metadata is said to be
- "linux-yocto style" kernel source.
- A Linux kernel recipe that inherits from the
- <filename>linux-yocto.inc</filename> include file is said to be a
- "linux-yocto style" recipe.
+ A Linux kernel recipe that contains kernel Metadata (e.g.
+ inherits from the <filename>linux-yocto.inc</filename> file)
+ is said to be a "linux-yocto style" recipe.
</note>
</para>
@@ -48,7 +66,7 @@
This variable is typically set to the same value as the
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
variable, which is used by
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>.
However, in some cases, the variable might instead refer to the
underlying platform of the <filename>MACHINE</filename>.
</para>
@@ -56,12 +74,16 @@
<para>
Multiple BSPs can reuse the same <filename>KMACHINE</filename>
name if they are built using the same BSP description.
- The "ep108-zynqmp" and "qemuzynqmp" BSP combination
- in the <filename>meta-xilinx</filename>
- layer is a good example of two BSPs using the same
- <filename>KMACHINE</filename> value (i.e. "zynqmp").
- See the <link linkend='bsp-descriptions'>BSP Descriptions</link> section
- for more information.
+ Multiple Corei7-based BSPs could share the same "intel-corei7-64"
+ value for <filename>KMACHINE</filename>.
+ It is important to realize that <filename>KMACHINE</filename> is
+ just for kernel mapping, while
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ is the machine type within a BSP Layer.
+ Even with this distinction, however, these two variables can hold
+ the same value.
+ See the <link linkend='bsp-descriptions'>BSP Descriptions</link>
+ section for more information.
</para>
<para>
@@ -72,9 +94,9 @@
<note>
You can use the <filename>KBRANCH</filename> value to define an
alternate branch typically with a machine override as shown here
- from the <filename>meta-emenlow</filename> layer:
+ from the <filename>meta-yocto-bsp</filename> layer:
<literallayout class='monospaced'>
- KBRANCH_emenlow-noemgd = "standard/base"
+ KBRANCH_edgerouter = "standard/edgerouter"
</literallayout>
</note>
</para>
@@ -113,16 +135,7 @@
recipe.
The tools use the first BSP description it finds that match
both variables.
- If the tools cannot find a match, they issue a warning such as
- the following:
- <literallayout class='monospaced'>
- WARNING: Can't find any BSP hardware or required configuration fragments.
- WARNING: Looked at meta/cfg/broken/emenlow-broken/hdw_frags.txt and
- meta/cfg/broken/emenlow-broken/required_frags.txt in directory:
- meta/cfg/broken/emenlow-broken
- </literallayout>
- In this example, <filename>KMACHINE</filename> was set to "emenlow-broken"
- and <filename>LINUX_KERNEL_TYPE</filename> was set to "broken".
+ If the tools cannot find a match, they issue a warning.
</para>
<para>
@@ -154,19 +167,13 @@
</literallayout>
The value of the entries in <filename>KERNEL_FEATURES</filename>
are dependent on their location within the kernel Metadata itself.
- The examples here are taken from the <filename>meta</filename>
- branch of the <filename>linux-yocto-3.19</filename> repository.
- Within that branch, "features" and "cfg" are subdirectories of the
- <filename>meta/cfg/kernel-cache</filename> directory.
+ The examples here are taken from the
+ <filename>yocto-kernel-cache</filename> repository.
+ Each branch of this repository contains "features" and "cfg"
+ subdirectories at the top-level.
For more information, see the
- "<link linkend='kernel-metadata-syntax'>Kernel Metadata Syntax</link>" section.
- <note>
- The processing of the these variables has evolved some between the
- 0.9 and 1.3 releases of the Yocto Project and associated
- kern-tools sources.
- The descriptions in this section are accurate for 1.3 and later
- releases of the Yocto Project.
- </note>
+ "<link linkend='kernel-metadata-syntax'>Kernel Metadata Syntax</link>"
+ section.
</para>
</section>
@@ -279,11 +286,13 @@
<para>
Paths used in kernel Metadata files are relative to
- <filename>&lt;base&gt;</filename>, which is either
+ <replaceable>base</replaceable>, which is either
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
if you are creating Metadata in
<link linkend='recipe-space-metadata'>recipe-space</link>,
- or <filename>meta/cfg/kernel-cache/</filename> if you are creating
+ or the top level of
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/'><filename>yocto-kernel-cache</filename></ulink>
+ if you are creating
<link linkend='metadata-outside-the-recipe-space'>Metadata outside of the recipe-space</link>.
</para>
@@ -300,12 +309,18 @@
</para>
<para>
- The Symmetric Multi-Processing (SMP) fragment included in the
- <filename>linux-yocto-3.19</filename> Git repository
- consists of the following two files:
+ As an example, consider the Symmetric Multi-Processing (SMP)
+ fragment used with the <filename>linux-yocto-4.12</filename>
+ kernel as defined outside of the recipe space (i.e.
+ <filename>yocto-kernel-cache</filename>).
+ This Metadata consists of two files: <filename>smp.scc</filename>
+ and <filename>smp.cfg</filename>.
+ You can find these files in the <filename>cfg</filename> directory
+ of the <filename>yocto-4.12</filename> branch in the
+ <filename>yocto-kernel-cache</filename> Git repository:
<literallayout class='monospaced'>
cfg/smp.scc:
- define KFEATURE_DESCRIPTION "Enable SMP"
+ define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds"
define KFEATURE_COMPATIBILITY all
kconf hardware smp.cfg
@@ -316,22 +331,27 @@
# Increase default NR_CPUS from 8 to 64 so that platform with
# more than 8 processors can be all activated at boot time
CONFIG_NR_CPUS=64
+ # The following is needed when setting NR_CPUS to something
+ # greater than 8 on x86 architectures, it should be automatically
+ # disregarded by Kconfig when using a different arch
+ CONFIG_X86_BIGSMP=y
</literallayout>
- You can find information on configuration fragment files in the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
- section of the Yocto Project Development Manual and in
- the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
- section earlier in this manual.
+ You can find general information on configuration fragment files in
+ the
+ "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
+ section.
</para>
<para>
+ Within the <filename>smp.scc</filename> file, the
<ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink>
- provides a short description of the fragment.
+ statement provides a short description of the fragment.
Higher level kernel tools use this description.
</para>
<para>
- The <filename>kconf</filename> command is used to include the
+ Also within the <filename>smp.scc</filename> file, the
+ <filename>kconf</filename> command includes the
actual configuration fragment in an <filename>.scc</filename>
file, and the "hardware" keyword identifies the fragment as
being hardware enabling, as opposed to general policy,
@@ -347,7 +367,7 @@
<para>
As described in the
- "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
+ "<link linkend='validating-configuration'>Validating Configuration</link>"
section, you can use the following BitBake command to audit your
configuration:
<literallayout class='monospaced'>
@@ -363,26 +383,71 @@
Patch descriptions are very similar to configuration fragment
descriptions, which are described in the previous section.
However, instead of a <filename>.cfg</filename> file, these
- descriptions work with source patches.
+ descriptions work with source patches (i.e.
+ <filename>.patch</filename> files).
</para>
<para>
- A typical patch includes a description file and the patch itself:
- <literallayout class='monospaced'>
- patches/mypatch.scc:
- patch mypatch.patch
+ A typical patch includes a description file and the patch itself.
+ As an example, consider the build patches used with the
+ <filename>linux-yocto-4.12</filename> kernel as defined outside of
+ the recipe space (i.e. <filename>yocto-kernel-cache</filename>).
+ This Metadata consists of several files:
+ <filename>build.scc</filename> and a set of
+ <filename>*.patch</filename> files.
+ You can find these files in the <filename>patches/build</filename>
+ directory of the <filename>yocto-4.12</filename> branch in the
+ <filename>yocto-kernel-cache</filename> Git repository.
+ </para>
- patches/mypatch.patch:
- <replaceable>typical-patch</replaceable>
+ <para>
+ The following listings show the <filename>build.scc</filename>
+ file and part of the
+ <filename>modpost-mask-trivial-warnings.patch</filename> file:
+ <literallayout class='monospaced'>
+ patches/build/build.scc:
+ patch arm-serialize-build-targets.patch
+ patch powerpc-serialize-image-targets.patch
+ patch kbuild-exclude-meta-directory-from-distclean-processi.patch
+
+ # applied by kgit
+ # patch kbuild-add-meta-files-to-the-ignore-li.patch
+
+ patch modpost-mask-trivial-warnings.patch
+ patch menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
+
+ patches/build/modpost-mask-trivial-warnings.patch:
+ From bd48931bc142bdd104668f3a062a1f22600aae61 Mon Sep 17 00:00:00 2001
+ From: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
+ Date: Sun, 25 Jan 2009 17:58:09 -0500
+ Subject: [PATCH] modpost: mask trivial warnings
+
+ Newer HOSTCC will complain about various stdio fcns because
+ .
+ .
+ .
+ char *dump_write = NULL, *files_source = NULL;
+ int opt;
+ --
+ 2.10.1
+
+ generated by cgit v0.10.2 at 2017-09-28 15:23:23 (GMT)
</literallayout>
- You can create the typical <filename>.patch</filename>
- file using <filename>diff -Nurp</filename> or
- <filename>git format-patch</filename>.
+ The description file can include multiple patch statements where
+ each statement handles a single patch.
+ In the example <filename>build.scc</filename> file, five patch
+ statements exist for the five patches in the directory.
</para>
<para>
- The description file can include multiple patch statements,
- one per patch.
+ You can create a typical <filename>.patch</filename> file using
+ <filename>diff -Nurp</filename> or
+ <filename>git format-patch</filename> commands.
+ For information on how to create patches, see the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ and
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ sections.
</para>
</section>
@@ -391,26 +456,23 @@
<para>
Features are complex kernel Metadata types that consist
- of configuration fragments (<filename>kconf</filename>), patches
- (<filename>patch</filename>), and possibly other feature
- description files (<filename>include</filename>).
- </para>
-
- <para>
- Here is an example that shows a feature description file:
+ of configuration fragments, patches, and possibly other feature
+ description files.
+ As an example, consider the following generic listing:
<literallayout class='monospaced'>
- features/myfeature.scc
- define KFEATURE_DESCRIPTION "Enable myfeature"
+ features/<replaceable>myfeature</replaceable>.scc
+ define KFEATURE_DESCRIPTION "Enable <replaceable>myfeature</replaceable>"
- patch 0001-myfeature-core.patch
- patch 0002-myfeature-interface.patch
+ patch 0001-<replaceable>myfeature</replaceable>-core.patch
+ patch 0002-<replaceable>myfeature</replaceable>-interface.patch
- include cfg/myfeature_dependency.scc
- kconf non-hardware myfeature.cfg
+ include cfg/<replaceable>myfeature</replaceable>_dependency.scc
+ kconf non-hardware <replaceable>myfeature</replaceable>.cfg
</literallayout>
This example shows how the <filename>patch</filename> and
<filename>kconf</filename> commands are used as well as
- how an additional feature description file is included.
+ how an additional feature description file is included with
+ the <filename>include</filename> command.
</para>
<para>
@@ -430,21 +492,47 @@
<para>
A kernel type defines a high-level kernel policy by
aggregating non-hardware configuration fragments with
- patches you want to use when building a Linux kernels of a
- specific type.
+ patches you want to use when building a Linux kernel of a
+ specific type (e.g. a real-time kernel).
Syntactically, kernel types are no different than features
as described in the "<link linkend='features'>Features</link>"
section.
- The <filename>LINUX_KERNEL_TYPE</filename> variable in the kernel
- recipe selects the kernel type.
- See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>"
- section for more information.
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink>
+ variable in the kernel recipe selects the kernel type.
+ For example, in the <filename>linux-yocto_4.12.bb</filename>
+ kernel recipe found in
+ <filename>poky/meta/recipes-kernel/linux</filename>, a
+ <ulink url='&YOCTO_DOCS_BB_URL;#require-inclusion'><filename>require</filename></ulink>
+ directive includes the
+ <filename>poky/meta/recipes-kernel/linux/linux-yocto.inc</filename>
+ file, which has the following statement that defines the default
+ kernel type:
+ <literallayout class='monospaced'>
+ LINUX_KERNEL_TYPE ??= "standard"
+ </literallayout>
+ </para>
+
+ <para>
+ Another example would be the real-time kernel (i.e.
+ <filename>linux-yocto-rt_4.12.bb</filename>).
+ This kernel recipe directly sets the kernel type as follows:
+ <literallayout class='monospaced'>
+ LINUX_KERNEL_TYPE = "preempt-rt"
+ </literallayout>
+ <note>
+ You can find kernel recipes in the
+ <filename>meta/recipes-kernel/linux</filename> directory of the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (e.g. <filename>poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>).
+ See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>"
+ section for more information.
+ </note>
</para>
<para>
- As an example, the <filename>linux-yocto-3.19</filename>
- tree defines three kernel types: "standard",
- "tiny", and "preempt-rt":
+ Three kernel types ("standard", "tiny", and "preempt-rt") are
+ supported for Linux Yocto kernels:
<itemizedlist>
<listitem><para>"standard":
Includes the generic Linux kernel policy of the Yocto
@@ -471,29 +559,40 @@
</para>
<para>
- The "standard" kernel type is defined by
- <filename>standard.scc</filename>:
+ For any given kernel type, the Metadata is defined by the
+ <filename>.scc</filename> (e.g. <filename>standard.scc</filename>).
+ Here is a partial listing for the <filename>standard.scc</filename>
+ file, which is found in the <filename>ktypes/standard</filename>
+ directory of the <filename>yocto-kernel-cache</filename> Git
+ repository:
<literallayout class='monospaced'>
# Include this kernel type fragment to get the standard features and
# configuration values.
- # Include all standard features
- include standard-nocfg.scc
+ # Note: if only the features are desired, but not the configuration
+ # then this should be included as:
+ # include ktypes/standard/standard.scc nocfg
+ # if no chained configuration is desired, include it as:
+ # include ktypes/standard/standard.scc nocfg inherit
+
+
+
+ include ktypes/base/base.scc
+ branch standard
kconf non-hardware standard.cfg
- # individual cfg block section
- include cfg/fs/devtmpfs.scc
- include cfg/fs/debugfs.scc
- include cfg/fs/btrfs.scc
- include cfg/fs/ext2.scc
- include cfg/fs/ext3.scc
- include cfg/fs/ext4.scc
+ include features/kgdb/kgdb.scc
+ .
+ .
+ .
- include cfg/net/ipv6.scc
- include cfg/net/ip_nf.scc
include cfg/net/ip6_nf.scc
include cfg/net/bridge.scc
+
+ include cfg/systemd.scc
+
+ include features/rfkill/rfkill.scc
</literallayout>
</para>
@@ -539,9 +638,9 @@
</para>
<para>
- This section provides a BSP description structural overview along
- with aggregation concepts as well as a detailed example using
- a BSP supported by the Yocto Project (i.e. Minnow Board).
+ This section overviews the BSP description structure, the
+ aggregation concepts, and presents a detailed example using
+ a BSP supported by the Yocto Project (i.e. BeagleBone Board).
</para>
<section id='bsp-description-file-overview'>
@@ -549,7 +648,7 @@
<para>
For simplicity, consider the following top-level BSP
- description file.
+ description files for the BeagleBone board.
Top-level BSP descriptions files employ both a structure
and naming convention for consistency.
The naming convention for the file is as follows:
@@ -557,31 +656,30 @@
<replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
</literallayout>
Here are some example top-level BSP filenames for the
- Minnow Board BSP, which is supported by the Yocto Project:
+ BeagleBone Board BSP, which is supported by the Yocto Project:
<literallayout class='monospaced'>
- minnow-standard.scc
- minnow-preempt-rt.scc
- minnow-tiny.scc
+ beaglebone-standard.scc
+ beaglebone-preempt-rt.scc
</literallayout>
Each file uses the BSP name followed by the kernel type.
</para>
<para>
- is simple BSP description file whose name has the
- form
- <replaceable>mybsp</replaceable><filename>-standard</filename>
- and supports the <replaceable>mybsp</replaceable> machine using
- a standard kernel:
+ Examine the <filename>beaglebone-standard.scc</filename>
+ file:
<literallayout class='monospaced'>
- define KMACHINE <replaceable>mybsp</replaceable>
+ define KMACHINE beaglebone
define KTYPE standard
- define KARCH i386
+ define KARCH arm
- include ktypes/standard
+ include ktypes/standard/standard.scc
+ branch beaglebone
- include <replaceable>mybsp</replaceable>.scc
+ include beaglebone.scc
- kconf hardware <replaceable>mybsp</replaceable>-<replaceable>extra</replaceable>.cfg
+ # default policy for standard kernels
+ include features/latencytop/latencytop.scc
+ include features/profiling/profiling.scc
</literallayout>
Every top-level BSP description file should define the
<ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
@@ -591,23 +689,20 @@
These variables allow the OpenEmbedded build system to identify
the description as meeting the criteria set by the recipe being
built.
- This simple example supports the "mybsp" machine for the "standard"
- kernel and the "i386" architecture.
+ This example supports the "beaglebone" machine for the
+ "standard" kernel and the "arm" architecture.
</para>
<para>
Be aware that a hard link between the
- <filename>KTYPE</filename> variable and a kernel type description
- file does not exist.
- Thus, if you do not have kernel types defined in your kernel
- Metadata, you only need to ensure that the kernel recipe's
+ <filename>KTYPE</filename> variable and a kernel type
+ description file does not exist.
+ Thus, if you do not have the kernel type defined in your kernel
+ Metadata as it is here, you only need to ensure that the
<ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink>
- variable and the <filename>KTYPE</filename> variable in the
- BSP description file match.
- <note>
- Future versions of the tooling make the specification of
- <filename>KTYPE</filename> in the BSP optional.
- </note>
+ variable in the kernel recipe and the
+ <filename>KTYPE</filename> variable in the BSP description
+ file match.
</para>
<para>
@@ -616,13 +711,12 @@
"standard".
In the previous example, this is done using the following:
<literallayout class='monospaced'>
- include ktypes/standard
+ include ktypes/standard/standard.scc
</literallayout>
- In the previous example, <filename>ktypes/standard.scc</filename>
- aggregates all the configuration fragments, patches, and
- features that make up your standard kernel policy.
- See the "<link linkend='kernel-types'>Kernel Types</link>" section
- for more information.
+ This file aggregates all the configuration fragments, patches,
+ and features that make up your standard kernel policy.
+ See the "<link linkend='kernel-types'>Kernel Types</link>"
+ section for more information.
</para>
<para>
@@ -631,10 +725,14 @@
<literallayout class='monospaced'>
include <replaceable>mybsp</replaceable>.scc
</literallayout>
+ You can see that in the BeagleBone example with the following:
+ <literallayout class='monospaced'>
+ include beaglebone.scc
+ </literallayout>
For information on how to break a complete
<filename>.config</filename> file into the various
configuration fragments, see the
- "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
+ "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
section.
</para>
@@ -645,6 +743,23 @@
<literallayout class='monospaced'>
kconf hardware <replaceable>mybsp</replaceable>-<replaceable>extra</replaceable>.cfg
</literallayout>
+ The BeagleBone example does not include these types of
+ configurations.
+ However, the Malta 32-bit board does ("mti-malta32").
+ Here is the <filename>mti-malta32-le-standard.scc</filename>
+ file:
+ <literallayout class='monospaced'>
+ define KMACHINE mti-malta32-le
+ define KMACHINE qemumipsel
+ define KTYPE standard
+ define KARCH mips
+
+ include ktypes/standard/standard.scc
+ branch mti-malta32
+
+ include mti-malta32.scc
+ kconf hardware mti-malta32-le.cfg
+ </literallayout>
</para>
</section>
@@ -655,14 +770,15 @@
Many real-world examples are more complex.
Like any other <filename>.scc</filename> file, BSP
descriptions can aggregate features.
- Consider the Minnow BSP definition from the
- <filename>linux-yocto-4.4</filename> in the
- Yocto Project
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
- (i.e.
- <filename>yocto-kernel-cache/bsp/minnow</filename>):
+ Consider the Minnow BSP definition given the
+ <filename>linux-yocto-4.4</filename> branch of the
+ <filename>yocto-kernel-cache</filename> (i.e.
+ <filename>yocto-kernel-cache/bsp/minnow/minnow.scc</filename>):
+ <note>
+ Although the Minnow Board BSP is unused, the Metadata
+ remains and is being used here just as an example.
+ </note>
<literallayout class='monospaced'>
- minnow.scc:
include cfg/x86.scc
include features/eg20t/eg20t.scc
include cfg/dmaengine.scc
@@ -698,9 +814,8 @@
"minnow" description files for the supported kernel types
(i.e. "standard", "preempt-rt", and "tiny").
Consider the "minnow" description for the "standard" kernel
- type:
+ type (i.e. <filename>minnow-standard.scc</filename>:
<literallayout class='monospaced'>
- minnow-standard.scc:
define KMACHINE minnow
define KTYPE standard
define KARCH i386
@@ -735,9 +850,8 @@
<para>
Now consider the "minnow" description for the "tiny" kernel
- type:
+ type (i.e. <filename>minnow-tiny.scc</filename>:
<literallayout class='monospaced'>
- minnow-tiny.scc:
define KMACHINE minnow
define KTYPE tiny
define KARCH i386
@@ -757,10 +871,12 @@
<para>
Notice again the three critical variables:
- <filename>KMACHINE</filename>, <filename>KTYPE</filename>,
- and <filename>KARCH</filename>.
- Of these variables, only the <filename>KTYPE</filename> has changed.
- It is now set to "tiny".
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>,
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>.
+ Of these variables, only <filename>KTYPE</filename>
+ has changed to specify the "tiny" kernel type.
</para>
</section>
</section>
@@ -867,15 +983,15 @@
When stored outside of the recipe-space, the kernel Metadata
files reside in a separate repository.
The OpenEmbedded build system adds the Metadata to the build as
- a "ktype=meta" repository through the
+ a "type=kmeta" repository through the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
variable.
As an example, consider the following <filename>SRC_URI</filename>
- statement from the <filename>linux-yocto_4.4.bb</filename>
+ statement from the <filename>linux-yocto_4.12.bb</filename>
kernel recipe:
<literallayout class='monospaced'>
- SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
- git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
+ SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
</literallayout>
<filename>${KMETA}</filename>, in this context, is simply used to
name the directory into which the Git fetcher places the Metadata.
@@ -894,46 +1010,6 @@
configuration phase.
</para>
-<!--
-
-
- <para>
- Following is an example that shows how a trivial tree of Metadata
- is stored in a custom Linux kernel Git repository:
- <literallayout class='monospaced'>
- meta/
- `&dash;&dash; cfg
- `&dash;&dash; kernel-cache
- |&dash;&dash; bsp-standard.scc
- |&dash;&dash; bsp.cfg
- `&dash;&dash; standard.cfg
- </literallayout>
- </para>
-
- <para>
- To use a branch different from where the sources reside,
- specify the branch in the <filename>KMETA</filename> variable
- in your Linux kernel recipe.
- Here is an example:
- <literallayout class='monospaced'>
- KMETA = "meta"
- </literallayout>
- To use the same branch as the sources, set
- <filename>KMETA</filename> to an empty string:
- <literallayout class='monospaced'>
- KMETA = ""
- </literallayout>
- If you are working with your own sources and want to create an
- orphan <filename>meta</filename> branch, use these commands
- from within your Linux kernel Git repository:
- <literallayout class='monospaced'>
- $ git checkout &dash;&dash;orphan meta
- $ git rm -rf .
- $ git commit &dash;&dash;allow-empty -m "Create orphan meta branch"
- </literallayout>
- </para>
--->
-
<para>
If you modify the Metadata, you must not forget to update the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
@@ -1057,10 +1133,9 @@
</para>
<para>
- If you find
- yourself with numerous branches, you might consider using a
- hierarchical branching system similar to what the linux-yocto Linux
- kernel repositories use:
+ If you find yourself with numerous branches, you might consider
+ using a hierarchical branching system similar to what the
+ Yocto Linux Kernel Git repositories use:
<literallayout class='monospaced'>
<replaceable>common</replaceable>/<replaceable>kernel_type</replaceable>/<replaceable>machine</replaceable>
</literallayout>
@@ -1090,7 +1165,8 @@
The "standard" and "small" branches add sources specific to those
kernel types that for whatever reason are not appropriate for the
other branches.
- <note>The "base" branches are an artifact of the way Git manages
+ <note>
+ The "base" branches are an artifact of the way Git manages
its data internally on the filesystem: Git will not allow you
to use <filename>mydir/standard</filename> and
<filename>mydir/standard/machine_a</filename> because it
@@ -1137,27 +1213,34 @@
This section provides a brief reference for the commands you can use
within an SCC description file (<filename>.scc</filename>):
<itemizedlist>
- <listitem><para><filename>branch [ref]</filename>:
+ <listitem><para>
+ <filename>branch [ref]</filename>:
Creates a new branch relative to the current branch
(typically <filename>${KTYPE}</filename>) using
the currently checked-out branch, or "ref" if specified.
</para></listitem>
- <listitem><para><filename>define</filename>:
+ <listitem><para>
+ <filename>define</filename>:
Defines variables, such as <filename>KMACHINE</filename>,
<filename>KTYPE</filename>, <filename>KARCH</filename>,
and <filename>KFEATURE_DESCRIPTION</filename>.</para></listitem>
- <listitem><para><filename>include SCC_FILE</filename>:
+ <listitem><para>
+ <filename>include SCC_FILE</filename>:
Includes an SCC file in the current file.
The file is parsed as if you had inserted it inline.
</para></listitem>
- <listitem><para><filename>kconf [hardware|non-hardware] CFG_FILE</filename>:
+ <listitem><para>
+ <filename>kconf [hardware|non-hardware] CFG_FILE</filename>:
Queues a configuration fragment for merging into the final
Linux <filename>.config</filename> file.</para></listitem>
- <listitem><para><filename>git merge GIT_BRANCH</filename>:
+ <listitem><para>
+ <filename>git merge GIT_BRANCH</filename>:
Merges the feature branch into the current branch.
</para></listitem>
- <listitem><para><filename>patch PATCH_FILE</filename>:
- Applies the patch to the current Git branch.</para></listitem>
+ <listitem><para>
+ <filename>patch PATCH_FILE</filename>:
+ Applies the patch to the current Git branch.
+ </para></listitem>
</itemizedlist>
</para>
</section>
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
index aa40fc852a..b8fd870162 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
@@ -3,20 +3,466 @@
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
<chapter id='kernel-dev-common'>
-
<title>Common Tasks</title>
-<para>
- This chapter presents several common tasks you perform when you
- work with the Yocto Project Linux kernel.
- These tasks include preparing a layer, modifying an existing recipe,
- iterative development, working with your own sources, and incorporating
- out-of-tree modules.
- <note>
- The examples presented in this chapter work with the Yocto Project
- 1.2.2 Release and forward.
- </note>
-</para>
+ <para>
+ This chapter presents several common tasks you perform when you
+ work with the Yocto Project Linux kernel.
+ These tasks include preparing your host development system for
+ kernel development, preparing a layer, modifying an existing recipe,
+ patching the kernel, configuring the kernel, iterative development,
+ working with your own sources, and incorporating out-of-tree modules.
+ <note>
+ The examples presented in this chapter work with the Yocto Project
+ 2.4 Release and forward.
+ </note>
+ </para>
+
+ <section id='preparing-the-build-host-to-work-on-the-kernel'>
+ <title>Preparing the Build Host to Work on the Kernel</title>
+
+ <para>
+ Before you can do any kernel development, you need to be
+ sure your build host is set up to use the Yocto Project.
+ For information on how to get set up, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up to Use the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ Part of preparing the system is creating a local Git
+ repository of the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (<filename>poky</filename>) on your system.
+ Follow the steps in the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
+ section in the Yocto Project Development Tasks Manual to set up your
+ Source Directory.
+ <note>
+ Be sure you check out the appropriate development branch or
+ you create your local branch by checking out a specific tag
+ to get the desired version of Yocto Project.
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
+ and
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
+ sections in the Yocto Project Development Tasks Manual for more
+ information.
+ </note>
+ </para>
+
+ <para>
+ Kernel development is best accomplished using
+ <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename></ulink>
+ and not through traditional kernel workflow methods.
+ The remainder of this section provides information for both
+ scenarios.
+ </para>
+
+ <section id='getting-ready-to-develop-using-devtool'>
+ <title>Getting Ready to Develop Using <filename>devtool</filename></title>
+
+ <para>
+ Follow these steps to prepare to update the kernel image using
+ <filename>devtool</filename>.
+ Completing this procedure leaves you with a clean kernel image
+ and ready to make modifications as described in the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ section:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Initialize the BitBake Environment:</emphasis>
+ Before building an extensible SDK, you need to
+ initialize the BitBake build environment by sourcing the
+ build environment script
+ (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>):
+ <literallayout class='monospaced'>
+ $ cd ~/poky
+ $ source oe-init-build-env
+ </literallayout>
+ <note>
+ The previous commands assume the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ (i.e. <filename>poky</filename>) have been cloned
+ using Git and the local repository is named
+ "poky".
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Prepare Your <filename>local.conf</filename> File:</emphasis>
+ By default, the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ variable is set to "qemux86", which is fine if you are
+ building for the QEMU emulator in 32-bit mode.
+ However, if you are not, you need to set the
+ <filename>MACHINE</filename> variable appropriately in
+ your <filename>conf/local.conf</filename> file found in
+ the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ (i.e. <filename>~/poky/build</filename> in this
+ example).</para>
+
+ <para>Also, since you are preparing to work on the
+ kernel image, you need to set the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
+ variable to include kernel modules.</para>
+
+ <para>This example uses the default "qemux86" for the
+ <filename>MACHINE</filename> variable but needs to
+ add the "kernel-modules":
+ <literallayout class='monospaced'>
+ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create a Layer for Patches:</emphasis>
+ You need to create a layer to hold patches created
+ for the kernel image.
+ You can use the
+ <filename>bitbake-layers create-layer</filename>
+ command as follows:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake-layers create-layer ../../meta-mylayer
+ NOTE: Starting bitbake server...
+ Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer'
+ $
+ </literallayout>
+ <note>
+ For background information on working with
+ common and BSP layers, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+ section in the Yocto Project Development Tasks
+ Manual and the
+ "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+ section in the Yocto Project Board Support (BSP)
+ Developer's Guide, respectively.
+ For information on how to use the
+ <filename>bitbake-layers create-layer</filename>
+ command, see the
+ "<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>"
+ section in the Yocto Project Development Tasks
+ Manual.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Inform the BitBake Build Environment About
+ Your Layer:</emphasis>
+ As directed when you created your layer, you need to
+ add the layer to the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
+ variable in the <filename>bblayers.conf</filename> file
+ as follows:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake-layers add-layer ../../meta-mylayer
+ NOTE: Starting bitbake server...
+ $
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Extensible SDK:</emphasis>
+ Use BitBake to build the extensible SDK specifically
+ for use with images to be run using QEMU:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake core-image-minimal -c populate_sdk_ext
+ </literallayout>
+ Once the build finishes, you can find the SDK installer
+ file (i.e. <filename>*.sh</filename> file) in the
+ following directory:
+ <literallayout class='monospaced'>
+ ~/poky/build/tmp/deploy/sdk
+ </literallayout>
+ For this example, the installer file is named
+ <filename>poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh</filename>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Install the Extensible SDK:</emphasis>
+ Use the following command to install the SDK.
+ For this example, install the SDK in the default
+ <filename>~/poky_sdk</filename> directory:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build/tmp/deploy/sdk
+ $ ./poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh
+ Poky (Yocto Project Reference Distro) Extensible SDK installer version &DISTRO;
+ ============================================================================
+ Enter target directory for SDK (default: ~/poky_sdk):
+ You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed[Y/n]? Y
+ Extracting SDK......................................done
+ Setting it up...
+ Extracting buildtools...
+ Preparing build system...
+ Parsing recipes: 100% |#################################################################| Time: 0:00:52
+ Initializing tasks: 100% |############## ###############################################| Time: 0:00:04
+ Checking sstate mirror object availability: 100% |######################################| Time: 0:00:00
+ Parsing recipes: 100% |#################################################################| Time: 0:00:33
+ Initializing tasks: 100% |##############################################################| Time: 0:00:00
+ done
+ SDK has been successfully set up and is ready to be used.
+ Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
+ $ . /home/scottrif/poky_sdk/environment-setup-i586-poky-linux
+ </literallayout>
+ </para></listitem>
+ <listitem><para id='setting-up-the-esdk-terminal'>
+ <emphasis>Set Up a New Terminal to Work With the
+ Extensible SDK:</emphasis>
+ You must set up a new terminal to work with the SDK.
+ You cannot use the same BitBake shell used to build the
+ installer.</para>
+
+ <para>After opening a new shell, run the SDK environment
+ setup script as directed by the output from installing
+ the SDK:
+ <literallayout class='monospaced'>
+ $ source ~/poky_sdk/environment-setup-i586-poky-linux
+ "SDK environment now set up; additionally you may now run devtool to perform development tasks.
+ Run devtool --help for further details.
+ </literallayout>
+ <note>
+ If you get a warning about attempting to use the
+ extensible SDK in an environment set up to run
+ BitBake, you did not use a new shell.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Clean Image:</emphasis>
+ The final step in preparing to work on the kernel is to
+ build an initial image using
+ <filename>devtool</filename> in the new terminal you
+ just set up and initialized for SDK work:
+ <literallayout class='monospaced'>
+ $ devtool build-image
+ Parsing recipes: 100% |##########################################| Time: 0:00:05
+ Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.
+ WARNING: No packages to add, building image core-image-minimal unmodified
+ Loading cache: 100% |############################################| Time: 0:00:00
+ Loaded 1299 entries from dependency cache.
+ NOTE: Resolving any missing task queue dependencies
+ Initializing tasks: 100% |#######################################| Time: 0:00:07
+ Checking sstate mirror object availability: 100% |###############| Time: 0:00:00
+ NOTE: Executing SetScene Tasks
+ NOTE: Executing RunQueue Tasks
+ NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn't need to be rerun and all succeeded.
+ NOTE: Successfully built core-image-minimal. You can find output files in /home/scottrif/poky_sdk/tmp/deploy/images/qemux86
+ </literallayout>
+ If you were building for actual hardware and not for
+ emulation, you could flash the image to a USB stick
+ on <filename>/dev/sdd</filename> and boot your device.
+ For an example that uses a Minnowboard, see the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk'>TipsAndTricks/KernelDevelopmentWithEsdk</ulink>
+ Wiki page.
+ </para></listitem>
+ </orderedlist>
+ </para>
+
+ <para>
+ At this point you have set up to start making modifications to
+ the kernel by using the extensible SDK.
+ For a continued example, see the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ section.
+ </para>
+ </section>
+
+ <section id='getting-ready-for-traditional-kernel-development'>
+ <title>Getting Ready for Traditional Kernel Development</title>
+
+ <para>
+ Getting ready for traditional kernel development using the Yocto
+ Project involves many of the same steps as described in the
+ previous section.
+ However, you need to establish a local copy of the kernel source
+ since you will be editing these files.
+ </para>
+
+ <para>
+ Follow these steps to prepare to update the kernel image using
+ traditional kernel development flow with the Yocto Project.
+ Completing this procedure leaves you ready to make modifications
+ to the kernel source as described in the
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ section:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Initialize the BitBake Environment:</emphasis>
+ Before you can do anything using BitBake, you need to
+ initialize the BitBake build environment by sourcing the
+ build environment script
+ (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>).
+ Also, for this example, be sure that the local branch
+ you have checked out for <filename>poky</filename> is
+ the Yocto Project &DISTRO_NAME; branch.
+ If you need to checkout out the &DISTRO_NAME; branch,
+ see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking out by Branch in Poky</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ <literallayout class='monospaced'>
+ $ cd ~/poky
+ $ git branch
+ master
+ * &DISTRO_NAME;
+ $ source oe-init-build-env
+ </literallayout>
+ <note>
+ The previous commands assume the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ (i.e. <filename>poky</filename>) have been cloned
+ using Git and the local repository is named
+ "poky".
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Prepare Your <filename>local.conf</filename>
+ File:</emphasis>
+ By default, the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ variable is set to "qemux86", which is fine if you are
+ building for the QEMU emulator in 32-bit mode.
+ However, if you are not, you need to set the
+ <filename>MACHINE</filename> variable appropriately in
+ your <filename>conf/local.conf</filename> file found
+ in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ (i.e. <filename>~/poky/build</filename> in this
+ example).</para>
+
+ <para>Also, since you are preparing to work on the
+ kernel image, you need to set the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
+ variable to include kernel modules.</para>
+
+ <para>This example uses the default "qemux86" for the
+ <filename>MACHINE</filename> variable but needs to
+ add the "kernel-modules":
+ <literallayout class='monospaced'>
+ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create a Layer for Patches:</emphasis>
+ You need to create a layer to hold patches created
+ for the kernel image.
+ You can use the
+ <filename>bitbake-layers create-layer</filename>
+ command as follows:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake-layers create-layer ../../meta-mylayer
+ NOTE: Starting bitbake server...
+ Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer'
+ </literallayout>
+ <note>
+ For background information on working with
+ common and BSP layers, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+ section in the Yocto Project Development Tasks
+ Manual and the
+ "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+ section in the Yocto Project Board Support (BSP)
+ Developer's Guide, respectively.
+ For information on how to use the
+ <filename>bitbake-layers create-layer</filename>
+ command, see the
+ "<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>"
+ section in the Yocto Project Development Tasks
+ Manual.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Inform the BitBake Build Environment About
+ Your Layer:</emphasis>
+ As directed when you created your layer, you need to add
+ the layer to the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
+ variable in the <filename>bblayers.conf</filename> file
+ as follows:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake-layers add-layer ../../meta-mylayer
+ NOTE: Starting bitbake server ...
+ $
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create a Local Copy of the Kernel Git
+ Repository:</emphasis>
+ You can find Git repositories of supported Yocto Project
+ kernels organized under "Yocto Linux Kernel" in the
+ Yocto Project Source Repositories at
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
+ </para>
+
+ <para>
+ For simplicity, it is recommended that you create your
+ copy of the kernel Git repository outside of the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
+ which is usually named <filename>poky</filename>.
+ Also, be sure you are in the
+ <filename>standard/base</filename> branch.
+ </para>
+
+ <para>
+ The following commands show how to create a local copy
+ of the <filename>linux-yocto-4.12</filename> kernel and
+ be in the <filename>standard/base</filename> branch.
+ <note>
+ The <filename>linux-yocto-4.12</filename> kernel
+ can be used with the Yocto Project 2.4 release
+ and forward.
+ You cannot use the
+ <filename>linux-yocto-4.12</filename> kernel with
+ releases prior to Yocto Project 2.4:
+ </note>
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ git clone git://git.yoctoproject.org/linux-yocto-4.12 --branch standard/base
+ Cloning into 'linux-yocto-4.12'...
+ remote: Counting objects: 6097195, done.
+ remote: Compressing objects: 100% (901026/901026), done.
+ remote: Total 6097195 (delta 5152604), reused 6096847 (delta 5152256)
+ Receiving objects: 100% (6097195/6097195), 1.24 GiB | 7.81 MiB/s, done.
+ Resolving deltas: 100% (5152604/5152604), done.
+ Checking connectivity... done.
+ Checking out files: 100% (59846/59846), done.
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create a Local Copy of the Kernel Cache Git
+ Repository:</emphasis>
+ For simplicity, it is recommended that you create your
+ copy of the kernel cache Git repository outside of the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
+ which is usually named <filename>poky</filename>.
+ Also, for this example, be sure you are in the
+ <filename>yocto-4.12</filename> branch.
+ </para>
+
+ <para>
+ The following commands show how to create a local copy
+ of the <filename>yocto-kernel-cache</filename> and
+ be in the <filename>yocto-4.12</filename> branch:
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ git clone git://git.yoctoproject.org/yocto-kernel-cache --branch yocto-4.12
+ Cloning into 'yocto-kernel-cache'...
+ remote: Counting objects: 22639, done.
+ remote: Compressing objects: 100% (9761/9761), done.
+ remote: Total 22639 (delta 12400), reused 22586 (delta 12347)
+ Receiving objects: 100% (22639/22639), 22.34 MiB | 6.27 MiB/s, done.
+ Resolving deltas: 100% (12400/12400), done.
+ Checking connectivity... done.
+ </literallayout>
+ </para></listitem>
+ </orderedlist>
+ </para>
+
+ <para>
+ At this point, you are ready to start making modifications to
+ the kernel using traditional kernel development steps.
+ For a continued example, see the
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ section.
+ </para>
+ </section>
+ </section>
<section id='creating-and-preparing-a-layer'>
<title>Creating and Preparing a Layer</title>
@@ -26,25 +472,98 @@
that you create and prepare your own layer in which to do your
work.
Your layer contains its own
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
- append files
- (<filename>.bbappend</filename>) and provides a convenient
- mechanism to create your own recipe files
- (<filename>.bb</filename>).
- For details on how to create and work with layers, see the
+ <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
+ append files (<filename>.bbappend</filename>) and provides a
+ convenient mechanism to create your own recipe files
+ (<filename>.bb</filename>) as well as store and use kernel
+ patch files.
+ For background information on working with layers, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
<note><title>Tip</title>
The Yocto Project comes with many tools that simplify
tasks you need to perform.
- One such tool is the <filename>yocto-layer create</filename>
- script, which simplifies creating a new layer.
+ One such tool is the
+ <filename>bitbake-layers create-layer</filename>
+ command, which simplifies creating a new layer.
See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</ulink>"
- section in the Yocto Project Development Manual for more
- information.
+ "<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>"
+ section in the Yocto Project Development Tasks Manual for
+ information on how to use this script.
</note>
</para>
+
+ <para>
+ To better understand the layer you create for kernel development,
+ the following section describes how to create a layer
+ without the aid of tools.
+ These steps assume creation of a layer named
+ <filename>mylayer</filename> in your home directory:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Create Structure</emphasis>:
+ Create the layer's structure:
+ <literallayout class='monospaced'>
+ $ cd $HOME
+ $ mkdir meta-mylayer
+ $ mkdir meta-mylayer/conf
+ $ mkdir meta-mylayer/recipes-kernel
+ $ mkdir meta-mylayer/recipes-kernel/linux
+ $ mkdir meta-mylayer/recipes-kernel/linux/linux-yocto
+ </literallayout>
+ The <filename>conf</filename> directory holds your
+ configuration files, while the
+ <filename>recipes-kernel</filename> directory holds your
+ append file and eventual patch files.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create the Layer Configuration File</emphasis>:
+ Move to the <filename>meta-mylayer/conf</filename>
+ directory and create the <filename>layer.conf</filename>
+ file as follows:
+ <literallayout class='monospaced'>
+ # We have a conf and classes directory, add to BBPATH
+ BBPATH .= ":${LAYERDIR}"
+
+ # We have recipes-* directories, add to BBFILES
+ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+ BBFILE_COLLECTIONS += "mylayer"
+ BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
+ BBFILE_PRIORITY_mylayer = "5"
+ </literallayout>
+ Notice <filename>mylayer</filename> as part of the last
+ three statements.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create the Kernel Recipe Append File</emphasis>:
+ Move to the
+ <filename>meta-mylayer/recipes-kernel/linux</filename>
+ directory and create the kernel's append file.
+ This example uses the
+ <filename>linux-yocto-4.12</filename> kernel.
+ Thus, the name of the append file is
+ <filename>linux-yocto_4.12.bbappend</filename>:
+ <literallayout class='monospaced'>
+ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+ SRC_URI_append += "file://<replaceable>patch-file-one</replaceable>"
+ SRC_URI_append += "file://<replaceable>patch-file-two</replaceable>"
+ SRC_URI_append += "file://<replaceable>patch-file-three</replaceable>"
+ </literallayout>
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ statements enable the OpenEmbedded build system to find
+ patch files.
+ For more information on using append files, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ </orderedlist>
+ </para>
</section>
<section id='modifying-an-existing-recipe'>
@@ -56,7 +575,7 @@
Each release of the Yocto Project provides a few Linux
kernel recipes from which you can choose.
These are located in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
in <filename>meta/recipes-kernel/linux</filename>.
</para>
@@ -72,12 +591,9 @@
<para>
Before modifying an existing recipe, be sure that you have created
a minimal, custom layer from which you can work.
- See the "<link linkend='creating-and-preparing-a-layer'>Creating and Preparing a Layer</link>"
- section for some general resources.
- You can also see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#set-up-your-layer-for-the-build'>Set Up Your Layer for the Build</ulink>" section
- of the Yocto Project Development Manual for a detailed
- example.
+ See the
+ "<link linkend='creating-and-preparing-a-layer'>Creating and Preparing a Layer</link>"
+ section for information.
</para>
<section id='creating-the-append-file'>
@@ -88,11 +604,11 @@
You also name it accordingly based on the linux-yocto recipe
you are using.
For example, if you are modifying the
- <filename>meta/recipes-kernel/linux/linux-yocto_4.4.bb</filename>
+ <filename>meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>
recipe, the append file will typically be located as follows
within your custom layer:
<literallayout class='monospaced'>
- <replaceable>your-layer</replaceable>/recipes-kernel/linux/linux-yocto_4.4.bbappend
+ <replaceable>your-layer</replaceable>/recipes-kernel/linux/linux-yocto_4.12.bbappend
</literallayout>
The append file should initially extend the
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
@@ -123,7 +639,7 @@
As an example, consider the following append file
used by the BSPs in <filename>meta-yocto-bsp</filename>:
<literallayout class='monospaced'>
- meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend
+ meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
</literallayout>
The following listing shows the file.
Be aware that the actual commit ID strings in this
@@ -140,11 +656,12 @@
KBRANCH_beaglebone = "standard/beaglebone"
KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
- SRCREV_machine_genericx86 ?= "ad8b1d659ddd2699ebf7d50ef9de8940b157bfc2"
- SRCREV_machine_genericx86-64 ?= "ad8b1d659ddd2699ebf7d50ef9de8940b157bfc2"
- SRCREV_machine_edgerouter ?= "cebe1ad56aebd89e0de29412e19433fb441bf13c"
- SRCREV_machine_beaglebone ?= "cebe1ad56aebd89e0de29412e19433fb441bf13c"
- SRCREV_machine_mpc8315e-rdb ?= "06c0dbdcba374ca7f92a53d69292d6bb7bc9b0f3"
+ SRCREV_machine_genericx86 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
+ SRCREV_machine_genericx86-64 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
+ SRCREV_machine_edgerouter ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
+ SRCREV_machine_beaglebone ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
+ SRCREV_machine_mpc8315e-rdb ?= "2d1d010240846d7bff15d1fcc0cb6eb8a22fc78a"
+
COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
@@ -152,11 +669,11 @@
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
- LINUX_VERSION_genericx86 = "4.4.41"
- LINUX_VERSION_genericx86-64 = "4.4.41"
- LINUX_VERSION_edgerouter = "4.4.53"
- LINUX_VERSION_beaglebone = "4.4.53"
- LINUX_VERSION_mpc8315e-rdb = "4.4.53"
+ LINUX_VERSION_genericx86 = "4.12.7"
+ LINUX_VERSION_genericx86-64 = "4.12.7"
+ LINUX_VERSION_edgerouter = "4.12.10"
+ LINUX_VERSION_beaglebone = "4.12.10"
+ LINUX_VERSION_mpc8315e-rdb = "4.12.10"
</literallayout>
This append file contains statements used to support
several BSPs that ship with the Yocto Project.
@@ -179,7 +696,7 @@
variable could be used to enable features specific to
the kernel.
The append file points to specific commits in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
Git repository and the <filename>meta</filename> Git repository
branches to identify the exact kernel needed to build the
BSP.
@@ -187,8 +704,8 @@
<para>
One thing missing in this particular BSP, which you will
- typically need when developing a BSP, is the kernel configuration
- file (<filename>.config</filename>) for your BSP.
+ typically need when developing a BSP, is the kernel
+ configuration file (<filename>.config</filename>) for your BSP.
When developing a BSP, you probably have a kernel configuration
file or a set of kernel configuration files that, when taken
together, define the kernel configuration for your BSP.
@@ -196,7 +713,8 @@
in a file or a set of files inside a directory located at the
same level as your kernel's append file and having the same
name as the kernel's main recipe file.
- With all these conditions met, simply reference those files in the
+ With all these conditions met, simply reference those files in
+ the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
statement in the append file.
</para>
@@ -242,25 +760,31 @@
<note>
<para>
- Other methods exist to accomplish grouping and defining configuration options.
- For example, if you are working with a local clone of the kernel repository,
- you could checkout the kernel's <filename>meta</filename> branch, make your changes,
- and then push the changes to the local bare clone of the kernel.
- The result is that you directly add configuration options to the
- <filename>meta</filename> branch for your BSP.
- The configuration options will likely end up in that location anyway if the BSP gets
- added to the Yocto Project.
+ Other methods exist to accomplish grouping and defining
+ configuration options.
+ For example, if you are working with a local clone of the
+ kernel repository, you could checkout the kernel's
+ <filename>meta</filename> branch, make your changes, and
+ then push the changes to the local bare clone of the
+ kernel.
+ The result is that you directly add configuration options
+ to the <filename>meta</filename> branch for your BSP.
+ The configuration options will likely end up in that
+ location anyway if the BSP gets added to the Yocto Project.
</para>
<para>
- In general, however, the Yocto Project maintainers take care of moving the
- <filename>SRC_URI</filename>-specified
- configuration options to the kernel's <filename>meta</filename> branch.
- Not only is it easier for BSP developers to not have to worry about putting those
- configurations in the branch, but having the maintainers do it allows them to apply
- 'global' knowledge about the kinds of common configuration options multiple BSPs in
- the tree are typically using.
- This allows for promotion of common configurations into common features.
+ In general, however, the Yocto Project maintainers take
+ care of moving the <filename>SRC_URI</filename>-specified
+ configuration options to the kernel's
+ <filename>meta</filename> branch.
+ Not only is it easier for BSP developers to not have to
+ worry about putting those configurations in the branch,
+ but having the maintainers do it allows them to apply
+ 'global' knowledge about the kinds of common configuration
+ options multiple BSPs in the tree are typically using.
+ This allows for promotion of common configurations into
+ common features.
</para>
</note>
</section>
@@ -295,9 +819,12 @@
</para>
<para>
- For a detailed example showing how to patch the kernel, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"
- section in the Yocto Project Development Manual.
+ For a detailed example showing how to patch the kernel using
+ <filename>devtool</filename>, see the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ and
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ sections.
</para>
</section>
@@ -383,8 +910,8 @@
<para>
For a detailed example showing how to configure the kernel,
see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#configuring-the-kernel'>Configuring the Kernel</ulink>"
- section in the Yocto Project Development Manual.
+ "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>"
+ section.
</para>
</section>
@@ -416,15 +943,17 @@
<para>
To specify an "in-tree" <filename>defconfig</filename> file,
- edit the recipe that builds your kernel so that it has the
- following command form:
+ use the following statement form:
<literallayout class='monospaced'>
- KBUILD_DEFCONFIG_KMACHINE ?= <replaceable>defconfig_file</replaceable>
+ KBUILD_DEFCONFIG_<replaceable>KMACHINE</replaceable> ?= <replaceable>defconfig_file</replaceable>
+ </literallayout>
+ Here is an example that appends the
+ <filename>KBUILD_DEFCONFIG</filename> variable with
+ "common-pc" and provides the path to the "in-tree"
+ <filename>defconfig</filename> file:
+ <literallayout class='monospaced'>
+ KBUILD_DEFCONFIG_common-pc ?= "/home/scottrif/configfiles/my_defconfig_file"
</literallayout>
- You need to append the variable with
- <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>
- and then supply the path to your "in-tree"
- <filename>defconfig</filename> file.
</para>
<para>
@@ -432,7 +961,8 @@
<filename>defconfig</filename> file, you need to be sure no
files or statements set <filename>SRC_URI</filename> to use a
<filename>defconfig</filename> other than your "in-tree"
- file (e.g. a kernel's <filename>linux-</filename><replaceable>machine</replaceable><filename>.inc</filename>
+ file (e.g. a kernel's
+ <filename>linux-</filename><replaceable>machine</replaceable><filename>.inc</filename>
file).
In other words, if the build system detects a statement
that identifies an "out-of-tree"
@@ -449,115 +979,750 @@
</section>
</section>
- <section id='using-an-iterative-development-process'>
- <title>Using an Iterative Development Process</title>
+ <section id="using-devtool-to-patch-the-kernel">
+ <title>Using <filename>devtool</filename> to Patch the Kernel</title>
<para>
- If you do not have existing patches or configuration files,
- you can iteratively generate them from within the BitBake build
- environment as described within this section.
- During an iterative workflow, running a previously completed BitBake
- task causes BitBake to invalidate the tasks that follow the
- completed task in the build sequence.
- Invalidated tasks rebuild the next time you run the build using
- BitBake.
+ The steps in this procedure show you how you can patch the
+ kernel using the extensible SDK and <filename>devtool</filename>.
+ <note>
+ Before attempting this procedure, be sure you have performed
+ the steps to get ready for updating the kernel as described
+ in the
+ "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
+ section.
+ </note>
</para>
<para>
- As you read this section, be sure to substitute the name
- of your Linux kernel recipe for the term
- "linux-yocto".
+ Patching the kernel involves changing or adding configurations
+ to an existing kernel, changing or adding recipes to the kernel
+ that are needed to support specific hardware features, or even
+ altering the source code itself.
</para>
- <section id='tip-dirty-string'>
- <title>"-dirty" String</title>
+ <para>
+ This example creates a simple patch by adding some QEMU emulator
+ console output at boot time through <filename>printk</filename>
+ statements in the kernel's <filename>calibrate.c</filename> source
+ code file.
+ Applying the patch and booting the modified image causes the added
+ messages to appear on the emulator's console.
+ The example is a continuation of the setup procedure found in
+ the
+ "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
+ Section.
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Check Out the Kernel Source Files:</emphasis>
+ First you must use <filename>devtool</filename> to checkout
+ the kernel source code in its workspace.
+ Be sure you are in the terminal set up to do work
+ with the extensible SDK.
+ <note>
+ See this
+ <link linkend='setting-up-the-esdk-terminal'>step</link>
+ in the
+ "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
+ section for more information.
+ </note>
+ Use the following <filename>devtool</filename> command
+ to check out the code:
+ <literallayout class='monospaced'>
+ $ devtool modify linux-yocto
+ </literallayout>
+ <note>
+ During the checkout operation, a bug exists that could
+ cause errors such as the following to appear:
+ <literallayout class='monospaced'>
+ ERROR: Taskhash mismatch 2c793438c2d9f8c3681fd5f7bc819efa versus
+ be3a89ce7c47178880ba7bf6293d7404 for
+ /path/to/esdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb.do_unpack
+ </literallayout>
+ You can safely ignore these messages.
+ The source code is correctly checked out.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Edit the Source Files</emphasis>
+ Follow these steps to make some simple changes to the source
+ files:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Change the working directory</emphasis>:
+ In the previous step, the output noted where you can find
+ the source files (e.g.
+ <filename>~/poky_sdk/workspace/sources/linux-yocto</filename>).
+ Change to where the kernel source code is before making
+ your edits to the <filename>calibrate.c</filename> file:
+ <literallayout class='monospaced'>
+ $ cd ~/poky_sdk/workspace/sources/linux-yocto
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Edit the source file</emphasis>:
+ Edit the <filename>init/calibrate.c</filename> file to have
+ the following changes:
+ <literallayout class='monospaced'>
+ void calibrate_delay(void)
+ {
+ unsigned long lpj;
+ static bool printed;
+ int this_cpu = smp_processor_id();
+
+ printk("*************************************\n");
+ printk("* *\n");
+ printk("* HELLO YOCTO KERNEL *\n");
+ printk("* *\n");
+ printk("*************************************\n");
+
+ if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
+ .
+ .
+ .
+ </literallayout>
+ </para></listitem>
+ </orderedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Updated Kernel Source:</emphasis>
+ To build the updated kernel source, use
+ <filename>devtool</filename>:
+ <literallayout class='monospaced'>
+ $ devtool build linux-yocto
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create the Image With the New Kernel:</emphasis>
+ Use the <filename>devtool build-image</filename> command
+ to create a new image that has the new kernel.
+ <note>
+ If the image you originally created resulted in a Wic
+ file, you can use an alternate method to create the new
+ image with the updated kernel.
+ For an example, see the steps in the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk'>TipsAndTricks/KernelDevelopmentWithEsdk</ulink>
+ Wiki Page.
+ </note>
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ devtool build-image core-image-minimal
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Test the New Image:</emphasis>
+ For this example, you can run the new image using QEMU
+ to verify your changes:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Boot the image</emphasis>:
+ Boot the modified image in the QEMU emulator
+ using this command:
+ <literallayout class='monospaced'>
+ $ runqemu qemux86
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Verify the changes</emphasis>:
+ Log into the machine using <filename>root</filename>
+ with no password and then use the following shell
+ command to scroll through the console's boot output.
+ <literallayout class='monospaced'>
+ # dmesg | less
+ </literallayout>
+ You should see the results of your
+ <filename>printk</filename> statements
+ as part of the output when you scroll down the
+ console window.
+ </para></listitem>
+ </orderedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Stage and commit your changes</emphasis>:
+ Within your eSDK terminal, change your working directory to
+ where you modified the <filename>calibrate.c</filename>
+ file and use these Git commands to stage and commit your
+ changes:
+ <literallayout class='monospaced'>
+ $ cd ~/poky_sdk/workspace/sources/linux-yocto
+ $ git status
+ $ git add init/calibrate.c
+ $ git commit -m "calibrate: Add printk example"
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Export the Patches and Create an Append File:</emphasis>
+ To export your commits as patches and create a
+ <filename>.bbappend</filename> file, use the following
+ command in the terminal used to work with the extensible
+ SDK.
+ This example uses the previously established layer named
+ <filename>meta-mylayer</filename>.
+ <note>
+ See Step 3 of the
+ "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using devtool</link>"
+ section for information on setting up this layer.
+ </note>
+ <literallayout class='monospaced'>
+ $ devtool finish linux-yocto ~/meta-mylayer
+ </literallayout>
+ Once the command finishes, the patches and the
+ <filename>.bbappend</filename> file are located in the
+ <filename>~/meta-mylayer/recipes-kernel/linux</filename>
+ directory.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Image With Your Modified Kernel:</emphasis>
+ You can now build an image that includes your kernel
+ patches.
+ Execute the following command from your
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ in the terminal set up to run BitBake:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake core-image-minimal
+ </literallayout>
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id="using-traditional-kernel-development-to-patch-the-kernel">
+ <title>Using Traditional Kernel Development to Patch the Kernel</title>
+
+ <para>
+ The steps in this procedure show you how you can patch the
+ kernel using traditional kernel development (i.e. not using
+ <filename>devtool</filename> and the extensible SDK as
+ described in the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ section).
+ <note>
+ Before attempting this procedure, be sure you have performed
+ the steps to get ready for updating the kernel as described
+ in the
+ "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
+ section.
+ </note>
+ </para>
+
+ <para>
+ Patching the kernel involves changing or adding configurations
+ to an existing kernel, changing or adding recipes to the kernel
+ that are needed to support specific hardware features, or even
+ altering the source code itself.
+ </para>
+
+ <para>
+ The example in this section creates a simple patch by adding some
+ QEMU emulator console output at boot time through
+ <filename>printk</filename> statements in the kernel's
+ <filename>calibrate.c</filename> source code file.
+ Applying the patch and booting the modified image causes the added
+ messages to appear on the emulator's console.
+ The example is a continuation of the setup procedure found in
+ the
+ "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
+ Section.
+ </para>
+
+ <para>
+ Although this example uses Git and shell commands to generate the
+ patch, you could use the <filename>yocto-kernel</filename> script
+ found in the <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ under <filename>scripts</filename> to add and manage kernel
+ patches and configuration.
+ See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>"
+ section in the Yocto Project Board Support Packages (BSP)
+ Developer's Guide for more information on the
+ <filename>yocto-kernel</filename> script.
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Edit the Source Files</emphasis>
+ Prior to this step, you should have used Git to create a
+ local copy of the repository for your kernel.
+ Assuming you created the repository as directed in the
+ "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
+ section, use the following commands to edit the
+ <filename>calibrate.c</filename> file:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Change the working directory</emphasis>:
+ You need to locate the source files in the
+ local copy of the kernel Git repository:
+ Change to where the kernel source code is before making
+ your edits to the <filename>calibrate.c</filename> file:
+ <literallayout class='monospaced'>
+ $ cd ~/linux-yocto-4.12/init
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Edit the source file</emphasis>:
+ Edit the <filename>calibrate.c</filename> file to have
+ the following changes:
+ <literallayout class='monospaced'>
+ void calibrate_delay(void)
+ {
+ unsigned long lpj;
+ static bool printed;
+ int this_cpu = smp_processor_id();
+
+ printk("*************************************\n");
+ printk("* *\n");
+ printk("* HELLO YOCTO KERNEL *\n");
+ printk("* *\n");
+ printk("*************************************\n");
+
+ if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
+ .
+ .
+ .
+ </literallayout>
+ </para></listitem>
+ </orderedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Stage and Commit Your Changes:</emphasis>
+ Use standard Git commands to stage and commit the changes
+ you just made:
+ <literallayout class='monospaced'>
+ $ git add calibrate.c
+ $ git commit -m "calibrate.c - Added some printk statements"
+ </literallayout>
+ If you do not stage and commit your changes, the OpenEmbedded
+ Build System will not pick up the changes.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Update Your <filename>local.conf</filename> File
+ to Point to Your Source Files:</emphasis>
+ In addition to your <filename>local.conf</filename> file
+ specifying to use "kernel-modules" and the "qemux86"
+ machine, it must also point to the updated kernel source
+ files.
+ Add
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
+ statements similar to the following to your
+ <filename>local.conf</filename>:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build/conf
+ </literallayout>
+ Add the following to the <filename>local.conf</filename>:
+ <literallayout class='monospaced'>
+ SRC_URI_pn-linux-yocto = "git:///<replaceable>path-to</replaceable>/linux-yocto-4.12;protocol=file;name=machine;branch=standard/base; \
+ git:///<replaceable>path-to</replaceable>/yocto-kernel-cache;protocol=file;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
+ SRCREV_meta_qemux86 = "${AUTOREV}"
+ SRCREV_machine_qemux86 = "${AUTOREV}"
+ </literallayout>
+ <note>
+ Be sure to replace
+ <replaceable>path-to</replaceable> with the pathname
+ to your local Git repositories.
+ Also, you must be sure to specify the correct branch
+ and machine types.
+ For this example, the branch is
+ <filename>standard/base</filename> and the machine is
+ "qemux86".
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the Image:</emphasis>
+ With the source modified, your changes staged and
+ committed, and the <filename>local.conf</filename> file
+ pointing to the kernel files, you can now use BitBake to
+ build the image:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake core-image-minimal
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Boot the image</emphasis>:
+ Boot the modified image in the QEMU emulator
+ using this command.
+ When prompted to login to the QEMU console, use "root"
+ with no password:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ runqemu qemux86
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Look for Your Changes:</emphasis>
+ As QEMU booted, you might have seen your changes rapidly
+ scroll by.
+ If not, use these commands to see your changes:
+ <literallayout class='monospaced'>
+ # dmesg | less
+ </literallayout>
+ You should see the results of your
+ <filename>printk</filename> statements
+ as part of the output when you scroll down the
+ console window.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Generate the Patch File:</emphasis>
+ Once you are sure that your patch works correctly, you
+ can generate a <filename>*.patch</filename> file in the
+ kernel source repository:
+ <literallayout class='monospaced'>
+ $ cd ~/linux-yocto-4.12/init
+ $ git format-patch -1
+ 0001-calibrate.c-Added-some-printk-statements.patch
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Move the Patch File to Your Layer:</emphasis>
+ In order for subsequent builds to pick up patches, you
+ need to move the patch file you created in the previous
+ step to your layer <filename>meta-mylayer</filename>.
+ For this example, the layer created earlier is located
+ in your home directory as <filename>meta-mylayer</filename>.
+ When the layer was created using the
+ <filename>yocto-create</filename> script, no additional
+ hierarchy was created to support patches.
+ Before moving the patch file, you need to add additional
+ structure to your layer using the following commands:
+ <literallayout class='monospaced'>
+ $ cd ~/meta-mylayer
+ $ mkdir recipes-kernel
+ $ mkdir recipes-kernel/linux
+ $ mkdir recipes-kernel/linux/linux-yocto
+ </literallayout>
+ Once you have created this hierarchy in your layer, you can
+ move the patch file using the following command:
+ <literallayout class='monospaced'>
+ $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create the Append File:</emphasis>
+ Finally, you need to create the
+ <filename>linux-yocto_4.12.bbappend</filename> file and
+ insert statements that allow the OpenEmbedded build
+ system to find the patch.
+ The append file needs to be in your layer's
+ <filename>recipes-kernel/linux</filename>
+ directory and it must be named
+ <filename>linux-yocto_4.12.bbappend</filename> and have
+ the following contents:
+ <literallayout class='monospaced'>
+ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+ SRC_URI_append = " file://0001-calibrate.c-Added-some-printk-statements.patch"
+ </literallayout>
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ statements enable the OpenEmbedded build system to find
+ the patch file.</para>
+
+ <para>For more information on append files and patches,
+ see the
+ "<link linkend='creating-the-append-file'>Creating the Append File</link>"
+ and
+ "<link linkend='applying-patches'>Applying Patches</link>"
+ sections.
+ You can also see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer"</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ <note>
+ To build <filename>core-image-minimal</filename>
+ again and see the effects of your patch, you can
+ essentially eliminate the temporary source files
+ saved in <filename>poky/build/tmp/work/...</filename>
+ and residual effects of the build by entering the
+ following sequence of commands:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build
+ $ bitbake -c cleanall yocto-linux
+ $ bitbake core-image-minimal -c cleanall
+ $ bitbake core-image-minimal
+ $ runqemu qemux86
+ </literallayout>
+ </note>
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='configuring-the-kernel'>
+ <title>Configuring the Kernel</title>
+
+ <para>
+ Configuring the Yocto Project kernel consists of making sure the
+ <filename>.config</filename> file has all the right information
+ in it for the image you are building.
+ You can use the <filename>menuconfig</filename> tool and
+ configuration fragments to make sure your
+ <filename>.config</filename> file is just how you need it.
+ You can also save known configurations in a
+ <filename>defconfig</filename> file that the build system can use
+ for kernel configuration.
+ </para>
+
+ <para>
+ This section describes how to use <filename>menuconfig</filename>,
+ create and use configuration fragments, and how to interactively
+ modify your <filename>.config</filename> file to create the
+ leanest kernel configuration file possible.
+ </para>
+
+ <para>
+ For more information on kernel configuration, see the
+ "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
+ section.
+ </para>
+
+ <section id='using-menuconfig'>
+ <title>Using&nbsp;&nbsp;<filename>menuconfig</filename></title>
-<!--
<para>
- <emphasis>AR - Darren Hart:</emphasis> This section
- originated from the old Yocto Project Kernel Architecture
- and Use Manual.
- It was decided we need to put it in this section here.
- Darren needs to figure out where we want it and what part
- of it we want (all, revision???)
+ The easiest way to define kernel configurations is to set
+ them through the <filename>menuconfig</filename> tool.
+ This tool provides an interactive method with which
+ to set kernel configurations.
+ For general information on <filename>menuconfig</filename>, see
+ <ulink url='http://en.wikipedia.org/wiki/Menuconfig'></ulink>.
</para>
--->
<para>
- If kernel images are being built with "-dirty" on the
- end of the version string, this simply means that
- modifications in the source directory have not been committed.
+ To use the <filename>menuconfig</filename> tool in the Yocto
+ Project development environment, you must launch it using
+ BitBake.
+ Thus, the environment must be set up using the
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+ script found in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+ You must also be sure of the state of your build's
+ configuration in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+ The following commands initialize the BitBake environment,
+ run the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></ulink>
+ task, and launch <filename>menuconfig</filename>.
+ These commands assume the Source Directory's top-level folder
+ is <filename>~/poky</filename>:
<literallayout class='monospaced'>
- $ git status
+ $ cd poky
+ $ source oe-init-build-env
+ $ bitbake linux-yocto -c kernel_configme -f
+ $ bitbake linux-yocto -c menuconfig
</literallayout>
+ Once <filename>menuconfig</filename> comes up, its standard
+ interface allows you to interactively examine and configure
+ all the kernel configuration parameters.
+ After making your changes, simply exit the tool and save your
+ changes to create an updated version of the
+ <filename>.config</filename> configuration file.
+ <note>
+ You can use the entire <filename>.config</filename> file
+ as the <filename>defconfig</filename> file.
+ For information on <filename>defconfig</filename> files,
+ see the
+ "<link linkend='changing-the-configuration'>Changing the Configuration</link>",
+ "<link linkend='using-an-in-tree-defconfig-file'>Using an In-Tree <filename>defconfig</filename> File</link>,
+ and
+ "<link linkend='creating-a-defconfig-file'>Creating a <filename>defconfig</filename> File</link>"
+ sections.
+ </note>
</para>
<para>
- You can use the above Git command to report modified,
- removed, or added files.
- You should commit those changes to the tree regardless of
- whether they will be saved, exported, or used.
- Once you commit the changes, you need to rebuild the kernel.
+ Consider an example that configures the "CONFIG_SMP" setting
+ for the <filename>linux-yocto-4.12</filename> kernel.
+ <note>
+ The OpenEmbedded build system recognizes this kernel as
+ <filename>linux-yocto</filename> through Metadata (e.g.
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink><filename>_linux-yocto ?= "12.4%"</filename>).
+ </note>
+ Once <filename>menuconfig</filename> launches, use the
+ interface to navigate through the selections to find the
+ configuration settings in which you are interested.
+ For this example, you deselect "CONFIG_SMP" by clearing the
+ "Symmetric Multi-Processing Support" option.
+ Using the interface, you can find the option under
+ "Processor Type and Features".
+ To deselect "CONFIG_SMP", use the arrow keys to
+ highlight "Symmetric Multi-Processing Support" and enter "N"
+ to clear the asterisk.
+ When you are finished, exit out and save the change.
</para>
<para>
- To force a pickup and commit of all such pending changes,
- enter the following:
+ Saving the selections updates the <filename>.config</filename>
+ configuration file.
+ This is the file that the OpenEmbedded build system uses to
+ configure the kernel during the build.
+ You can find and examine this file in the Build Directory in
+ <filename>tmp/work/</filename>.
+ The actual <filename>.config</filename> is located in the
+ area where the specific kernel is built.
+ For example, if you were building a Linux Yocto kernel based
+ on the <filename>linux-yocto-4.12</filename> kernel and you
+ were building a QEMU image targeted for
+ <filename>x86</filename> architecture, the
+ <filename>.config</filename> file would be:
<literallayout class='monospaced'>
- $ git add .
- $ git commit -s -a -m "getting rid of -dirty"
+ poky/build/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+gitAUTOINC+eda4d18...
+ ...967-r0/linux-qemux86-standard-build/.config
+ </literallayout>
+ <note>
+ The previous example directory is artificially split and
+ many of the characters in the actual filename are omitted
+ in order to make it more readable.
+ Also, depending on the kernel you are using, the exact
+ pathname might differ.
+ </note>
+ </para>
+
+ <para>
+ Within the <filename>.config</filename> file, you can see the
+ kernel settings.
+ For example, the following entry shows that symmetric
+ multi-processor support is not set:
+ <literallayout class='monospaced'>
+ # CONFIG_SMP is not set
</literallayout>
</para>
<para>
- Next, rebuild the kernel.
+ A good method to isolate changed configurations is to use a
+ combination of the <filename>menuconfig</filename> tool and
+ simple shell commands.
+ Before changing configurations with
+ <filename>menuconfig</filename>, copy the existing
+ <filename>.config</filename> and rename it to something else,
+ use <filename>menuconfig</filename> to make as many changes as
+ you want and save them, then compare the renamed configuration
+ file against the newly created file.
+ You can use the resulting differences as your base to create
+ configuration fragments to permanently save in your kernel
+ layer.
+ <note>
+ Be sure to make a copy of the <filename>.config</filename>
+ file and do not just rename it.
+ The build system needs an existing
+ <filename>.config</filename> file from which to work.
+ </note>
+ </para>
+ </section>
+
+ <section id='creating-a-defconfig-file'>
+ <title>Creating a&nbsp;&nbsp;<filename>defconfig</filename> File</title>
+
+ <para>
+ A <filename>defconfig</filename> file is simply a
+ <filename>.config</filename> renamed to "defconfig".
+ You can use a <filename>defconfig</filename> file
+ to retain a known set of kernel configurations from which the
+ OpenEmbedded build system can draw to create the final
+ <filename>.config</filename> file.
+ <note>
+ Out-of-the-box, the Yocto Project never ships a
+ <filename>defconfig</filename> or
+ <filename>.config</filename> file.
+ The OpenEmbedded build system creates the final
+ <filename>.config</filename> file used to configure the
+ kernel.
+ </note>
+ </para>
+
+ <para>
+ To create a <filename>defconfig</filename>, start with a
+ complete, working Linux kernel <filename>.config</filename>
+ file.
+ Copy that file to the appropriate
+ <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
+ directory in your layer's
+ <filename>recipes-kernel/linux</filename> directory, and rename
+ the copied file to "defconfig" (e.g.
+ <filename>~/meta-mylayer/recipes-kernel/linux/linux-yocto/defconfig</filename>).
+ Then, add the following lines to the linux-yocto
+ <filename>.bbappend</filename> file in your layer:
+ <literallayout class='monospaced'>
+ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+ SRC_URI += "file://defconfig"
+ </literallayout>
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ tells the build system how to search for the file, while the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+ extends the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
+ variable (search directories) to include the
+ <filename>${PN}</filename> directory you created to hold the
+ configuration changes.
+ <note>
+ The build system applies the configurations from the
+ <filename>defconfig</filename> file before applying any
+ subsequent configuration fragments.
+ The final kernel configuration is a combination of the
+ configurations in the <filename>defconfig</filename>
+ file and any configuration fragments you provide.
+ You need to realize that if you have any configuration
+ fragments, the build system applies these on top of and
+ after applying the existing defconfig file configurations.
+ </note>
+ For more information on configuring the kernel, see the
+ "<link link='changing-the-configuration'>Changing the Configuration</link>"
+ section.
</para>
</section>
- <section id='generating-configuration-files'>
- <title>Generating Configuration Files</title>
+ <section id='creating-config-fragments'>
+ <title>Creating Configuration Fragments</title>
+
+ <para>
+ Configuration fragments are simply kernel options that
+ appear in a file placed where the OpenEmbedded build system
+ can find and apply them.
+ The build system applies configuration fragments after
+ applying configurations from a <filename>defconfig</filename>
+ file.
+ Thus, the final kernel configuration is a combination of the
+ configurations in the <filename>defconfig</filename>
+ file and then any configuration fragments you provide.
+ The build system applies fragments on top of and
+ after applying the existing defconfig file configurations.
+ </para>
+
+ <para>
+ Syntactically, the configuration statement is identical to
+ what would appear in the <filename>.config</filename> file,
+ which is in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+ <note>
+ For more information about where the
+ <filename>.config</filename> file is located, see the
+ example in the
+ "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
+ section.
+ </note>
+ </para>
<para>
- You can manipulate the <filename>.config</filename> file
- used to build a linux-yocto recipe with the
- <filename>menuconfig</filename> command as follows:
+ It is simple to create a configuration fragment.
+ One method is to use shell commands.
+ For example, issuing the following from the shell creates a
+ configuration fragment file named
+ <filename>my_smp.cfg</filename> that enables multi-processor
+ support within the kernel:
<literallayout class='monospaced'>
- $ bitbake linux-yocto -c menuconfig
+ $ echo "CONFIG_SMP=y" >> my_smp.cfg
</literallayout>
- This command starts the Linux kernel configuration tool,
- which allows you to prepare a new
- <filename>.config</filename> file for the build.
- When you exit the tool, be sure to save your changes
- at the prompt.
- </para>
-
- <para>
- The resulting <filename>.config</filename> file is
- located in the build directory,
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink><filename>}</filename>,
- which expands to
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename><filename>/linux-</filename><filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink><filename>}-${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink><filename>}-build</filename>.
- You can use the entire <filename>.config</filename> file as the
- <filename>defconfig</filename> file as described in the
- "<link linkend='changing-the-configuration'>Changing the Configuration</link>" section.
- For more information on the <filename>.config</filename> file,
- see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
- section in the Yocto Project Development Manual.
<note>
- You can determine what a variable expands to by looking
- at the output of the <filename>bitbake -e</filename>
- command:
- <literallayout class='monospaced'>
- $ bitbake -e virtual/kernel
- </literallayout>
- Search the output for the variable in which you are
- interested to see exactly how it is expanded and used.
+ All configuration fragment files must use the
+ <filename>.cfg</filename> extension in order for the
+ OpenEmbedded build system to recognize them as a
+ configuration fragment.
</note>
</para>
<para>
- A better method is to create a configuration fragment using the
+ Another method is to create a configuration fragment using the
differences between two configuration files: one previously
created and saved, and one freshly created using the
<filename>menuconfig</filename> tool.
@@ -567,40 +1732,47 @@
To create a configuration fragment using this method, follow
these steps:
<orderedlist>
- <listitem><para>Complete a build at least through the kernel
+ <listitem><para>
+ <emphasis>Complete a Build Through Kernel Configuration:</emphasis>
+ Complete a build at least through the kernel
configuration task as follows:
<literallayout class='monospaced'>
$ bitbake linux-yocto -c kernel_configme -f
</literallayout>
- This step ensures that you will be creating a
+ This step ensures that you create a
<filename>.config</filename> file from a known state.
Because situations exist where your build state might
- become unknown, it is best to run the previous
- command prior to starting up
- <filename>menuconfig</filename>.
+ become unknown, it is best to run this task prior
+ to starting <filename>menuconfig</filename>.
</para></listitem>
- <listitem><para>Run the <filename>menuconfig</filename>
- command:
+ <listitem><para>
+ <emphasis>Launch <filename>menuconfig</filename>:</emphasis>
+ Run the <filename>menuconfig</filename> command:
<literallayout class='monospaced'>
$ bitbake linux-yocto -c menuconfig
- </literallayout></para></listitem>
- <listitem><para>Run the <filename>diffconfig</filename>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create the Configuration Fragment:</emphasis>
+ Run the <filename>diffconfig</filename>
command to prepare a configuration fragment.
The resulting file <filename>fragment.cfg</filename>
- will be placed in the
+ is placed in the
<filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename> directory:
<literallayout class='monospaced'>
$ bitbake linux-yocto -c diffconfig
- </literallayout></para></listitem>
+ </literallayout>
+ </para></listitem>
</orderedlist>
</para>
<para>
- The <filename>diffconfig</filename> command creates a file that is a
- list of Linux kernel <filename>CONFIG_</filename> assignments.
+ The <filename>diffconfig</filename> command creates a file
+ that is a list of Linux kernel <filename>CONFIG_</filename>
+ assignments.
See the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
- section for information on how to use the output as a
- configuration fragment.
+ section for additional information on how to use the output
+ as a configuration fragment.
<note>
You can also use this method to create configuration
fragments for a BSP.
@@ -610,34 +1782,126 @@
</para>
<para>
- The kernel tools also provide configuration validation.
- You can use these tools to produce warnings for when a
+ Where do you put your configuration fragment files?
+ You can place these files in an area pointed to by
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ as directed by your <filename>bblayers.conf</filename> file,
+ which is located in your layer.
+ The OpenEmbedded build system picks up the configuration and
+ adds it to the kernel's configuration.
+ For example, suppose you had a set of configuration options
+ in a file called <filename>myconfig.cfg</filename>.
+ If you put that file inside a directory named
+ <filename>linux-yocto</filename> that resides in the same
+ directory as the kernel's append file within your layer
+ and then add the following statements to the kernel's append
+ file, those configuration options will be picked up and applied
+ when the kernel is built:
+ <literallayout class='monospaced'>
+ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+ SRC_URI += "file://myconfig.cfg"
+ </literallayout>
+ </para>
+
+ <para>
+ As mentioned earlier, you can group related configurations
+ into multiple files and name them all in the
+ <filename>SRC_URI</filename> statement as well.
+ For example, you could group separate configurations
+ specifically for Ethernet and graphics into their own files
+ and add those by using a <filename>SRC_URI</filename> statement
+ like the following in your append file:
+ <literallayout class='monospaced'>
+ SRC_URI += "file://myconfig.cfg \
+ file://eth.cfg \
+ file://gfx.cfg"
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='validating-configuration'>
+ <title>Validating Configuration</title>
+
+ <para>
+ You can use the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck'><filename>do_kernel_configcheck</filename></ulink>
+ task to provide configuration validation:
+ <literallayout class='monospaced'>
+ $ bitbake linux-yocto -c kernel_configcheck -f
+ </literallayout>
+ Running this task produces warnings for when a
requested configuration does not appear in the final
<filename>.config</filename> file or when you override a
policy configuration in a hardware configuration fragment.
- Here is an example with some sample output of the command
- that runs these tools:
+ </para>
+
+ <para>
+ In order to run this task, you must have an existing
+ <filename>.config</filename> file.
+ See the
+ "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
+ section for information on how to create a configuration file.
+ </para>
+
+ <para>
+ Following is sample output from the
+ <filename>do_kernel_configcheck</filename> task:
<literallayout class='monospaced'>
- $ bitbake linux-yocto -c kernel_configcheck -f
+ Loading cache: 100% |########################################################| Time: 0:00:00
+ Loaded 1275 entries from dependency cache.
+ NOTE: Resolving any missing task queue dependencies
- ...
+ Build Configuration:
+ .
+ .
+ .
+
+ NOTE: Executing SetScene Tasks
+ NOTE: Executing RunQueue Tasks
+ WARNING: linux-yocto-4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0 do_kernel_configcheck:
+ [kernel config]: specified values did not make it into the kernel's final configuration:
+
+ ---------- CONFIG_X86_TSC -----------------
+ Config: CONFIG_X86_TSC
+ From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/bsp/common-pc/common-pc-cpu.cfg
+ Requested value: CONFIG_X86_TSC=y
+ Actual value:
+
+
+ ---------- CONFIG_X86_BIGSMP -----------------
+ Config: CONFIG_X86_BIGSMP
+ From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg
+ /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig
+ Requested value: # CONFIG_X86_BIGSMP is not set
+ Actual value:
- NOTE: validating kernel configuration
- This BSP sets 3 invalid/obsolete kernel options.
- These config options are not offered anywhere within this kernel.
- The full list can be found in your kernel src dir at:
- meta/cfg/standard/mybsp/invalid.cfg
-
- This BSP sets 21 kernel options that are possibly non-hardware related.
- The full list can be found in your kernel src dir at:
- meta/cfg/standard/mybsp/specified_non_hdw.cfg
-
- WARNING: There were 2 hardware options requested that do not
- have a corresponding value present in the final ".config" file.
- This probably means you are not getting the config you wanted.
- The full list can be found in your kernel src dir at:
- meta/cfg/standard/mybsp/mismatch.cfg
+
+ ---------- CONFIG_NR_CPUS -----------------
+ Config: CONFIG_NR_CPUS
+ From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg
+ /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/bsp/common-pc/common-pc.cfg
+ /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig
+ Requested value: CONFIG_NR_CPUS=8
+ Actual value: CONFIG_NR_CPUS=1
+
+
+ ---------- CONFIG_SCHED_SMT -----------------
+ Config: CONFIG_SCHED_SMT
+ From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg
+ /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig
+ Requested value: CONFIG_SCHED_SMT=y
+ Actual value:
+
+
+
+ NOTE: Tasks Summary: Attempted 288 tasks of which 285 didn't need to be rerun and all succeeded.
+
+ Summary: There were 3 WARNING messages shown.
</literallayout>
+ <note>
+ The previous output example has artificial line breaks
+ to make it more readable.
+ </note>
</para>
<para>
@@ -646,113 +1910,210 @@
items.
You can use the information in the logs to adjust your
configuration files and then repeat the
- <filename>kernel_configme</filename> and
- <filename>kernel_configcheck</filename> commands until
- they produce no warnings.
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></ulink>
+ and
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck'><filename>do_kernel_configcheck</filename></ulink>
+ tasks until they produce no warnings.
</para>
<para>
For more information on how to use the
<filename>menuconfig</filename> tool, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
- section in the Yocto Project Development Manual.
+ "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
+ section.
</para>
</section>
- <section id='modifying-source-code'>
- <title>Modifying Source Code</title>
+ <section id='fine-tuning-the-kernel-configuration-file'>
+ <title>Fine-Tuning the Kernel Configuration File</title>
<para>
- You can experiment with source code changes and create a
- simple patch without leaving the BitBake environment.
- To get started, be sure to complete a build at
- least through the kernel configuration task:
- <literallayout class='monospaced'>
- $ bitbake linux-yocto -c kernel_configme -f
- </literallayout>
- Taking this step ensures you have the sources prepared
- and the configuration completed.
- You can find the sources in the build directory within the
- <filename>source/</filename> directory, which is a symlink
- (i.e. <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink><filename>}/source</filename>).
- The <filename>source/</filename> directory expands to
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename><filename>/linux-</filename><filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink><filename>}-${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink><filename>}-build/source</filename>.
- The directory pointed to by the
- <filename>source/</filename> symlink is also known as
- <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></ulink><filename>}</filename>.
- </para>
-
- <para>
- You can edit the sources as you would any other Linux source
- tree.
- However, keep in mind that you will lose changes if you
- trigger the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
- task for the recipe.
- You can avoid triggering this task by not using BitBake to
- run the
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>cleanall</filename></ulink>,
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleansstate'><filename>cleansstate</filename></ulink>,
- or forced
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>fetch</filename></ulink>
- commands.
- Also, do not modify the recipe itself while working
- with temporary changes or BitBake might run the
- <filename>fetch</filename> command depending on the
- changes to the recipe.
- </para>
-
- <para>
- To test your temporary changes, instruct BitBake to run the
- <filename>compile</filename> again.
- The <filename>-f</filename> option forces the command to run
- even though BitBake might think it has already done so:
- <literallayout class='monospaced'>
- $ bitbake linux-yocto -c compile -f
- </literallayout>
- If the compile fails, you can update the sources and repeat
- the <filename>compile</filename>.
- Once compilation is successful, you can inspect and test
- the resulting build (i.e. kernel, modules, and so forth) from
- the following build directory:
- <literallayout class='monospaced'>
- ${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build
- </literallayout>
- Alternatively, you can run the <filename>deploy</filename>
- command to place the kernel image in the
- <filename>tmp/deploy/images</filename> directory:
- <literallayout class='monospaced'>
- $ bitbake linux-yocto -c deploy
- </literallayout>
- And, of course, you can perform the remaining installation and
- packaging steps by issuing:
- <literallayout class='monospaced'>
- $ bitbake linux-yocto
- </literallayout>
+ You can make sure the <filename>.config</filename> file is as
+ lean or efficient as possible by reading the output of the
+ kernel configuration fragment audit, noting any issues, making
+ changes to correct the issues, and then repeating.
</para>
<para>
- For rapid iterative development, the edit-compile-repeat loop
- described in this section is preferable to rebuilding the
- entire recipe because the installation and packaging tasks
- are very time consuming.
+ As part of the kernel build process, the
+ <filename>do_kernel_configcheck</filename> task runs.
+ This task validates the kernel configuration by checking the
+ final <filename>.config</filename> file against the input
+ files.
+ During the check, the task produces warning messages for the
+ following issues:
+ <itemizedlist>
+ <listitem><para>
+ Requested options that did not make the final
+ <filename>.config</filename> file.
+ </para></listitem>
+ <listitem><para>
+ Configuration items that appear twice in the same
+ configuration fragment.
+ </para></listitem>
+ <listitem><para>
+ Configuration items tagged as "required" that were
+ overridden.
+ </para></listitem>
+ <listitem><para>
+ A board overrides a non-board specific option.
+ </para></listitem>
+ <listitem><para>
+ Listed options not valid for the kernel being
+ processed.
+ In other words, the option does not appear anywhere.
+ </para></listitem>
+ </itemizedlist>
+ <note>
+ The <filename>do_kernel_configcheck</filename> task can
+ also optionally report if an option is overridden during
+ processing.
+ </note>
</para>
<para>
- Once you are satisfied with your source code modifications,
- you can make them permanent by generating patches and
- applying them to the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
- statement as described in the
- "<link linkend='applying-patches'>Applying Patches</link>"
- section.
- If you are not familiar with generating patches, refer to the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-the-patch'>Creating the Patch</ulink>"
- section in the Yocto Project Development Manual.
+ For each output warning, a message points to the file
+ that contains a list of the options and a pointer to the
+ configuration fragment that defines them.
+ Collectively, the files are the key to streamlining the
+ configuration.
+ </para>
+
+ <para>
+ To streamline the configuration, do the following:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Use a Working Configuration:</emphasis>
+ Start with a full configuration that you
+ know works.
+ Be sure the configuration builds and boots
+ successfully.
+ Use this configuration file as your baseline.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Run Configure and Check Tasks:</emphasis>
+ Separately run the
+ <filename>do_kernel_configme</filename> and
+ <filename>do_kernel_configcheck</filename> tasks:
+ <literallayout class='monospaced'>
+ $ bitbake linux-yocto -c kernel_configme -f
+ $ bitbake linux-yocto -c kernel_configcheck -f
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Process the Results:</emphasis>
+ Take the resulting list of files from the
+ <filename>do_kernel_configcheck</filename> task
+ warnings and do the following:
+ <itemizedlist>
+ <listitem><para>
+ Drop values that are redefined in the fragment
+ but do not change the final
+ <filename>.config</filename> file.
+ </para></listitem>
+ <listitem><para>
+ Analyze and potentially drop values from the
+ <filename>.config</filename> file that override
+ required configurations.
+ </para></listitem>
+ <listitem><para>
+ Analyze and potentially remove non-board
+ specific options.
+ </para></listitem>
+ <listitem><para>
+ Remove repeated and invalid options.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Re-Run Configure and Check Tasks:</emphasis>
+ After you have worked through the output of the kernel
+ configuration audit, you can re-run the
+ <filename>do_kernel_configme</filename> and
+ <filename>do_kernel_configcheck</filename> tasks to
+ see the results of your changes.
+ If you have more issues, you can deal with them as
+ described in the previous step.
+ </para></listitem>
+ </orderedlist>
+ </para>
+
+ <para>
+ Iteratively working through steps two through four eventually
+ yields a minimal, streamlined configuration file.
+ Once you have the best <filename>.config</filename>, you can
+ build the Linux Yocto kernel.
</para>
</section>
</section>
+ <section id='expanding-variables'>
+ <title>Expanding Variables</title>
+
+ <para>
+ Sometimes it is helpful to determine what a variable expands
+ to during a build.
+ You can do examine the values of variables by examining the
+ output of the <filename>bitbake -e</filename> command.
+ The output is long and is more easily managed in a text file,
+ which allows for easy searches:
+ <literallayout class='monospaced'>
+ $ bitbake -e virtual/kernel > <replaceable>some_text_file</replaceable>
+ </literallayout>
+ Within the text file, you can see exactly how each variable is
+ expanded and used by the OpenEmbedded build system.
+ </para>
+ </section>
+
+ <section id='working-with-a-dirty-kernel-version-string'>
+ <title>Working with a "Dirty" Kernel Version String</title>
+
+ <para>
+ If you build a kernel image and the version string has a
+ "+" or a "-dirty" at the end, uncommitted modifications exist
+ in the kernel's source directory.
+ Follow these steps to clean up the version string:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Discover the Uncommitted Changes:</emphasis>
+ Go to the kernel's locally cloned Git repository
+ (source directory) and use the following Git command
+ to list the files that have been changed, added, or
+ removed:
+ <literallayout class='monospaced'>
+ $ git status
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Commit the Changes:</emphasis>
+ You should commit those changes to the kernel source
+ tree regardless of whether or not you will save,
+ export, or use the changes:
+ <literallayout class='monospaced'>
+ $ git add
+ $ git commit -s -a -m "getting rid of -dirty"
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Rebuild the Kernel Image:</emphasis>
+ Once you commit the changes, rebuild the kernel.</para>
+
+ <para>Depending on your particular kernel development
+ workflow, the commands you use to rebuild the
+ kernel might differ.
+ For information on building the kernel image when
+ using <filename>devtool</filename>, see the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ section.
+ For information on building the kernel image when
+ using Bitbake, see the
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ section.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
<section id='working-with-your-own-sources'>
<title>Working With Your Own Sources</title>
@@ -763,7 +2124,7 @@
working with your own sources.
When you use your own sources, you will not be able to
leverage the existing kernel
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> and
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> and
stabilization work of the linux-yocto sources.
However, you will be able to manage your own Metadata in the same
format as the linux-yocto sources.
@@ -788,23 +2149,29 @@
</para>
<para>
- Here are some basic steps you can use to work with your own sources:
+ Here are some basic steps you can use to work with your own
+ sources:
<orderedlist>
- <listitem><para>Copy the <filename>linux-yocto-custom.bb</filename>
+ <listitem><para>
+ <emphasis>Create a Copy of the Kernel Recipe:</emphasis>
+ Copy the <filename>linux-yocto-custom.bb</filename>
recipe to your layer and give it a meaningful name.
- The name should include the version of the Linux kernel you
- are using (e.g.
- <filename>linux-yocto-myproject_3.19.bb</filename>,
- where "3.19" is the base version of the Linux kernel
- with which you would be working).</para></listitem>
- <listitem><para>In the same directory inside your layer,
- create a matching directory
- to store your patches and configuration files (e.g.
- <filename>linux-yocto-myproject</filename>).
+ The name should include the version of the Yocto Linux
+ kernel you are using (e.g.
+ <filename>linux-yocto-myproject_4.12.bb</filename>,
+ where "4.12" is the base version of the Linux kernel
+ with which you would be working).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create a Directory for Your Patches:</emphasis>
+ In the same directory inside your layer, create a matching
+ directory to store your patches and configuration files
+ (e.g. <filename>linux-yocto-myproject</filename>).
</para></listitem>
- <listitem><para>Make sure you have either a
- <filename>defconfig</filename> file or configuration
- fragment files.
+ <listitem><para>
+ <emphasis>Ensure You Have Configurations:</emphasis>
+ Make sure you have either a <filename>defconfig</filename>
+ file or configuration fragment files in your layer.
When you use the <filename>linux-yocto-custom.bb</filename>
recipe, you must specify a configuration.
If you do not have a <filename>defconfig</filename> file,
@@ -813,27 +2180,32 @@
$ make defconfig
</literallayout>
After running the command, copy the resulting
- <filename>.config</filename> to the
- <filename>files</filename> directory as "defconfig" and
- then add it to the
+ <filename>.config</filename> file to the
+ <filename>files</filename> directory in your layer
+ as "defconfig" and then add it to the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
variable in the recipe.</para>
+
<para>Running the <filename>make defconfig</filename>
command results in the default configuration for your
architecture as defined by your kernel.
However, no guarantee exists that this configuration is
valid for your use case, or that your board will even boot.
- This is particularly true for non-x86 architectures.
- To use non-x86 <filename>defconfig</filename> files, you
- need to be more specific and find one that matches your
+ This is particularly true for non-x86 architectures.</para>
+
+ <para>To use non-x86 <filename>defconfig</filename> files,
+ you need to be more specific and find one that matches your
board (i.e. for arm, you look in
<filename>arch/arm/configs</filename> and use the one that
is the best starting point for your board).
</para></listitem>
- <listitem><para>Edit the following variables in your recipe
- as appropriate for your project:
+ <listitem><para>
+ <emphasis>Edit the Recipe:</emphasis>
+ Edit the following variables in your recipe as appropriate
+ for your project:
<itemizedlist>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>:
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>:
The <filename>SRC_URI</filename> should specify
a Git repository that uses one of the supported Git
fetcher protocols (i.e. <filename>file</filename>,
@@ -845,24 +2217,32 @@
The skeleton recipe provides an example
<filename>SRC_URI</filename> as a syntax reference.
</para></listitem>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>:
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>:
The Linux kernel version you are using (e.g.
- "3.19").</para></listitem>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION'><filename>LINUX_VERSION_EXTENSION</filename></ulink>:
- The Linux kernel <filename>CONFIG_LOCALVERSION</filename>
- that is compiled into the resulting kernel and visible
+ "4.12").
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION'><filename>LINUX_VERSION_EXTENSION</filename></ulink>:
+ The Linux kernel
+ <filename>CONFIG_LOCALVERSION</filename> that is
+ compiled into the resulting kernel and visible
through the <filename>uname</filename> command.
</para></listitem>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
The commit ID from which you want to build.
</para></listitem>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
- Treat this variable the same as you would in any other
- recipe.
- Increment the variable to indicate to the OpenEmbedded
- build system that the recipe has changed.
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
+ Treat this variable the same as you would in any
+ other recipe.
+ Increment the variable to indicate to the
+ OpenEmbedded build system that the recipe has
+ changed.
</para></listitem>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
The default <filename>PV</filename> assignment is
typically adequate.
It combines the <filename>LINUX_VERSION</filename>
@@ -870,16 +2250,17 @@
as derived from the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink>
variable.
- The combined results are a string with
- the following form:
+ The combined results are a string with the
+ following form:
<literallayout class='monospaced'>
3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2
</literallayout>
- While lengthy, the extra verbosity in <filename>PV</filename>
- helps ensure you are using the exact
- sources from which you intend to build.
+ While lengthy, the extra verbosity in
+ <filename>PV</filename> helps ensure you are using
+ the exact sources from which you intend to build.
</para></listitem>
- <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
A list of the machines supported by your new recipe.
This variable in the example recipe is set
by default to a regular expression that matches
@@ -888,18 +2269,24 @@
failure.
You must change it to match a list of the machines
that your new recipe supports.
- For example, to support the <filename>qemux86</filename>
- and <filename>qemux86-64</filename> machines, use
+ For example, to support the
+ <filename>qemux86</filename> and
+ <filename>qemux86-64</filename> machines, use
the following form:
<literallayout class='monospaced'>
COMPATIBLE_MACHINE = "qemux86|qemux86-64"
- </literallayout></para></listitem>
- </itemizedlist></para></listitem>
- <listitem><para>Provide further customizations to your recipe
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Customize Your Recipe as Needed:</emphasis>
+ Provide further customizations to your recipe
as needed just as you would customize an existing
linux-yocto recipe.
- See the "<link linkend='modifying-an-existing-recipe'>Modifying
- an Existing Recipe</link>" section for information.
+ See the
+ "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>"
+ section for information.
</para></listitem>
</orderedlist>
</para>
@@ -1230,7 +2617,8 @@
The OpenEmbedded build system searches all forms of kernel
Metadata on the <filename>SRC_URI</filename> statement regardless
of whether the Metadata is in the "kernel-cache", system kernel
- Metadata, or a recipe-space Metadata.
+ Metadata, or a recipe-space Metadata (i.e. part of the kernel
+ recipe).
See the
"<link linkend='kernel-metadata-location'>Kernel Metadata Location</link>"
section for additional information.
@@ -1253,6 +2641,7 @@
to the build.
<orderedlist>
<listitem><para>
+ <emphasis>Create the Feature File:</emphasis>
Create a <filename>.scc</filename> file and locate it
just as you would any other patch file,
<filename>.cfg</filename> file, or fetcher item
@@ -1295,6 +2684,7 @@
<filename>test.cfg</filename>.
</para></listitem>
<listitem><para>
+ <emphasis>Add the Feature File to <filename>SRC_URI</filename>:</emphasis>
Add the <filename>.scc</filename> file to the
recipe's <filename>SRC_URI</filename> statement:
<literallayout class='monospaced'>
@@ -1304,7 +2694,9 @@
path is appended to the existing path.
</para></listitem>
<listitem><para>
- Specify the feature as a kernel feature:
+ <emphasis>Specify the Feature as a Kernel Feature:</emphasis>
+ Use the <filename>KERNEL_FEATURES</filename> statement
+ to specify the feature as a kernel feature:
<literallayout class='monospaced'>
KERNEL_FEATURES_append = " test.scc"
</literallayout>
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml
index ac91749cd6..fbecc13875 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-concepts-appx.xml
@@ -7,245 +7,613 @@
<section id='kernel-big-picture'>
<title>Yocto Project Kernel Development and Maintenance</title>
+
<para>
- Kernels available through the Yocto Project, like other kernels, are based off the Linux
- kernel releases from <ulink url='http://www.kernel.org'></ulink>.
- At the beginning of a major development cycle, the Yocto Project team
- chooses its kernel based on factors such as release timing, the anticipated release
- timing of final upstream <filename>kernel.org</filename> versions, and Yocto Project
+ Kernels available through the Yocto Project (Yocto Linux kernels),
+ like other kernels, are based off the Linux kernel releases from
+ <ulink url='http://www.kernel.org'></ulink>.
+ At the beginning of a major Linux kernel development cycle, the
+ Yocto Project team chooses a Linux kernel based on factors such as
+ release timing, the anticipated release timing of final upstream
+ <filename>kernel.org</filename> versions, and Yocto Project
feature requirements.
- Typically, the kernel chosen is in the
- final stages of development by the community.
- In other words, the kernel is in the release
- candidate or "rc" phase and not yet a final release.
- But, by being in the final stages of external development, the team knows that the
- <filename>kernel.org</filename> final release will clearly be within the early stages of
- the Yocto Project development window.
- </para>
- <para>
- This balance allows the team to deliver the most up-to-date kernel
- possible, while still ensuring that the team has a stable official release for
- the baseline Linux kernel version.
- </para>
- <para>
- The ultimate source for kernels available through the Yocto Project are released kernels
- from <filename>kernel.org</filename>.
- In addition to a foundational kernel from <filename>kernel.org</filename>, the
- kernels available contain a mix of important new mainline
- developments, non-mainline developments (when there is no alternative),
- Board Support Package (BSP) developments,
- and custom features.
- These additions result in a commercially released Yocto Project Linux kernel that caters
- to specific embedded designer needs for targeted hardware.
- </para>
- <para>
- Once a kernel is officially released, the Yocto Project team goes into
- their next development cycle, or upward revision (uprev) cycle, while still
- continuing maintenance on the released kernel.
+ Typically, the Linux kernel chosen is in the final stages of
+ development by the Linux community.
+ In other words, the Linux kernel is in the release candidate
+ or "rc" phase and has yet to reach final release.
+ But, by being in the final stages of external development, the
+ team knows that the <filename>kernel.org</filename> final release
+ will clearly be within the early stages of the Yocto Project
+ development window.
+ </para>
+
+ <para>
+ This balance allows the Yocto Project team to deliver the most
+ up-to-date Yocto Linux kernel possible, while still ensuring that
+ the team has a stable official release for the baseline Linux
+ kernel version.
+ </para>
+
+ <para>
+ As implied earlier, the ultimate source for Yocto Linux kernels
+ are released kernels from <filename>kernel.org</filename>.
+ In addition to a foundational kernel from
+ <filename>kernel.org</filename>, the available Yocto Linux kernels
+ contain a mix of important new mainline developments, non-mainline
+ developments (when no alternative exists), Board Support Package
+ (BSP) developments, and custom features.
+ These additions result in a commercially released Yocto
+ Project Linux kernel that caters to specific embedded designer
+ needs for targeted hardware.
+ </para>
+
+ <para>
+ You can find a web interface to the Yocto Linux kernels in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ at
+ <ulink url='&YOCTO_GIT_URL;'></ulink>.
+ If you look at the interface, you will see to the left a
+ grouping of Git repositories titled "Yocto Linux Kernel".
+ Within this group, you will find several Linux Yocto kernels
+ developed and included with Yocto Project releases:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.1</filename>:</emphasis>
+ The stable Yocto Project kernel to use with the Yocto
+ Project Release 2.0.
+ This kernel is based on the Linux 4.1 released kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.4</filename>:</emphasis>
+ The stable Yocto Project kernel to use with the Yocto
+ Project Release 2.1.
+ This kernel is based on the Linux 4.4 released kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.6</filename>:</emphasis>
+ A temporary kernel that is not tied to any Yocto Project
+ release.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.8</filename>:</emphasis>
+ The stable yocto Project kernel to use with the Yocto
+ Project Release 2.2.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.9</filename>:</emphasis>
+ The stable Yocto Project kernel to use with the Yocto
+ Project Release 2.3.
+ This kernel is based on the Linux 4.9 released kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.10</filename>:</emphasis>
+ The default stable Yocto Project kernel to use with the
+ Yocto Project Release 2.3.
+ This kernel is based on the Linux 4.10 released kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-4.12</filename>:</emphasis>
+ The default stable Yocto Project kernel to use with the
+ Yocto Project Release 2.4.
+ This kernel is based on the Linux 4.12 released kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>yocto-kernel-cache</filename>:</emphasis>
+ The <filename>linux-yocto-cache</filename> contains
+ patches and configurations for the linux-yocto kernel
+ tree.
+ This repository is useful when working on the linux-yocto
+ kernel.
+ For more information on this "Advanced Kernel Metadata",
+ see the
+ "<link linkend='kernel-dev-advanced'>Working With Advanced Metadata (<filename>yocto-kernel-cache</filename>)</link>"
+ Chapter.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto-dev</filename>:</emphasis>
+ A development kernel based on the latest upstream release
+ candidate available.
+ </para></listitem>
+ </itemizedlist>
+ <note><title>Notes</title>
+ Long Term Support Initiative (LTSI) for Yocto Linux
+ kernels is as follows:
+ <itemizedlist>
+ <listitem><para>
+ For Yocto Project releases 1.7, 1.8, and 2.0,
+ the LTSI kernel is
+ <filename>linux-yocto-3.14</filename>.
+ </para></listitem>
+ <listitem><para>
+ For Yocto Project releases 2.1, 2.2, and 2.3,
+ the LTSI kernel is <filename>linux-yocto-4.1</filename>.
+ </para></listitem>
+ <listitem><para>
+ For Yocto Project release 2.4, the LTSI kernel is
+ <filename>linux-yocto-4.9</filename>
+ </para></listitem>
+ <listitem><para>
+ <filename>linux-yocto-4.4</filename> is an LTS
+ kernel.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
+
+ <para>
+ Once a Yocto Linux kernel is officially released, the Yocto
+ Project team goes into their next development cycle, or upward
+ revision (uprev) cycle, while still continuing maintenance on the
+ released kernel.
It is important to note that the most sustainable and stable way
- to include feature development upstream is through a kernel uprev process.
- Back-porting hundreds of individual fixes and minor features from various
- kernel versions is not sustainable and can easily compromise quality.
- </para>
- <para>
- During the uprev cycle, the Yocto Project team uses an ongoing analysis of
- kernel development, BSP support, and release timing to select the best
- possible <filename>kernel.org</filename> version.
- The team continually monitors community kernel
- development to look for significant features of interest.
- The team does consider back-porting large features if they have a significant advantage.
- User or community demand can also trigger a back-port or creation of new
- functionality in the Yocto Project baseline kernel during the uprev cycle.
- </para>
- <para>
- Generally speaking, every new kernel both adds features and introduces new bugs.
- These consequences are the basic properties of upstream kernel development and are
- managed by the Yocto Project team's kernel strategy.
- It is the Yocto Project team's policy to not back-port minor features to the released kernel.
- They only consider back-porting significant technological jumps - and, that is done
- after a complete gap analysis.
- The reason for this policy is that back-porting any small to medium sized change
- from an evolving kernel can easily create mismatches, incompatibilities and very
- subtle errors.
- </para>
- <para>
- These policies result in both a stable and a cutting
- edge kernel that mixes forward ports of existing features and significant and critical
- new functionality.
- Forward porting functionality in the kernels available through the Yocto Project kernel
- can be thought of as a "micro uprev."
- The many “micro uprevs” produce a kernel version with a mix of
- important new mainline, non-mainline, BSP developments and feature integrations.
- This kernel gives insight into new features and allows focused
- amounts of testing to be done on the kernel, which prevents
- surprises when selecting the next major uprev.
- The quality of these cutting edge kernels is evolving and the kernels are used in leading edge
- feature and BSP development.
+ to include feature development upstream is through a kernel uprev
+ process.
+ Back-porting hundreds of individual fixes and minor features from
+ various kernel versions is not sustainable and can easily
+ compromise quality.
+ </para>
+
+ <para>
+ During the uprev cycle, the Yocto Project team uses an ongoing
+ analysis of Linux kernel development, BSP support, and release
+ timing to select the best possible <filename>kernel.org</filename>
+ Linux kernel version on which to base subsequent Yocto Linux
+ kernel development.
+ The team continually monitors Linux community kernel development
+ to look for significant features of interest.
+ The team does consider back-porting large features if they have a
+ significant advantage.
+ User or community demand can also trigger a back-port or creation
+ of new functionality in the Yocto Project baseline kernel during
+ the uprev cycle.
+ </para>
+
+ <para>
+ Generally speaking, every new Linux kernel both adds features and
+ introduces new bugs.
+ These consequences are the basic properties of upstream
+ Linux kernel development and are managed by the Yocto Project
+ team's Yocto Linux kernel development strategy.
+ It is the Yocto Project team's policy to not back-port minor
+ features to the released Yocto Linux kernel.
+ They only consider back-porting significant technological
+ jumps &dash; and, that is done after a complete gap analysis.
+ The reason for this policy is that back-porting any small to
+ medium sized change from an evolving Linux kernel can easily
+ create mismatches, incompatibilities and very subtle errors.
+ </para>
+
+ <para>
+ The policies described in this section result in both a stable
+ and a cutting edge Yocto Linux kernel that mixes forward ports of
+ existing Linux kernel features and significant and critical new
+ functionality.
+ Forward porting Linux kernel functionality into the Yocto Linux
+ kernels available through the Yocto Project can be thought of as
+ a "micro uprev."
+ The many “micro uprevs” produce a Yocto Linux kernel version with
+ a mix of important new mainline, non-mainline, BSP developments
+ and feature integrations.
+ This Yocto Linux kernel gives insight into new features and
+ allows focused amounts of testing to be done on the kernel,
+ which prevents surprises when selecting the next major uprev.
+ The quality of these cutting edge Yocto Linux kernels is evolving
+ and the kernels are used in leading edge feature and BSP
+ development.
</para>
</section>
- <section id='kernel-architecture'>
- <title>Kernel Architecture</title>
- <para>
- This section describes the architecture of the kernels available through the
- Yocto Project and provides information
- on the mechanisms used to achieve that architecture.
- </para>
-
- <section id='architecture-overview'>
- <title>Overview</title>
- <para>
- As mentioned earlier, a key goal of the Yocto Project is to present the
- developer with
- a kernel that has a clear and continuous history that is visible to the user.
- The architecture and mechanisms used achieve that goal in a manner similar to the
- upstream <filename>kernel.org</filename>.
- </para>
- <para>
- You can think of a Yocto Project kernel as consisting of a baseline Linux kernel with
- added features logically structured on top of the baseline.
- The features are tagged and organized by way of a branching strategy implemented by the
- source code manager (SCM) Git.
- For information on Git as applied to the Yocto Project, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>" section in the
- Yocto Project Development Manual.
- </para>
- <para>
- The result is that the user has the ability to see the added features and
- the commits that make up those features.
- In addition to being able to see added features, the user can also view the history of what
- made up the baseline kernel.
- </para>
- <para>
- The following illustration shows the conceptual Yocto Project kernel.
- </para>
- <para>
- <imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
- </para>
- <para>
- In the illustration, the "Kernel.org Branch Point"
- marks the specific spot (or release) from
- which the Yocto Project kernel is created.
- From this point "up" in the tree, features and differences are organized and tagged.
- </para>
- <para>
- The "Yocto Project Baseline Kernel" contains functionality that is common to every kernel
- type and BSP that is organized further up the tree.
- Placing these common features in the
- tree this way means features do not have to be duplicated along individual branches of the
- structure.
- </para>
- <para>
- From the Yocto Project Baseline Kernel, branch points represent specific functionality
- for individual BSPs as well as real-time kernels.
- The illustration represents this through three BSP-specific branches and a real-time
- kernel branch.
- Each branch represents some unique functionality for the BSP or a real-time kernel.
- </para>
- <para>
- In this example structure, the real-time kernel branch has common features for all
- real-time kernels and contains
- more branches for individual BSP-specific real-time kernels.
- The illustration shows three branches as an example.
- Each branch points the way to specific, unique features for a respective real-time
- kernel as they apply to a given BSP.
- </para>
- <para>
- The resulting tree structure presents a clear path of markers (or branches) to the
- developer that, for all practical purposes, is the kernel needed for any given set
- of requirements.
- </para>
- </section>
-
- <section id='branching-and-workflow'>
- <title>Branching Strategy and Workflow</title>
- <para>
- The Yocto Project team creates kernel branches at points where functionality is
- no longer shared and thus, needs to be isolated.
- For example, board-specific incompatibilities would require different functionality
- and would require a branch to separate the features.
- Likewise, for specific kernel features, the same branching strategy is used.
- </para>
- <para>
- This branching strategy results in a tree that has features organized to be specific
- for particular functionality, single kernel types, or a subset of kernel types.
- This strategy also results in not having to store the same feature twice
- internally in the tree.
- Rather, the kernel team stores the unique differences required to apply the
- feature onto the kernel type in question.
- <note>
- The Yocto Project team strives to place features in the tree such that they can be
- shared by all boards and kernel types where possible.
- However, during development cycles or when large features are merged,
- the team cannot always follow this practice.
- In those cases, the team uses isolated branches to merge features.
- </note>
- </para>
- <para>
- BSP-specific code additions are handled in a similar manner to kernel-specific additions.
- Some BSPs only make sense given certain kernel types.
- So, for these types, the team creates branches off the end of that kernel type for all
- of the BSPs that are supported on that kernel type.
- From the perspective of the tools that create the BSP branch, the BSP is really no
- different than a feature.
- Consequently, the same branching strategy applies to BSPs as it does to features.
- So again, rather than store the BSP twice, the team only stores the unique
- differences for the BSP across the supported multiple kernels.
- </para>
- <para>
- While this strategy can result in a tree with a significant number of branches, it is
- important to realize that from the developer's point of view, there is a linear
- path that travels from the baseline <filename>kernel.org</filename>, through a select
- group of features and ends with their BSP-specific commits.
- In other words, the divisions of the kernel are transparent and are not relevant
- to the developer on a day-to-day basis.
- From the developer's perspective, this path is the "master" branch.
- The developer does not need to be aware of the existence of any other branches at all.
- Of course, there is value in the existence of these branches
- in the tree, should a person decide to explore them.
- For example, a comparison between two BSPs at either the commit level or at the line-by-line
- code <filename>diff</filename> level is now a trivial operation.
- </para>
- <para>
- Working with the kernel as a structured tree follows recognized community best practices.
- In particular, the kernel as shipped with the product, should be
- considered an "upstream source" and viewed as a series of
- historical and documented modifications (commits).
- These modifications represent the development and stabilization done
- by the Yocto Project kernel development team.
- </para>
- <para>
- Because commits only change at significant release points in the product life cycle,
- developers can work on a branch created
- from the last relevant commit in the shipped Yocto Project kernel.
- As mentioned previously, the structure is transparent to the developer
- because the kernel tree is left in this state after cloning and building the kernel.
- </para>
- </section>
-
- <section id='source-code-manager-git'>
- <title>Source Code Manager - Git</title>
- <para>
- The Source Code Manager (SCM) is Git.
- This SCM is the obvious mechanism for meeting the previously mentioned goals.
- Not only is it the SCM for <filename>kernel.org</filename> but,
- Git continues to grow in popularity and supports many different work flows,
- front-ends and management techniques.
- </para>
- <para>
- You can find documentation on Git at <ulink url='http://git-scm.com/documentation'></ulink>.
- You can also get an introduction to Git as it applies to the Yocto Project in the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>"
- section in the Yocto Project Development Manual.
- These referenced sections overview Git and describe a minimal set of
- commands that allows you to be functional using Git.
- <note>
- You can use as much, or as little, of what Git has to offer to accomplish what
- you need for your project.
- You do not have to be a "Git Master" in order to use it with the Yocto Project.
- </note>
- </para>
- </section>
+ <section id='yocto-linux-kernel-architecture-and-branching-strategies'>
+ <title>Yocto Linux Kernel Architecture and Branching Strategies</title>
+
+ <para>
+ As mentioned earlier, a key goal of the Yocto Project is
+ to present the developer with a kernel that has a clear and
+ continuous history that is visible to the user.
+ The architecture and mechanisms, in particular the branching
+ strategies, used achieve that goal in a manner similar to
+ upstream Linux kernel development in
+ <filename>kernel.org</filename>.
+ </para>
+
+ <para>
+ You can think of a Yocto Linux kernel as consisting of a
+ baseline Linux kernel with added features logically structured
+ on top of the baseline.
+ The features are tagged and organized by way of a branching
+ strategy implemented by the Yocto Project team using the
+ Source Code Manager (SCM) Git.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ Git is the obvious SCM for meeting the Yocto Linux
+ kernel organizational and structural goals described
+ in this section.
+ Not only is Git the SCM for Linux kernel development in
+ <filename>kernel.org</filename> but, Git continues to
+ grow in popularity and supports many different work
+ flows, front-ends and management techniques.
+ </para></listitem>
+ <listitem><para>
+ You can find documentation on Git at
+ <ulink url='http://git-scm.com/documentation'></ulink>.
+ You can also get an introduction to Git as it
+ applies to the Yocto Project in the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>"
+ section in the Yocto Project Reference Manual.
+ The latter reference provides an overview of
+ Git and presents a minimal set of Git commands
+ that allows you to be functional using Git.
+ You can use as much, or as little, of what Git
+ has to offer to accomplish what you need for your
+ project.
+ You do not have to be a "Git Expert" in order to
+ use it with the Yocto Project.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
+
+ <para>
+ Using Git's tagging and branching features, the Yocto Project
+ team creates kernel branches at points where functionality is
+ no longer shared and thus, needs to be isolated.
+ For example, board-specific incompatibilities would require
+ different functionality and would require a branch to
+ separate the features.
+ Likewise, for specific kernel features, the same branching
+ strategy is used.
+ </para>
+
+ <para>
+ This "tree-like" architecture results in a structure that has
+ features organized to be specific for particular functionality,
+ single kernel types, or a subset of kernel types.
+ Thus, the user has the ability to see the added features and the
+ commits that make up those features.
+ In addition to being able to see added features, the user
+ can also view the history of what made up the baseline
+ Linux kernel.
+ </para>
+
+ <para>
+ Another consequence of this strategy results in not having to
+ store the same feature twice internally in the tree.
+ Rather, the kernel team stores the unique differences required
+ to apply the feature onto the kernel type in question.
+ <note>
+ The Yocto Project team strives to place features in the tree
+ such that features can be shared by all boards and kernel
+ types where possible.
+ However, during development cycles or when large features
+ are merged, the team cannot always follow this practice.
+ In those cases, the team uses isolated branches to merge
+ features.
+ </note>
+ </para>
+
+ <para>
+ BSP-specific code additions are handled in a similar manner to
+ kernel-specific additions.
+ Some BSPs only make sense given certain kernel types.
+ So, for these types, the team creates branches off the end
+ of that kernel type for all of the BSPs that are supported on
+ that kernel type.
+ From the perspective of the tools that create the BSP branch,
+ the BSP is really no different than a feature.
+ Consequently, the same branching strategy applies to BSPs as
+ it does to kernel features.
+ So again, rather than store the BSP twice, the team only
+ stores the unique differences for the BSP across the supported
+ multiple kernels.
+ </para>
+
+ <para>
+ While this strategy can result in a tree with a significant number
+ of branches, it is important to realize that from the developer's
+ point of view, there is a linear path that travels from the
+ baseline <filename>kernel.org</filename>, through a select
+ group of features and ends with their BSP-specific commits.
+ In other words, the divisions of the kernel are transparent and
+ are not relevant to the developer on a day-to-day basis.
+ From the developer's perspective, this path is the "master" branch
+ in Git terms.
+ The developer does not need to be aware of the existence of any
+ other branches at all.
+ Of course, value exists in the having these branches in the tree,
+ should a person decide to explore them.
+ For example, a comparison between two BSPs at either the commit
+ level or at the line-by-line code <filename>diff</filename> level
+ is now a trivial operation.
+ </para>
+
+ <para>
+ The following illustration shows the conceptual Yocto
+ Linux kernel.
+ <imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
+ </para>
+
+ <para>
+ In the illustration, the "Kernel.org Branch Point" marks the
+ specific spot (or Linux kernel release) from which the
+ Yocto Linux kernel is created.
+ From this point forward in the tree, features and differences
+ are organized and tagged.
+ </para>
+
+ <para>
+ The "Yocto Project Baseline Kernel" contains functionality that
+ is common to every kernel type and BSP that is organized
+ further along in the tree.
+ Placing these common features in the tree this way means
+ features do not have to be duplicated along individual
+ branches of the tree structure.
+ </para>
+
+ <para>
+ From the "Yocto Project Baseline Kernel", branch points represent
+ specific functionality for individual Board Support Packages
+ (BSPs) as well as real-time kernels.
+ The illustration represents this through three BSP-specific
+ branches and a real-time kernel branch.
+ Each branch represents some unique functionality for the BSP
+ or for a real-time Yocto Linux kernel.
+ </para>
+
+ <para>
+ In this example structure, the "Real-time (rt) Kernel" branch has
+ common features for all real-time Yocto Linux kernels and
+ contains more branches for individual BSP-specific real-time
+ kernels.
+ The illustration shows three branches as an example.
+ Each branch points the way to specific, unique features for a
+ respective real-time kernel as they apply to a given BSP.
+ </para>
+
+ <para>
+ The resulting tree structure presents a clear path of markers
+ (or branches) to the developer that, for all practical
+ purposes, is the Yocto Linux kernel needed for any given set of
+ requirements.
+ <note>
+ Keep in mind the figure does not take into account all the
+ supported Yocto Linux kernels, but rather shows a single
+ generic kernel just for conceptual purposes.
+ Also keep in mind that this structure represents the Yocto
+ Project
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
+ that are either pulled from during the build or established
+ on the host development system prior to the build by either
+ cloning a particular kernel's Git repository or by
+ downloading and unpacking a tarball.
+ </note>
+ </para>
+
+ <para>
+ Working with the kernel as a structured tree follows recognized
+ community best practices.
+ In particular, the kernel as shipped with the product, should be
+ considered an "upstream source" and viewed as a series of
+ historical and documented modifications (commits).
+ These modifications represent the development and stabilization
+ done by the Yocto Project kernel development team.
+ </para>
+
+ <para>
+ Because commits only change at significant release points in the
+ product life cycle, developers can work on a branch created
+ from the last relevant commit in the shipped Yocto Project Linux
+ kernel.
+ As mentioned previously, the structure is transparent to the
+ developer because the kernel tree is left in this state after
+ cloning and building the kernel.
+ </para>
+ </section>
+
+ <section id='kernel-build-file-hierarchy'>
+ <title>Kernel Build File Hierarchy</title>
+
+ <para>
+ Upstream storage of all the available kernel source code is
+ one thing, while representing and using the code on your host
+ development system is another.
+ Conceptually, you can think of the kernel source repositories
+ as all the source files necessary for all the supported
+ Yocto Linux kernels.
+ As a developer, you are just interested in the source files
+ for the kernel on which you are working.
+ And, furthermore, you need them available on your host system.
+ </para>
+
+ <para>
+ Kernel source code is available on your host system several
+ different ways:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Files Accessed While using <filename>devtool</filename>:</emphasis>
+ <filename>devtool</filename>, which is available with the
+ Yocto Project, is the preferred method by which to
+ modify the kernel.
+ See the
+ "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Cloned Repository:</emphasis>
+ If you are working in the kernel all the time, you probably
+ would want to set up your own local Git repository of the
+ Yocto Linux kernel tree.
+ For information on how to clone a Yocto Linux kernel
+ Git repository, see the
+ "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Temporary Source Files from a Build:</emphasis>
+ If you just need to make some patches to the kernel using
+ a traditional BitBake workflow (i.e. not using the
+ <filename>devtool</filename>), you can access temporary
+ kernel source files that were extracted and used during
+ a kernel build.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ The temporary kernel source files resulting from a build using
+ BitBake have a particular hierarchy.
+ When you build the kernel on your development system, all files
+ needed for the build are taken from the source repositories
+ pointed to by the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ variable and gathered in a temporary work area where they are
+ subsequently used to create the unique kernel.
+ Thus, in a sense, the process constructs a local source tree
+ specific to your kernel from which to generate the new kernel
+ image.
+ </para>
+
+ <para>
+ The following figure shows the temporary file structure
+ created on your host system when you build the kernel using
+ Bitbake.
+ This
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ contains all the source files used during the build.
+ <imagedata fileref="figures/kernel-overview-2-generic.png"
+ width="6in" depth="5in" align="center" scale="100" />
+ </para>
+
+ <para>
+ Again, for additional information on the Yocto Project kernel's
+ architecture and its branching strategy, see the
+ "<link linkend='yocto-linux-kernel-architecture-and-branching-strategies'>Yocto Linux Kernel Architecture and Branching Strategies</link>"
+ section.
+ You can also reference the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ and
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ sections for detailed example that modifies the kernel.
+ </para>
+ </section>
+
+ <section id='determining-hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase'>
+ <title>Determining Hardware and Non-Hardware Features for the Kernel Configuration Audit Phase</title>
+
+ <para>
+ This section describes part of the kernel configuration audit
+ phase that most developers can ignore.
+ For general information on kernel configuration including
+ <filename>menuconfig</filename>, <filename>defconfig</filename>
+ files, and configuration fragments, see the
+ "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>"
+ section.
+ </para>
+
+ <para>
+ During this part of the audit phase, the contents of the final
+ <filename>.config</filename> file are compared against the
+ fragments specified by the system.
+ These fragments can be system fragments, distro fragments,
+ or user-specified configuration elements.
+ Regardless of their origin, the OpenEmbedded build system
+ warns the user if a specific option is not included in the
+ final kernel configuration.
+ </para>
+
+ <para>
+ By default, in order to not overwhelm the user with
+ configuration warnings, the system only reports missing
+ "hardware" options as they could result in a boot
+ failure or indicate that important hardware is not available.
+ </para>
+
+ <para>
+ To determine whether or not a given option is "hardware" or
+ "non-hardware", the kernel Metadata in
+ <filename>yocto-kernel-cache</filename> contains files that
+ classify individual or groups of options as either hardware
+ or non-hardware.
+ To better show this, consider a situation where the
+ <filename>yocto-kernel-cache</filename> contains the following
+ files:
+ <literallayout class='monospaced'>
+ yocto-kernel-cache/features/drm-psb/hardware.cfg
+ yocto-kernel-cache/features/kgdb/hardware.cfg
+ yocto-kernel-cache/ktypes/base/hardware.cfg
+ yocto-kernel-cache/bsp/mti-malta32/hardware.cfg
+ yocto-kernel-cache/bsp/fsl-mpc8315e-rdb/hardware.cfg
+ yocto-kernel-cache/bsp/qemu-ppc32/hardware.cfg
+ yocto-kernel-cache/bsp/qemuarma9/hardware.cfg
+ yocto-kernel-cache/bsp/mti-malta64/hardware.cfg
+ yocto-kernel-cache/bsp/arm-versatile-926ejs/hardware.cfg
+ yocto-kernel-cache/bsp/common-pc/hardware.cfg
+ yocto-kernel-cache/bsp/common-pc-64/hardware.cfg
+ yocto-kernel-cache/features/rfkill/non-hardware.cfg
+ yocto-kernel-cache/ktypes/base/non-hardware.cfg
+ yocto-kernel-cache/features/aufs/non-hardware.kcf
+ yocto-kernel-cache/features/ocf/non-hardware.kcf
+ yocto-kernel-cache/ktypes/base/non-hardware.kcf
+ yocto-kernel-cache/ktypes/base/hardware.kcf
+ yocto-kernel-cache/bsp/qemu-ppc32/hardware.kcf
+ </literallayout>
+ The following list provides explanations for the various
+ files:
+ <itemizedlist>
+ <listitem><para>
+ <filename>hardware.kcf</filename>:
+ Specifies a list of kernel Kconfig files that contain
+ hardware options only.
+ </para></listitem>
+ <listitem><para>
+ <filename>non-hardware.kcf</filename>:
+ Specifies a list of kernel Kconfig files that contain
+ non-hardware options only.
+ </para></listitem>
+ <listitem><para>
+ <filename>hardware.cfg</filename>:
+ Specifies a list of kernel <filename>CONFIG_</filename>
+ options that are hardware, regardless of whether or not
+ they are within a Kconfig file specified by a hardware
+ or non-hardware Kconfig file (i.e.
+ <filename>hardware.kcf</filename> or
+ <filename>non-hardware.kcf</filename>).
+ </para></listitem>
+ <listitem><para>
+ <filename>non-hardware.cfg</filename>:
+ Specifies a list of kernel <filename>CONFIG_</filename>
+ options that are not hardware, regardless of whether or
+ not they are within a Kconfig file specified by a
+ hardware or non-hardware Kconfig file (i.e.
+ <filename>hardware.kcf</filename> or
+ <filename>non-hardware.kcf</filename>).
+ </para></listitem>
+ </itemizedlist>
+ Here is a specific example using the
+ <filename>kernel-cache/bsp/mti-malta32/hardware.cfg</filename>:
+ <literallayout class='monospaced'>
+ CONFIG_SERIAL_8250
+ CONFIG_SERIAL_8250_CONSOLE
+ CONFIG_SERIAL_8250_NR_UARTS
+ CONFIG_SERIAL_8250_PCI
+ CONFIG_SERIAL_CORE
+ CONFIG_SERIAL_CORE_CONSOLE
+ CONFIG_VGA_ARB
+ </literallayout>
+ The kernel configuration audit automatically detects these
+ files (hence the names must be exactly the ones discussed here),
+ and uses them as inputs when generating warnings about the
+ final <filename>.config</filename> file.
+ </para>
+
+ <para>
+ A user-specified kernel Metadata repository, or recipe space
+ feature, can use these same files to classify options that are
+ found within its <filename>.cfg</filename> files as hardware
+ or non-hardware, to prevent the OpenEmbedded build system from
+ producing an error or warning when an option is not in the
+ final <filename>.config</filename> file.
+ </para>
</section>
</appendix>
<!--
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-examples.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-examples.xml
deleted file mode 100644
index 9d9aef6d06..0000000000
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-examples.xml
+++ /dev/null
@@ -1,918 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-
-<chapter id='kernel-how-to'>
-
-<title>Working with the Yocto Project Kernel</title>
-
-
-<section id='actions-org'>
- <title>Introduction</title>
- <para>
- This chapter describes how to accomplish tasks involving a kernel's tree structure.
- The information is designed to help the developer that wants to modify the Yocto
- Project kernel and contribute changes upstream to the Yocto Project.
- The information covers the following:
- <itemizedlist>
- <listitem><para>Tree construction</para></listitem>
- <listitem><para>Build strategies</para></listitem>
- <listitem><para>Workflow examples</para></listitem>
- </itemizedlist>
- </para>
-</section>
-
- <section id='tree-construction'>
- <title>Tree Construction</title>
- <para>
- This section describes construction of the Yocto Project kernel source repositories
- as accomplished by the Yocto Project team to create kernel repositories.
- These kernel repositories are found under the heading "Yocto Linux Kernel" at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink>
- and can be shipped as part of a Yocto Project release.
- The team creates these repositories by
- compiling and executing the set of feature descriptions for every BSP/feature
- in the product.
- Those feature descriptions list all necessary patches,
- configuration, branching, tagging and feature divisions found in a kernel.
- Thus, the Yocto Project kernel repository (or tree) is built.
- </para>
- <para>
- The existence of this tree allows you to access and clone a particular
- Yocto Project kernel repository and use it to build images based on their configurations
- and features.
- </para>
- <para>
- You can find the files used to describe all the valid features and BSPs
- in the Yocto Project kernel in any clone of the Yocto Project kernel source repository
- Git tree.
- For example, the following command clones the Yocto Project baseline kernel that
- branched off of <filename>linux.org</filename> version 3.4:
- <literallayout class='monospaced'>
- $ git clone git://git.yoctoproject.org/linux-yocto-3.4
- </literallayout>
- For another example of how to set up a local Git repository of the Yocto Project
- kernel files, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Yocto Project Kernel</ulink>" bulleted
- item in the Yocto Project Development Manual.
- </para>
- <para>
- Once you have cloned the kernel Git repository on your local machine, you can
- switch to the <filename>meta</filename> branch within the repository.
- Here is an example that assumes the local Git repository for the kernel is in
- a top-level directory named <filename>linux-yocto-3.4</filename>:
- <literallayout class='monospaced'>
- $ cd ~/linux-yocto-3.4
- $ git checkout -b meta origin/meta
- </literallayout>
- Once you have checked out and switched to the <filename>meta</filename> branch,
- you can see a snapshot of all the kernel configuration and feature descriptions that are
- used to build that particular kernel repository.
- These descriptions are in the form of <filename>.scc</filename> files.
- </para>
- <para>
- You should realize, however, that browsing your local kernel repository
- for feature descriptions and patches is not an effective way to determine what is in a
- particular kernel branch.
- Instead, you should use Git directly to discover the changes in a branch.
- Using Git is an efficient and flexible way to inspect changes to the kernel.
- For examples showing how to use Git to inspect kernel commits, see the following sections
- in this chapter.
- <note>
- Ground up reconstruction of the complete kernel tree is an action only taken by the
- Yocto Project team during an active development cycle.
- When you create a clone of the kernel Git repository, you are simply making it
- efficiently available for building and development.
- </note>
- </para>
- <para>
- The following steps describe what happens when the Yocto Project Team constructs
- the Yocto Project kernel source Git repository (or tree) found at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the
- introduction of a new top-level kernel feature or BSP.
- These are the actions that effectively create the tree
- that includes the new feature, patch or BSP:
- <orderedlist>
- <listitem><para>A top-level kernel feature is passed to the kernel build subsystem.
- Normally, this feature is a BSP for a particular kernel type.</para></listitem>
- <listitem><para>The file that describes the top-level feature is located by searching
- these system directories:
- <itemizedlist>
- <listitem><para>The in-tree kernel-cache directories, which are located
- in <filename>meta/cfg/kernel-cache</filename></para></listitem>
- <listitem><para>Areas pointed to by <filename>SRC_URI</filename> statements
- found in recipes</para></listitem>
- </itemizedlist>
- For a typical build, the target of the search is a
- feature description in an <filename>.scc</filename> file
- whose name follows this format:
- <literallayout class='monospaced'>
- &lt;bsp_name&gt;-&lt;kernel_type&gt;.scc
- </literallayout>
- </para></listitem>
- <listitem><para>Once located, the feature description is either compiled into a simple script
- of actions, or into an existing equivalent script that is already part of the
- shipped kernel.</para></listitem>
- <listitem><para>Extra features are appended to the top-level feature description.
- These features can come from the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
- variable in recipes.</para></listitem>
- <listitem><para>Each extra feature is located, compiled and appended to the script
- as described in step three.</para></listitem>
- <listitem><para>The script is executed to produce a series of <filename>meta-*</filename>
- directories.
- These directories are descriptions of all the branches, tags, patches and configurations that
- need to be applied to the base Git repository to completely create the
- source (build) branch for the new BSP or feature.</para></listitem>
- <listitem><para>The base repository is cloned, and the actions
- listed in the <filename>meta-*</filename> directories are applied to the
- tree.</para></listitem>
- <listitem><para>The Git repository is left with the desired branch checked out and any
- required branching, patching and tagging has been performed.</para></listitem>
- </orderedlist>
- </para>
- <para>
- The kernel tree is now ready for developer consumption to be locally cloned,
- configured, and built into a Yocto Project kernel specific to some target hardware.
- <note><para>The generated <filename>meta-*</filename> directories add to the kernel
- as shipped with the Yocto Project release.
- Any add-ons and configuration data are applied to the end of an existing branch.
- The full repository generation that is found in the
- official Yocto Project kernel repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>http://git.yoctoproject.org/cgit.cgi</ulink>
- is the combination of all supported boards and configurations.</para>
- <para>The technique the Yocto Project team uses is flexible and allows for seamless
- blending of an immutable history with additional patches specific to a
- deployment.
- Any additions to the kernel become an integrated part of the branches.</para>
- </note>
- </para>
- </section>
-
- <section id='build-strategy'>
- <title>Build Strategy</title>
- <para>
- Once a local Git repository of the Yocto Project kernel exists on a development system,
- you can consider the compilation phase of kernel development - building a kernel image.
- Some prerequisites exist that are validated by the build process before compilation
- starts:
- </para>
-
- <itemizedlist>
- <listitem><para>The
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> points
- to the kernel Git repository.</para></listitem>
- <listitem><para>A BSP build branch exists.
- This branch has the following form:
- <literallayout class='monospaced'>
- &lt;kernel_type&gt;/&lt;bsp_name&gt;
- </literallayout></para></listitem>
- </itemizedlist>
-
- <para>
- The OpenEmbedded build system makes sure these conditions exist before attempting compilation.
- Other means, however, do exist, such as as bootstrapping a BSP, see
- the "<link linkend='workflow-examples'>Workflow Examples</link>".
- </para>
-
- <para>
- Before building a kernel, the build process verifies the tree
- and configures the kernel by processing all of the
- configuration "fragments" specified by feature descriptions in the <filename>.scc</filename>
- files.
- As the features are compiled, associated kernel configuration fragments are noted
- and recorded in the <filename>meta-*</filename> series of directories in their compilation order.
- The fragments are migrated, pre-processed and passed to the Linux Kernel
- Configuration subsystem (<filename>lkc</filename>) as raw input in the form
- of a <filename>.config</filename> file.
- The <filename>lkc</filename> uses its own internal dependency constraints to do the final
- processing of that information and generates the final <filename>.config</filename> file
- that is used during compilation.
- </para>
-
- <para>
- Using the board's architecture and other relevant values from the board's template,
- kernel compilation is started and a kernel image is produced.
- </para>
-
- <para>
- The other thing that you notice once you configure a kernel is that
- the build process generates a build tree that is separate from your kernel's local Git
- source repository tree.
- This build tree has a name that uses the following form, where
- <filename>${MACHINE}</filename> is the metadata name of the machine (BSP) and "kernel_type" is one
- of the Yocto Project supported kernel types (e.g. "standard"):
- <literallayout class='monospaced'>
- linux-${MACHINE}-&lt;kernel_type&gt;-build
- </literallayout>
- </para>
-
- <para>
- The existing support in the <filename>kernel.org</filename> tree achieves this
- default functionality.
- </para>
-
- <para>
- This behavior means that all the generated files for a particular machine or BSP are now in
- the build tree directory.
- The files include the final <filename>.config</filename> file, all the <filename>.o</filename>
- files, the <filename>.a</filename> files, and so forth.
- Since each machine or BSP has its own separate build directory in its own separate branch
- of the Git repository, you can easily switch between different builds.
- </para>
- </section>
-
- <section id='workflow-examples'>
- <title>Workflow Examples</title>
-
- <para>
- As previously noted, the Yocto Project kernel has built-in Git integration.
- However, these utilities are not the only way to work with the kernel repository.
- The Yocto Project has not made changes to Git or to other tools that
- would invalidate alternate workflows.
- Additionally, the way the kernel repository is constructed results in using
- only core Git functionality, thus allowing any number of tools or front ends to use the
- resulting tree.
- </para>
-
- <para>
- This section contains several workflow examples.
- Many of the examples use Git commands.
- You can find Git documentation at
- <ulink url='http://git-scm.com/documentation'></ulink>.
- You can find a simple overview of using Git with the Yocto Project in the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>"
- section of the Yocto Project Development Manual.
- </para>
-
- <section id='change-inspection-kernel-changes-commits'>
- <title>Change Inspection: Changes/Commits</title>
-
- <para>
- A common question when working with a kernel is:
- "What changes have been applied to this tree?"
- </para>
-
- <para>
- In projects that have a collection of directories that
- contain patches to the kernel, it is possible to inspect or "grep" the contents
- of the directories to get a general feel for the changes.
- This sort of patch inspection is not an efficient way to determine what has been
- done to the kernel.
- The reason it is inefficient is because there are many optional patches that are
- selected based on the kernel type and the feature description.
- Additionally, patches could exist in directories that are not included in the search.
- </para>
-
- <para>
- A more efficient way to determine what has changed in the branch is to use
- Git and inspect or search the kernel tree.
- This method gives you a full view of not only the source code modifications,
- but also provides the reasons for the changes.
- </para>
-
- <section id='what-changed-in-a-kernel'>
- <title>What Changed in a Kernel?</title>
-
- <para>
- Following are a few examples that show how to use Git commands to examine changes.
- Because Git repositories in the Yocto Project do not break existing Git
- functionality, and because there exists many permutations of these types of
- Git commands, many methods exist by which you can discover changes.
- <note>
- In the following examples, unless you provide a commit range,
- <filename>kernel.org</filename> history is blended with Yocto Project
- kernel changes.
- You can form ranges by using branch names from the kernel tree as the
- upper and lower commit markers with the Git commands.
- You can see the branch names through the web interface to the
- Yocto Project source repositories at
- <ulink url='http://git.yoctoproject.org/cgit.cgi'></ulink>.
- For example, the branch names for the <filename>linux-yocto-3.4</filename>
- kernel repository can be seen at
- <ulink url='http://git.yoctoproject.org/cgit.cgi/linux-yocto-3.4/refs/heads'></ulink>.
- </note>
- To see a full range of the changes, use the
- <filename>git whatchanged</filename> command and specify a commit range
- for the branch (<filename>&lt;commit&gt;..&lt;commit&gt;</filename>).
- </para>
-
- <para>
- Here is an example that looks at what has changed in the
- <filename>emenlow</filename> branch of the
- <filename>linux-yocto-3.4</filename> kernel.
- The lower commit range is the commit associated with the
- <filename>standard/base</filename> branch, while
- the upper commit range is the commit associated with the
- <filename>standard/emenlow</filename> branch.
- <literallayout class='monospaced'>
- $ git whatchanged origin/standard/base..origin/standard/emenlow
- </literallayout>
- </para>
-
- <para>
- To see a summary of changes use the <filename>git log</filename> command.
- Here is an example using the same branches:
- <literallayout class='monospaced'>
- $ git log --oneline origin/standard/base..origin/standard/emenlow
- </literallayout>
- The <filename>git log</filename> output might be more useful than
- the <filename>git whatchanged</filename> as you get
- a short, one-line summary of each change and not the entire commit.
- </para>
-
- <para>
- If you want to see code differences associated with all the changes, use
- the <filename>git diff</filename> command.
- Here is an example:
- <literallayout class='monospaced'>
- $ git diff origin/standard/base..origin/standard/emenlow
- </literallayout>
- </para>
-
- <para>
- You can see the commit log messages and the text differences using the
- <filename>git show</filename> command:
- Here is an example:
- <literallayout class='monospaced'>
- $ git show origin/standard/base..origin/standard/emenlow
- </literallayout>
- </para>
-
- <para>
- You can create individual patches for each change by using the
- <filename>git format-patch</filename> command.
- Here is an example that that creates patch files for each commit and
- places them in your <filename>Documents</filename> directory:
- <literallayout class='monospaced'>
- $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow
- </literallayout>
- </para>
- </section>
-
- <section id='show-a-particular-feature-or-branch-change'>
- <title>Show a Particular Feature or Branch Change</title>
-
- <para>
- Developers use tags in the Yocto Project kernel tree to divide changes for significant
- features or branches.
- Once you know a particular tag, you can use Git commands
- to show changes associated with the tag and find the branches that contain
- the feature.
- <note>
- Because BSP branch, <filename>kernel.org</filename>, and feature tags are all
- present, there could be many tags.
- </note>
- The <filename>git show &lt;tag&gt;</filename> command shows changes that are tagged by
- a feature.
- Here is an example that shows changes tagged by the <filename>systemtap</filename>
- feature:
- <literallayout class='monospaced'>
- $ git show systemtap
- </literallayout>
- You can use the <filename>git branch --contains &lt;tag&gt;</filename> command
- to show the branches that contain a particular feature.
- This command shows the branches that contain the <filename>systemtap</filename>
- feature:
- <literallayout class='monospaced'>
- $ git branch --contains systemtap
- </literallayout>
- </para>
-
- <para>
- You can use many other comparisons to isolate BSP and kernel changes.
- For example, you can compare against <filename>kernel.org</filename> tags
- such as the <filename>v3.4</filename> tag.
- </para>
- </section>
- </section>
-
- <section id='development-saving-kernel-modifications'>
- <title>Development: Saving Kernel Modifications</title>
-
- <para>
- Another common operation is to build a BSP supplied by the Yocto Project, make some
- changes, rebuild, and then test.
- Those local changes often need to be exported, shared or otherwise maintained.
- </para>
-
- <para>
- Since the Yocto Project kernel source tree is backed by Git, this activity is
- much easier as compared to with previous releases.
- Because Git tracks file modifications, additions and deletions, it is easy
- to modify the code and later realize that you need to save the changes.
- It is also easy to determine what has changed.
- This method also provides many tools to commit, undo and export those modifications.
- </para>
-
- <para>
- This section and its sub-sections, describe general application of Git's
- <filename>push</filename> and <filename>pull</filename> commands, which are used to
- get your changes upstream or source your code from an upstream repository.
- The Yocto Project provides scripts that help you work in a collaborative development
- environment.
- For information on these scripts, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream'>Using Scripts to Push a Change
- Upstream and Request a Pull</ulink>" and
- "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-patch'>Using Email to Submit a Patch</ulink>"
- sections in the Yocto Project Development Manual.
- </para>
-
- <para>
- There are many ways to save kernel modifications.
- The technique employed
- depends on the destination for the patches:
-
- <itemizedlist>
- <listitem><para>Bulk storage</para></listitem>
- <listitem><para>Internal sharing either through patches or by using Git</para></listitem>
- <listitem><para>External submissions</para></listitem>
- <listitem><para>Exporting for integration into another Source Code
- Manager (SCM)</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Because of the following list of issues, the destination of the patches also influences
- the method for gathering them:
-
- <itemizedlist>
- <listitem><para>Bisectability</para></listitem>
- <listitem><para>Commit headers</para></listitem>
- <listitem><para>Division of subsystems for separate submission or review</para></listitem>
- </itemizedlist>
- </para>
-
- <section id='bulk-export'>
- <title>Bulk Export</title>
-
- <para>
- This section describes how you can "bulk" export changes that have not
- been separated or divided.
- This situation works well when you are simply storing patches outside of the kernel
- source repository, either permanently or temporarily, and you are not committing
- incremental changes during development.
- <note>
- This technique is not appropriate for full integration of upstream submission
- because changes are not properly divided and do not provide an avenue for per-change
- commit messages.
- Therefore, this example assumes that changes have not been committed incrementally
- during development and that you simply must gather and export them.
- </note>
- <literallayout class='monospaced'>
- # bulk export of ALL modifications without separation or division
- # of the changes
-
- $ git add .
- $ git commit -s -a -m &lt;msg&gt;
- or
- $ git commit -s -a # and interact with $EDITOR
- </literallayout>
- </para>
-
- <para>
- The previous operations capture all the local changes in the project source
- tree in a single Git commit.
- And, that commit is also stored in the project's source tree.
- </para>
-
- <para>
- Once the changes are exported, you can restore them manually using a template
- or through integration with the <filename>default_kernel</filename>.
- </para>
-
- </section>
-
- <section id='incremental-planned-sharing'>
- <title>Incremental/Planned Sharing</title>
-
- <para>
- This section describes how to save modifications when you are making incremental
- commits or practicing planned sharing.
- The examples in this section assume that you have incrementally committed
- changes to the tree during development and now need to export them.
- The sections that follow
- describe how you can export your changes internally through either patches or by
- using Git commands.
- </para>
-
- <para>
- During development, the following commands are of interest.
- For full Git documentation, refer to the Git documentation at
- <ulink url='http://github.com'></ulink>.
-
- <literallayout class='monospaced'>
- # edit a file
- $ vi &lt;path&gt;/file
- # stage the change
- $ git add &lt;path&gt;/file
- # commit the change
- $ git commit -s
- # remove a file
- $ git rm &lt;path&gt;/file
- # commit the change
- $ git commit -s
-
- ... etc.
- </literallayout>
- </para>
-
- <para>
- Distributed development with Git is possible when you use a universally
- agreed-upon unique commit identifier (set by the creator of the commit) that maps to a
- specific change set with a specific parent.
- This identifier is created for you when
- you create a commit, and is re-created when you amend, alter or re-apply
- a commit.
- As an individual in isolation, this is of no interest.
- However, if you
- intend to share your tree with normal Git <filename>push</filename> and
- <filename>pull</filename> operations for
- distributed development, you should consider the ramifications of changing a
- commit that you have already shared with others.
- </para>
-
- <para>
- Assuming that the changes have not been pushed upstream, or pulled into
- another repository, you can update both the commit content and commit messages
- associated with development by using the following commands:
-
- <literallayout class='monospaced'>
- $ Git add &lt;path&gt;/file
- $ Git commit --amend
- $ Git rebase or Git rebase -i
- </literallayout>
- </para>
-
- <para>
- Again, assuming that the changes have not been pushed upstream, and that
- no pending works-in-progress exist (use <filename>git status</filename> to check), then
- you can revert (undo) commits by using the following commands:
-
- <literallayout class='monospaced'>
- # remove the commit, update working tree and remove all
- # traces of the change
- $ git reset --hard HEAD^
- # remove the commit, but leave the files changed and staged for re-commit
- $ git reset --soft HEAD^
- # remove the commit, leave file change, but not staged for commit
- $ git reset --mixed HEAD^
- </literallayout>
- </para>
-
- <para>
- You can create branches, "cherry-pick" changes, or perform any number of Git
- operations until the commits are in good order for pushing upstream
- or for pull requests.
- After a <filename>push</filename> or <filename>pull</filename> command,
- commits are normally considered
- "permanent" and you should not modify them.
- If the commits need to be changed, you can incrementally do so with new commits.
- These practices follow standard Git workflow and the <filename>kernel.org</filename> best
- practices, which is recommended.
- <note>
- It is recommended to tag or branch before adding changes to a Yocto Project
- BSP or before creating a new one.
- The reason for this recommendation is because the branch or tag provides a
- reference point to facilitate locating and exporting local changes.
- </note>
- </para>
-
- <section id='export-internally-via-patches'>
- <title>Exporting Changes Internally by Using Patches</title>
-
- <para>
- This section describes how you can extract committed changes from a working directory
- by exporting them as patches.
- Once the changes have been extracted, you can use the patches for upstream submission,
- place them in a Yocto Project template for automatic kernel patching,
- or apply them in many other common uses.
- </para>
-
- <para>
- This example shows how to create a directory with sequentially numbered patches.
- Once the directory is created, you can apply it to a repository using the
- <filename>git am</filename> command to reproduce the original commit and all
- the related information such as author, date, commit log, and so forth.
- <note>
- The new commit identifiers (ID) will be generated upon re-application.
- This action reflects that the commit is now applied to an underlying commit
- with a different ID.
- </note>
- <literallayout class='monospaced'>
- # &lt;first-commit&gt; can be a tag if one was created before development
- # began. It can also be the parent branch if a branch was created
- # before development began.
-
- $ git format-patch -o &lt;dir&gt; &lt;first commit&gt;..&lt;last commit&gt;
- </literallayout>
- </para>
-
- <para>
- In other words:
- <literallayout class='monospaced'>
- # Identify commits of interest.
-
- # If the tree was tagged before development
- $ git format-patch -o &lt;save dir&gt; &lt;tag&gt;
-
- # If no tags are available
- $ git format-patch -o &lt;save dir&gt; HEAD^ # last commit
- $ git format-patch -o &lt;save dir&gt; HEAD^^ # last 2 commits
- $ git whatchanged # identify last commit
- $ git format-patch -o &lt;save dir&gt; &lt;commit id&gt;
- $ git format-patch -o &lt;save dir&gt; &lt;rev-list&gt;
- </literallayout>
- </para>
- </section>
-
- <section id='export-internally-via-git'>
- <title>Exporting Changes Internally by Using Git</title>
-
- <para>
- This section describes how you can export changes from a working directory
- by pushing the changes into a master repository or by making a pull request.
- Once you have pushed the changes to the master repository, you can then
- pull those same changes into a new kernel build at a later time.
- </para>
-
- <para>
- Use this command form to push the changes:
- <literallayout class='monospaced'>
- $ git push ssh://&lt;master_server&gt;/&lt;path_to_repo&gt;
- &lt;local_branch&gt;:&lt;remote_branch&gt;
- </literallayout>
- </para>
-
- <para>
- For example, the following command pushes the changes from your local branch
- <filename>yocto/standard/common-pc/base</filename> to the remote branch with the same name
- in the master repository <filename>//git.mycompany.com/pub/git/kernel-3.4</filename>.
- <literallayout class='monospaced'>
- $ git push ssh://git.mycompany.com/pub/git/kernel-3.4 \
- yocto/standard/common-pc/base:yocto/standard/common-pc/base
- </literallayout>
- </para>
-
- <para>
- A pull request entails using the <filename>git request-pull</filename> command to compose
- an email to the
- maintainer requesting that a branch be pulled into the master repository, see
- <ulink url='http://github.com/guides/pull-requests'></ulink> for an example.
- <note>
- Other commands such as <filename>git stash</filename> or branching can also be used to save
- changes, but are not covered in this document.
- </note>
- </para>
- </section>
- </section>
-
- <section id='export-for-external-upstream-submission'>
- <title>Exporting Changes for External (Upstream) Submission</title>
-
- <para>
- This section describes how to export changes for external upstream submission.
- If the patch series is large or the maintainer prefers to pull
- changes, you can submit these changes by using a pull request.
- However, it is common to send patches as an email series.
- This method allows easy review and integration of the changes.
- <note>
- Before sending patches for review be sure you understand the
- community standards for submitting and documenting changes and follow their best practices.
- For example, kernel patches should follow standards such as:
- <itemizedlist>
- <listitem><para>
- <ulink url='http://linux.yyz.us/patch-format.html'></ulink></para></listitem>
- <listitem><para>Documentation/SubmittingPatches (in any linux
- kernel source tree)</para></listitem>
- </itemizedlist>
- </note>
- </para>
-
- <para>
- The messages used to commit changes are a large part of these standards.
- Consequently, be sure that the headers for each commit have the required information.
- For information on how to follow the Yocto Project commit message standards, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a
- Change</ulink>" section in the Yocto Project Development Manual.
- </para>
-
- <para>
- If the initial commits were not properly documented or do not meet those standards,
- you can re-base by using the <filename>git rebase -i</filename> command to
- manipulate the commits and
- get them into the required format.
- Other techniques such as branching and cherry-picking commits are also viable options.
- </para>
-
- <para>
- Once you complete the commits, you can generate the email that sends the patches
- to the maintainer(s) or lists that review and integrate changes.
- The command <filename>git send-email</filename> is commonly used to ensure
- that patches are properly
- formatted for easy application and avoid mailer-induced patch damage.
- </para>
-
- <para>
- The following is an example of dumping patches for external submission:
- <literallayout class='monospaced'>
- # dump the last 4 commits
- $ git format-patch --thread -n -o ~/rr/ HEAD^^^^
- $ git send-email --compose --subject '[RFC 0/N] &lt;patch series summary&gt;' \
- --to foo@yoctoproject.org --to bar@yoctoproject.org \
- --cc list@yoctoproject.org ~/rr
- # the editor is invoked for the 0/N patch, and when complete the entire
- # series is sent via email for review
- </literallayout>
- </para>
- </section>
-
- <section id='export-for-import-into-other-scm'>
- <title>Exporting Changes for Import into Another SCM</title>
-
- <para>
- When you want to export changes for import into another
- Source Code Manager (SCM), you can use any of the previously discussed
- techniques.
- However, if the patches are manually applied to a secondary tree and then
- that tree is checked into the SCM, you can lose change information such as
- commit logs.
- This process is not recommended.
- </para>
-
- <para>
- Many SCMs can directly import Git commits, or can translate Git patches so that
- information is not lost.
- Those facilities are SCM-dependent and you should use them whenever possible.
- </para>
- </section>
- </section>
-
- <section id='scm-working-with-the-yocto-project-kernel-in-another-scm'>
- <title>Working with the Yocto Project Kernel in Another SCM</title>
-
- <para>
- This section describes kernel development in an SCM other than Git,
- which is not the same as exporting changes to another SCM described earlier.
- For this scenario, you use the OpenEmbedded build system to
- develop the kernel in a different SCM.
- The following must be true for you to accomplish this:
- <itemizedlist>
- <listitem><para>The delivered Yocto Project kernel must be exported into the second
- SCM.</para></listitem>
- <listitem><para>Development must be exported from that secondary SCM into a
- format that can be used by the OpenEmbedded build system.</para></listitem>
- </itemizedlist>
- </para>
-
- <section id='exporting-delivered-kernel-to-scm'>
- <title>Exporting the Delivered Kernel to the SCM</title>
-
- <para>
- Depending on the SCM, it might be possible to export the entire Yocto Project
- kernel Git repository, branches and all, into a new environment.
- This method is preferred because it has the most flexibility and potential to maintain
- the meta data associated with each commit.
- </para>
-
- <para>
- When a direct import mechanism is not available, it is still possible to
- export a branch (or series of branches) and check them into a new repository.
- </para>
-
- <para>
- The following commands illustrate some of the steps you could use to
- import the <filename>yocto/standard/common-pc/base</filename>
- kernel into a secondary SCM:
- <literallayout class='monospaced'>
- $ git checkout yocto/standard/common-pc/base
- $ cd .. ; echo linux/.git &gt; .cvsignore
- $ cvs import -m "initial import" linux MY_COMPANY start
- </literallayout>
- </para>
-
- <para>
- You could now relocate the CVS repository and use it in a centralized manner.
- </para>
-
- <para>
- The following commands illustrate how you can condense and merge two BSPs into a
- second SCM:
- <literallayout class='monospaced'>
- $ git checkout yocto/standard/common-pc/base
- $ git merge yocto/standard/common-pc-64/base
- # resolve any conflicts and commit them
- $ cd .. ; echo linux/.git &gt; .cvsignore
- $ cvs import -m "initial import" linux MY_COMPANY start
- </literallayout>
- </para>
- </section>
-
- <section id='importing-changes-for-build'>
- <title>Importing Changes for the Build</title>
-
- <para>
- Once development has reached a suitable point in the second development
- environment, you need to export the changes as patches.
- To export them, place the changes in a recipe and
- automatically apply them to the kernel during patching.
- </para>
- </section>
- </section>
-
- <section id='bsp-creating'>
- <title>Creating a BSP Based on an Existing Similar BSP</title>
-
- <para>
- This section overviews the process of creating a BSP based on an
- existing similar BSP.
- The information is introductory in nature and does not provide step-by-step examples.
- For detailed information on how to create a new BSP, see
- the "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>" section in the
- Yocto Project Board Support Package (BSP) Developer's Guide, or see the
- <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>Transcript:_creating_one_generic_Atom_BSP_from_another</ulink>
- wiki page.
- </para>
-
- <para>
- The basic steps you need to follow are:
- <orderedlist>
- <listitem><para><emphasis>Make sure you have set up a local Source Directory:</emphasis>
- You must create a local
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
- by either creating a Git repository (recommended) or
- extracting a Yocto Project release tarball.</para></listitem>
- <listitem><para><emphasis>Choose an existing BSP available with the Yocto Project:</emphasis>
- Try to map your board features as closely to the features of a BSP that is
- already supported and exists in the Yocto Project.
- Starting with something as close as possible to your board makes developing
- your BSP easier.
- You can find all the BSPs that are supported and ship with the Yocto Project
- on the Yocto Project's Download page at
- <ulink url='&YOCTO_HOME_URL;/download'></ulink>.</para></listitem>
- <listitem><para><emphasis>Be sure you have the Base BSP:</emphasis>
- You need to either have a local Git repository of the base BSP set up or
- have downloaded and extracted the files from a release BSP tarball.
- Either method gives you access to the BSP source files.</para></listitem>
- <listitem><para><emphasis>Make a copy of the existing BSP, thus isolating your new
- BSP work:</emphasis>
- Copying the existing BSP file structure gives you a new area in which to work.</para></listitem>
- <listitem><para><emphasis>Make configuration and recipe changes to your new BSP:</emphasis>
- Configuration changes involve the files in the BSP's <filename>conf</filename>
- directory.
- Changes include creating a machine-specific configuration file and editing the
- <filename>layer.conf</filename> file.
- The configuration changes identify the kernel you will be using.
- Recipe changes include removing, modifying, or adding new recipe files that
- instruct the build process on what features to include in the image.</para></listitem>
- <listitem><para><emphasis>Prepare for the build:</emphasis>
- Before you actually initiate the build, you need to set up the build environment
- by sourcing the environment initialization script.
- After setting up the environment, you need to make some build configuration
- changes to the <filename>local.conf</filename> and <filename>bblayers.conf</filename>
- files.</para></listitem>
- <listitem><para><emphasis>Build the image:</emphasis>
- The OpenEmbedded build system uses BitBake to create the image.
- You need to decide on the type of image you are going to build (e.g. minimal, base,
- core, sato, and so forth) and then start the build using the <filename>bitbake</filename>
- command.</para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='tip-dirty-string'>
- <title>"-dirty" String</title>
-
- <para>
- If kernel images are being built with "-dirty" on the end of the version
- string, this simply means that modifications in the source
- directory have not been committed.
- <literallayout class='monospaced'>
- $ git status
- </literallayout>
- </para>
-
- <para>
- You can use the above Git command to report modified, removed, or added files.
- You should commit those changes to the tree regardless of whether they will be saved,
- exported, or used.
- Once you commit the changes you need to rebuild the kernel.
- </para>
-
- <para>
- To brute force pickup and commit all such pending changes, enter the following:
- <literallayout class='monospaced'>
- $ git add .
- $ git commit -s -a -m "getting rid of -dirty"
- </literallayout>
- </para>
-
- <para>
- Next, rebuild the kernel.
- </para>
- </section>
- </section>
-</chapter>
-<!--
-vim: expandtab tw=80 ts=4
--->
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-faq.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-faq.xml
index 9e0517d4af..c3a20465a0 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-faq.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-faq.xml
@@ -36,7 +36,8 @@
</question>
<answer>
<para>
- Refer to the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
+ Refer to the
+ "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
section for information.
</para>
</answer>
@@ -73,8 +74,9 @@
include "kernel-image".</para>
<para>See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
- section in the Yocto Project Development Manual for information on
- how to use an append file to override metadata.
+ section in the Yocto Project Development Tasks Manual
+ for information on how to use an append file to
+ override metadata.
</para>
</answer>
</qandaentry>
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml
index 263e50098f..dba45495f2 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-intro.xml
@@ -5,144 +5,263 @@
<chapter id='kernel-dev-intro'>
<title>Introduction</title>
-<!--
-<para>
- <emphasis>AR - Darren Hart:</emphasis> See if the concepts in these
- three bullets are adequately covered in somewhere in this manual:
- <itemizedlist>
- <listitem><para>Do we convey that our kernel Git repositories
- have a clear and continuous history, similar to the way the
- kernel Git repositories for <filename>kernel.org</filename>
- do.
- </para></listitem>
- <listitem><para>Does the manual note that Yocto Project delivers
- a key set of supported kernel types, where
- each type is tailored to meet a specific use (e.g. networking,
- consumer, devices, and so forth).</para></listitem>
- <listitem><para>Do we convey that the Yocto Project uses a
- Git branching strategy that, from a
- developer's point of view, results in a linear path from the
- baseline kernel.org, through a select group of features and
- ends with their BSP-specific commits.</para></listitem>
- </itemizedlist>
-</para>
--->
+<section id='kernel-dev-overview'>
+ <title>Overview</title>
+
+ <para>
+ Regardless of how you intend to make use of the Yocto Project,
+ chances are you will work with the Linux kernel.
+ This manual describes how to set up your build host to support
+ kernel development, introduces the kernel development process,
+ provides background information on the Yocto Linux kernel
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
+ describes common tasks you can perform using the kernel tools,
+ shows you how to use the kernel Metadata needed to work with
+ the kernel inside the Yocto Project, and provides insight into how
+ the Yocto Project team develops and maintains Yocto Linux kernel
+ Git repositories and Metadata.
+ </para>
+
+ <para>
+ Each Yocto Project release has a set of Yocto Linux kernel recipes,
+ whose Git repositories you can view in the Yocto
+ <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> under
+ the "Yocto Linux Kernel" heading.
+ New recipes for the release track the latest Linux kernel
+ upstream developments from
+ <ulink url='http://www.kernel.org'></ulink> and introduce
+ newly-supported platforms.
+ Previous recipes in the release are refreshed and supported for at
+ least one additional Yocto Project release.
+ As they align, these previous releases are updated to include the
+ latest from the Long Term Support Initiative (LTSI) project.
+ You can learn more about Yocto Linux kernels and LTSI in the
+ "<link linkend='kernel-big-picture'>Yocto Project Kernel Development and Maintenance</link>"
+ section.
+ </para>
+
+ <para>
+ Also included is a Yocto Linux kernel development recipe
+ (<filename>linux-yocto-dev.bb</filename>) should you want to work
+ with the very latest in upstream Yocto Linux kernel development and
+ kernel Metadata development.
+ <note>
+ For more on Yocto Linux kernels, see the
+ "<link linkend='kernel-big-picture'>Yocto Project Kernel Development and Maintenance</link>
+ section.
+ </note>
+ </para>
+
+ <para>
+ The Yocto Project also provides a powerful set of kernel
+ tools for managing Yocto Linux kernel sources and configuration data.
+ You can use these tools to make a single configuration change,
+ apply multiple patches, or work with your own kernel sources.
+ </para>
+
+ <para>
+ In particular, the kernel tools allow you to generate configuration
+ fragments that specify only what you must, and nothing more.
+ Configuration fragments only need to contain the highest level
+ visible <filename>CONFIG</filename> options as presented by the
+ Yocto Linux kernel <filename>menuconfig</filename> system.
+ Contrast this against a complete Yocto Linux kernel
+ <filename>.config</filename> file, which includes all the automatically
+ selected <filename>CONFIG</filename> options.
+ This efficiency reduces your maintenance effort and allows you
+ to further separate your configuration in ways that make sense for
+ your project.
+ A common split separates policy and hardware.
+ For example, all your kernels might support the
+ <filename>proc</filename> and <filename>sys</filename> filesystems,
+ but only specific boards require sound, USB, or specific drivers.
+ Specifying these configurations individually allows you to aggregate
+ them together as needed, but maintains them in only one place.
+ Similar logic applies to separating source changes.
+ </para>
+
+ <para>
+ If you do not maintain your own kernel sources and need to make
+ only minimal changes to the sources, the released recipes provide a
+ vetted base upon which to layer your changes.
+ Doing so allows you to benefit from the continual kernel
+ integration and testing performed during development of the
+ Yocto Project.
+ </para>
+
+ <para>
+ If, instead, you have a very specific Linux kernel source tree
+ and are unable to align with one of the official Yocto Linux kernel
+ recipes, an alternative exists by which you can use the Yocto
+ Project Linux kernel tools with your own kernel sources.
+ </para>
+
+ <para>
+ The remainder of this manual provides instructions for completing
+ specific Linux kernel development tasks.
+ These instructions assume you are comfortable working with
+ <ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink>
+ recipes and basic open-source development tools.
+ Understanding these concepts will facilitate the process of working
+ with the kernel recipes.
+ If you find you need some additional background, please be sure to
+ review and understand the following documentation:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
+ as described in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual.
+ </para></listitem>
+ <listitem><para>
+ The
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ <listitem><para>
+ The
+ "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
+ section.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Finally, while this document focuses on the manual creation of
+ recipes, patches, and configuration files, the Yocto Project
+ Board Support Package (BSP) tools are available to automate
+ this process with existing content and work well to create the
+ initial framework and boilerplate code.
+ For details on these tools, see the
+ "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
+ section in the Yocto Project Board Support Package (BSP) Developer's
+ Guide.
+ </para>
+</section>
+
+<section id='kernel-modification-workflow'>
+ <title>Kernel Modification Workflow</title>
+
+ <para>
+ Kernel modification involves changing the Yocto Project kernel,
+ which could involve changing configuration options as well as adding
+ new kernel recipes.
+ Configuration changes can be added in the form of configuration
+ fragments, while recipe modification comes through the kernel's
+ <filename>recipes-kernel</filename> area in a kernel layer you create.
+ </para>
+
+ <para>
+ This section presents a high-level overview of the Yocto Project
+ kernel modification workflow.
+ The illustration and accompanying list provide general information
+ and references for further information.
+ <imagedata fileref="figures/kernel-dev-flow.png"
+ width="9in" depth="5in" align="center" scalefit="1" />
+ </para>
+
+ <para>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Set Up Your Host Development System to Support
+ Development Using the Yocto Project:</emphasis>
+ See the
+ "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
+ section in the Yocto Project Quick Start for options on how
+ to get a build host ready to use the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Set Up Your Host Development System for Kernel Development:</emphasis>
+ It is recommended that you use <filename>devtool</filename>
+ and an extensible SDK for kernel development.
+ Alternatively, you can use traditional kernel development
+ methods with the Yocto Project.
+ Either way, there are steps you need to take to get the
+ development environment ready.</para>
+
+ <para>Using <filename>devtool</filename> and the eSDK requires
+ that you have a clean build of the image and that you are
+ set up with the appropriate eSDK.
+ For more information, see the
+ "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
+ section.</para>
+
+ <para>Using traditional kernel development requires that you
+ have the kernel source available in an isolated local Git
+ repository.
+ For more information, see the
+ "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Make Changes to the Kernel Source Code if
+ applicable:</emphasis>
+ Modifying the kernel does not always mean directly
+ changing source files.
+ However, if you have to do this, you make the changes to the
+ files in the eSDK's Build Directory if you are using
+ <filename>devtool</filename>.
+ For more information, see the
+ "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
+ section.</para>
+
+ <para>If you are using traditional kernel development, you
+ edit the source files in the kernel's local Git repository.
+ For more information, see the
+ "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Make Kernel Configuration Changes if
+ Applicable:</emphasis>
+ If your situation calls for changing the kernel's
+ configuration, you can use
+ <link linkend='using-menuconfig'><filename>menuconfig</filename></link>,
+ which allows you to interactively develop and test the
+ configuration changes you are making to the kernel.
+ Saving changes you make with <filename>menuconfig</filename>
+ updates the kernel's <filename>.config</filename> file.
+ <note><title>Warning</title>
+ Try to resist the temptation to directly edit an
+ existing <filename>.config</filename> file, which is
+ found in the Build Directory among the source code
+ used for the build.
+ Doing so, can produce unexpected results when the
+ OpenEmbedded build system regenerates the configuration
+ file.
+ </note>
+ Once you are satisfied with the configuration
+ changes made using <filename>menuconfig</filename>
+ and you have saved them, you can directly compare the
+ resulting <filename>.config</filename> file against an
+ existing original and gather those changes into a
+ <link linkend='creating-config-fragments'>configuration fragment file</link>
+ to be referenced from within the kernel's
+ <filename>.bbappend</filename> file.</para>
+
+ <para>Additionally, if you are working in a BSP layer
+ and need to modify the BSP's kernel's configuration,
+ you can use the
+ <ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'><filename>yocto-kernel</filename></ulink>
+ script as well as <filename>menuconfig</filename>.
+ The <filename>yocto-kernel</filename> script lets
+ you interactively set up kernel configurations.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Rebuild the Kernel Image With Your Changes:</emphasis>
+ Rebuilding the kernel image applies your changes.
+ Depending on your target hardware, you can verify your changes
+ on actual hardware or perhaps QEMU.
+ </para></listitem>
+ </orderedlist>
+ The remainder of this developer's guide covers common tasks typically
+ used during kernel development, advanced Metadata usage, and Yocto Linux
+ kernel maintenance concepts.
+ </para>
+</section>
- <section id='kernel-dev-overview'>
- <title>Overview</title>
-
- <para>
- Regardless of how you intend to make use of the Yocto Project,
- chances are you will work with the Linux kernel.
- This manual provides background information on the Yocto Linux kernel
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
- describes common tasks you can perform using the kernel tools,
- and shows you how to use the kernel Metadata needed to work with
- the kernel inside the Yocto Project.
- </para>
-
- <para>
- Each Yocto Project release has a set of linux-yocto recipes, whose
- Git repositories you can view in the Yocto
- <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> under
- the "Yocto Linux Kernel" heading.
- New recipes for the release track the latest upstream developments
- and introduce newly-supported platforms.
- Previous recipes in the release are refreshed and supported for at
- least one additional release.
- As they align, these previous releases are updated to include the
- latest from the
- <ulink url='&YOCTO_HOME_URL;/organization/long-term-support-initiative-ltsi'>Long Term Support Initiative</ulink>
- (LTSI) project.
- Also included is a linux-yocto development recipe
- (<filename>linux-yocto-dev.bb</filename>) should you want to work
- with the very latest in upstream Linux kernel development and
- kernel Metadata development.
- </para>
-
- <para>
- The Yocto Project also provides a powerful set of kernel
- tools for managing Linux kernel sources and configuration data.
- You can use these tools to make a single configuration change,
- apply multiple patches, or work with your own kernel sources.
- </para>
-
- <para>
- In particular, the kernel tools allow you to generate configuration
- fragments that specify only what you must, and nothing more.
- Configuration fragments only need to contain the highest level
- visible <filename>CONFIG</filename> options as presented by the Linux
- kernel <filename>menuconfig</filename> system.
- Contrast this against a complete Linux kernel
- <filename>.config</filename>, which includes all the automatically
- selected <filename>CONFIG</filename> options.
- This efficiency reduces your maintenance effort and allows you
- to further separate your configuration in ways that make sense for
- your project.
- A common split separates policy and hardware.
- For example, all your kernels might support
- the <filename>proc</filename> and <filename>sys</filename> filesystems,
- but only specific boards require sound, USB, or specific drivers.
- Specifying these configurations individually allows you to aggregate
- them together as needed, but maintains them in only one place.
- Similar logic applies to separating source changes.
- </para>
-
- <para>
- If you do not maintain your own kernel sources and need to make
- only minimal changes to the sources, the released recipes provide a
- vetted base upon which to layer your changes.
- Doing so allows you to benefit from the continual kernel
- integration and testing performed during development of the
- Yocto Project.
- </para>
-
- <para>
- If, instead, you have a very specific Linux kernel source tree
- and are unable to align with one of the official linux-yocto
- recipes, an alternative exists by which you can use the Yocto
- Project Linux kernel tools with your own kernel sources.
- </para>
- </section>
-
- <section id='kernel-dev-other-resources'>
- <title>Other Resources</title>
-
- <para>
- The sections that follow provide instructions for completing
- specific Linux kernel development tasks.
- These instructions assume you are comfortable working with
- <ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink>
- recipes and basic open-source development tools.
- Understanding these concepts will facilitate the process of working
- with the kernel recipes.
- If you find you need some additional background, please be sure to
- review and understand the following documentation:
- <itemizedlist>
- <listitem><para><ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
- </para></listitem>
- <listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-modifying-source-code'>Modifying Source Code</ulink>"
- section in the Yocto Project Development Manual
- </para></listitem>
- <listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" section
- in the Yocto Project Development Manual</para></listitem>
- <listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#modifying-the-kernel'>Modifying the Kernel</ulink>" section
- in the Yocto Project Development Manual.</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Finally, while this document focuses on the manual creation of
- recipes, patches, and configuration files, the Yocto Project
- Board Support Package (BSP) tools are available to automate
- this process with existing content and work well to create the
- initial framework and boilerplate code.
- For details on these tools, see the
- "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
- section in the Yocto Project Board Support Package (BSP) Developer's
- Guide.
- </para>
- </section>
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml
index 6bb0cf6fd0..f5fd183fd0 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-maint-appx.xml
@@ -7,82 +7,144 @@
<section id='tree-construction'>
<title>Tree Construction</title>
+
<para>
- This section describes construction of the Yocto Project kernel source repositories
- as accomplished by the Yocto Project team to create kernel repositories.
- These kernel repositories are found under the heading "Yocto Linux Kernel" at
+ This section describes construction of the Yocto Project kernel
+ source repositories as accomplished by the Yocto Project team to
+ create Yocto Linux kernel repositories.
+ These kernel repositories are found under the heading "Yocto Linux
+ Kernel" at
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink>
- and can be shipped as part of a Yocto Project release.
- The team creates these repositories by
- compiling and executing the set of feature descriptions for every BSP
- and feature in the product.
+ and are shipped as part of a Yocto Project release.
+ The team creates these repositories by compiling and executing the
+ set of feature descriptions for every BSP and feature in the
+ product.
Those feature descriptions list all necessary patches,
- configuration, branching, tagging and feature divisions found in a kernel.
- Thus, the Yocto Project kernel repository (or tree) is built.
+ configurations, branches, tags, and feature divisions found in a
+ Yocto Linux kernel.
+ Thus, the Yocto Project Linux kernel repository (or tree) and
+ accompanying Metadata in the
+ <filename>yocto-kernel-cache</filename> are built.
</para>
+
<para>
- The existence of this tree allows you to access and clone a particular
- Yocto Project kernel repository and use it to build images based on their configurations
- and features.
+ The existence of these repositories allow you to access and clone a
+ particular Yocto Project Linux kernel repository and use it to
+ build images based on their configurations and features.
</para>
+
<para>
- You can find the files used to describe all the valid features and BSPs
- in the Yocto Project kernel in any clone of the Yocto Project kernel source repository
- Git tree.
- For example, the following command clones the Yocto Project baseline kernel that
- branched off of <filename>linux.org</filename> version 3.19:
+ You can find the files used to describe all the valid features and
+ BSPs in the Yocto Project Linux kernel in any clone of the Yocto
+ Project Linux kernel source repository and
+ <filename>yocto-kernel-cache</filename> Git trees.
+ For example, the following commands clone the Yocto Project
+ baseline Linux kernel that branches off
+ <filename>linux.org</filename> version 4.12 and the
+ <filename>yocto-kernel-cache</filename>, which contains stores of
+ kernel Metadata:
<literallayout class='monospaced'>
- $ git clone git://git.yoctoproject.org/linux-yocto-3.19
+ $ git clone git://git.yoctoproject.org/linux-yocto-4.12
+ $ git clone git://git.yoctoproject.org/linux-kernel-cache
</literallayout>
- For another example of how to set up a local Git repository of the Yocto Project
- kernel files, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Yocto Project Kernel</ulink>" bulleted
- item in the Yocto Project Development Manual.
+ For more information on how to set up a local Git repository of
+ the Yocto Project Linux kernel files, see the
+ "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>"
+ section.
</para>
+
<para>
- Once you have cloned the kernel Git repository on your local machine, you can
- switch to the <filename>meta</filename> branch within the repository.
- Here is an example that assumes the local Git repository for the kernel is in
- a top-level directory named <filename>linux-yocto-3.19</filename>:
+ Once you have cloned the kernel Git repository and the
+ cache of Metadata on your local machine, you can discover the
+ branches that are available in the repository using the following
+ Git command:
+ <literallayout class='monospaced'>
+ $ git branch -a
+ </literallayout>
+ Checking out a branch allows you to work with a particular
+ Yocto Linux kernel.
+ For example, the following commands check out the
+ "standard/beagleboard" branch of the Yocto Linux kernel repository
+ and the "yocto-4.12" branch of the
+ <filename>yocto-kernel-cache</filename> repository:
<literallayout class='monospaced'>
- $ cd linux-yocto-3.19
- $ git checkout -b meta origin/meta
+ $ cd ~/linux-yocto-4.12
+ $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard
+ $ cd ~/linux-kernel-cache
+ $ git checkout -b my-4.12-metadata remotes/origin/yocto-4.12
</literallayout>
- Once you have checked out and switched to the <filename>meta</filename> branch,
- you can see a snapshot of all the kernel configuration and feature descriptions that are
- used to build that particular kernel repository.
- These descriptions are in the form of <filename>.scc</filename> files.
+ <note>
+ Branches in the <filename>yocto-kernel-cache</filename>
+ repository correspond to Yocto Linux kernel versions
+ (e.g. "yocto-4.12", "yocto-4.10", "yocto-4.9", and so forth).
+ </note>
+ Once you have checked out and switched to appropriate branches,
+ you can see a snapshot of all the kernel source files used to
+ used to build that particular Yocto Linux kernel for a
+ particular board.
</para>
+
<para>
- You should realize, however, that browsing your local kernel repository
- for feature descriptions and patches is not an effective way to determine what is in a
- particular kernel branch.
- Instead, you should use Git directly to discover the changes in a branch.
- Using Git is an efficient and flexible way to inspect changes to the kernel.
+ To see the features and configurations for a particular Yocto
+ Linux kernel, you need to examine the
+ <filename>yocto-kernel-cache</filename> Git repository.
+ As mentioned, branches in the
+ <filename>yocto-kernel-cache</filename> repository correspond to
+ Yocto Linux kernel versions (e.g. <filename>yocto-4.12</filename>).
+ Branches contain descriptions in the form of
+ <filename>.scc</filename> and <filename>.cfg</filename> files.
+ </para>
+
+ <para>
+ You should realize, however, that browsing your local
+ <filename>yocto-kernel-cache</filename> repository for feature
+ descriptions and patches is not an effective way to determine what
+ is in a particular kernel branch.
+ Instead, you should use Git directly to discover the changes in
+ a branch.
+ Using Git is an efficient and flexible way to inspect changes to
+ the kernel.
<note>
- Ground up reconstruction of the complete kernel tree is an action only taken by the
- Yocto Project team during an active development cycle.
- When you create a clone of the kernel Git repository, you are simply making it
- efficiently available for building and development.
+ Ground up reconstruction of the complete kernel tree is an
+ action only taken by the Yocto Project team during an active
+ development cycle.
+ When you create a clone of the kernel Git repository, you are
+ simply making it efficiently available for building and
+ development.
</note>
</para>
+
<para>
- The following steps describe what happens when the Yocto Project Team constructs
- the Yocto Project kernel source Git repository (or tree) found at
+ The following steps describe what happens when the Yocto Project
+ Team constructs the Yocto Project kernel source Git repository
+ (or tree) found at
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the
introduction of a new top-level kernel feature or BSP.
- These are the actions that effectively create the tree
- that includes the new feature, patch or BSP:
+ These are the actions that effectively provide the Metadata
+ and create the tree that includes the new feature, patch or BSP:
<orderedlist>
- <listitem><para>A top-level kernel feature is passed to the kernel build subsystem.
- Normally, this feature is a BSP for a particular kernel type.</para></listitem>
- <listitem><para>The file that describes the top-level feature is located by searching
- these system directories:
+ <listitem><para>
+ <emphasis>Pass Feature to Build Subsystem:</emphasis>
+ A top-level kernel feature is passed to the kernel build
+ subsystem.
+ Normally, this feature is a BSP for a particular kernel
+ type.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Locate Feature:</emphasis>
+ The file that describes the top-level feature is located
+ by searching these system directories:
<itemizedlist>
- <listitem><para>The in-tree kernel-cache directories, which are located
- in <filename>meta/cfg/kernel-cache</filename></para></listitem>
- <listitem><para>Areas pointed to by <filename>SRC_URI</filename> statements
- found in recipes</para></listitem>
+ <listitem><para>
+ The in-tree kernel-cache directories, which are
+ located in the
+ <filename>yocto-kernel-cache</filename>
+ repository
+ </para></listitem>
+ <listitem><para>
+ Areas pointed to by <filename>SRC_URI</filename>
+ statements found in kernel recipes
+ </para></listitem>
</itemizedlist>
For a typical build, the target of the search is a
feature description in an <filename>.scc</filename> file
@@ -91,41 +153,96 @@
<replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
</literallayout>
</para></listitem>
- <listitem><para>Once located, the feature description is either compiled into a simple script
- of actions, or into an existing equivalent script that is already part of the
- shipped kernel.</para></listitem>
- <listitem><para>Extra features are appended to the top-level feature description.
+ <listitem><para>
+ <emphasis>Expand Feature:</emphasis>
+ Once located, the feature description is either expanded
+ into a simple script of actions, or into an existing
+ equivalent script that is already part of the shipped
+ kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Append Extra Features:</emphasis>
+ Extra features are appended to the top-level feature
+ description.
These features can come from the
<ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
- variable in recipes.</para></listitem>
- <listitem><para>Each extra feature is located, compiled and appended to the script
- as described in step three.</para></listitem>
- <listitem><para>The script is executed to produce a series of <filename>meta-*</filename>
- directories.
- These directories are descriptions of all the branches, tags, patches and configurations that
- need to be applied to the base Git repository to completely create the
- source (build) branch for the new BSP or feature.</para></listitem>
- <listitem><para>The base repository is cloned, and the actions
- listed in the <filename>meta-*</filename> directories are applied to the
- tree.</para></listitem>
- <listitem><para>The Git repository is left with the desired branch checked out and any
- required branching, patching and tagging has been performed.</para></listitem>
+ variable in recipes.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Locate, Expand, and Append Each Feature:</emphasis>
+ Each extra feature is located, expanded and appended to
+ the script as described in step three.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Execute the Script:</emphasis>
+ The script is executed to produce files
+ <filename>.scc</filename> and <filename>.cfg</filename>
+ files in appropriate directories of the
+ <filename>yocto-kernel-cache</filename> repository.
+ These files are descriptions of all the branches, tags,
+ patches and configurations that need to be applied to the
+ base Git repository to completely create the
+ source (build) branch for the new BSP or feature.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Clone Base Repository:</emphasis>
+ The base repository is cloned, and the actions
+ listed in the <filename>yocto-kernel-cache</filename>
+ directories are applied to the tree.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Perform Cleanup:</emphasis>
+ The Git repositories are left with the desired branches
+ checked out and any required branching, patching and
+ tagging has been performed.
+ </para></listitem>
</orderedlist>
</para>
+
<para>
- The kernel tree is now ready for developer consumption to be locally cloned,
- configured, and built into a Yocto Project kernel specific to some target hardware.
- <note><para>The generated <filename>meta-*</filename> directories add to the kernel
- as shipped with the Yocto Project release.
- Any add-ons and configuration data are applied to the end of an existing branch.
- The full repository generation that is found in the
- official Yocto Project kernel repositories at
- <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>http://git.yoctoproject.org/cgit.cgi</ulink>
- is the combination of all supported boards and configurations.</para>
- <para>The technique the Yocto Project team uses is flexible and allows for seamless
- blending of an immutable history with additional patches specific to a
- deployment.
- Any additions to the kernel become an integrated part of the branches.</para>
+ The kernel tree and cache are ready for developer consumption to
+ be locally cloned, configured, and built into a Yocto Project
+ kernel specific to some target hardware.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ The generated <filename>yocto-kernel-cache</filename>
+ repository adds to the kernel as shipped with the Yocto
+ Project release.
+ Any add-ons and configuration data are applied to the
+ end of an existing branch.
+ The full repository generation that is found in the
+ official Yocto Project kernel repositories at
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>http://git.yoctoproject.org/cgit.cgi</ulink>
+ is the combination of all supported boards and
+ configurations.
+ </para></listitem>
+ <listitem><para>
+ The technique the Yocto Project team uses is flexible
+ and allows for seamless blending of an immutable
+ history with additional patches specific to a
+ deployment.
+ Any additions to the kernel become an integrated part
+ of the branches.
+ </para></listitem>
+ <listitem><para>
+ The full kernel tree that you see on
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> is
+ generated through repeating the above steps for all
+ valid BSPs.
+ The end result is a branched, clean history tree that
+ makes up the kernel for a given release.
+ You can see the script (<filename>kgit-scc</filename>)
+ responsible for this in the
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi/yocto-kernel-tools/tree/tools'><filename>yocto-kernel-tools</filename></ulink>
+ repository.
+ </para></listitem>
+ <listitem><para>
+ The steps used to construct the full kernel tree are
+ the same steps that BitBake uses when it builds a
+ kernel image.
+ </para></listitem>
+ </itemizedlist>
</note>
</para>
</section>
@@ -133,85 +250,100 @@
<section id='build-strategy'>
<title>Build Strategy</title>
-<!--
<para>
- <emphasis>AR - Darren Hart:</emphasis> Some parts of this section
- need to be in the
- "<link linkend='using-an-iterative-development-process'>Using an Iterative Development Process</link>"
- section.
- Darren needs to figure out which parts and identify them.
- </para>
--->
-
- <para>
- Once a local Git repository of the Yocto Project kernel exists on a development system,
- you can consider the compilation phase of kernel development - building a kernel image.
- Some prerequisites exist that are validated by the build process before compilation
- starts:
+ Once you have cloned a Yocto Linux kernel repository and the
+ cache repository (<filename>yocto-kernel-cache</filename>) onto
+ your development system, you can consider the compilation phase
+ of kernel development, which is building a kernel image.
+ Some prerequisites exist that are validated by the build process
+ before compilation starts:
</para>
<itemizedlist>
- <listitem><para>The
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> points
- to the kernel Git repository.</para></listitem>
- <listitem><para>A BSP build branch exists.
- This branch has the following form:
+ <listitem><para>
+ The
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+ points to the kernel Git repository.
+ </para></listitem>
+ <listitem><para>
+ A BSP build branch with Metadata exists in the
+ <filename>yocto-kernel-cache</filename> repository.
+ The branch is based on the Yocto Linux kernel version and
+ has configurations and features grouped under the
+ <filename>yocto-kernel-cache/bsp</filename> directory.
+ For example, features and configurations for the
+ BeagleBone Board assuming a
+ <filename>linux-yocto_4.12</filename> kernel reside in the
+ following area of the <filename>yocto-kernel-cache</filename>
+ repository:
<literallayout class='monospaced'>
- <replaceable>kernel_type</replaceable>/<replaceable>bsp_name</replaceable>
- </literallayout></para></listitem>
+ yocto-kernel-cache/bsp/beaglebone
+ </literallayout>
+ <note>
+ In the previous example, the "yocto-4.12" branch is
+ checked out in the <filename>yocto-kernel-cache</filename>
+ repository.
+ </note>
+ </para></listitem>
</itemizedlist>
<para>
- The OpenEmbedded build system makes sure these conditions exist before attempting compilation.
+ The OpenEmbedded build system makes sure these conditions exist
+ before attempting compilation.
Other means, however, do exist, such as as bootstrapping a BSP.
</para>
<para>
Before building a kernel, the build process verifies the tree
and configures the kernel by processing all of the
- configuration "fragments" specified by feature descriptions in the <filename>.scc</filename>
- files.
- As the features are compiled, associated kernel configuration fragments are noted
- and recorded in the <filename>meta-*</filename> series of directories in their compilation order.
- The fragments are migrated, pre-processed and passed to the Linux Kernel
- Configuration subsystem (<filename>lkc</filename>) as raw input in the form
- of a <filename>.config</filename> file.
- The <filename>lkc</filename> uses its own internal dependency constraints to do the final
- processing of that information and generates the final <filename>.config</filename> file
- that is used during compilation.
+ configuration "fragments" specified by feature descriptions
+ in the <filename>.scc</filename> files.
+ As the features are compiled, associated kernel configuration
+ fragments are noted and recorded in the series of directories
+ in their compilation order.
+ The fragments are migrated, pre-processed and passed to the
+ Linux Kernel Configuration subsystem (<filename>lkc</filename>) as
+ raw input in the form of a <filename>.config</filename> file.
+ The <filename>lkc</filename> uses its own internal dependency
+ constraints to do the final processing of that information and
+ generates the final <filename>.config</filename> file that is used
+ during compilation.
</para>
<para>
- Using the board's architecture and other relevant values from the board's template,
- kernel compilation is started and a kernel image is produced.
+ Using the board's architecture and other relevant values from
+ the board's template, kernel compilation is started and a kernel
+ image is produced.
</para>
<para>
The other thing that you notice once you configure a kernel is that
- the build process generates a build tree that is separate from your kernel's local Git
- source repository tree.
+ the build process generates a build tree that is separate from
+ your kernel's local Git source repository tree.
This build tree has a name that uses the following form, where
- <filename>${MACHINE}</filename> is the metadata name of the machine (BSP) and "kernel_type" is one
- of the Yocto Project supported kernel types (e.g. "standard"):
+ <filename>${MACHINE}</filename> is the metadata name of the
+ machine (BSP) and "kernel_type" is one of the Yocto Project
+ supported kernel types (e.g. "standard"):
<literallayout class='monospaced'>
linux-${MACHINE}-<replaceable>kernel_type</replaceable>-build
</literallayout>
</para>
<para>
- The existing support in the <filename>kernel.org</filename> tree achieves this
- default functionality.
+ The existing support in the <filename>kernel.org</filename> tree
+ achieves this default functionality.
</para>
<para>
- This behavior means that all the generated files for a particular machine or BSP are now in
- the build tree directory.
- The files include the final <filename>.config</filename> file, all the <filename>.o</filename>
- files, the <filename>.a</filename> files, and so forth.
+ This behavior means that all the generated files for a particular
+ machine or BSP are now in the build tree directory.
+ The files include the final <filename>.config</filename> file,
+ all the <filename>.o</filename> files, the <filename>.a</filename>
+ files, and so forth.
Since each machine or BSP has its own separate
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- in its own separate branch
- of the Git repository, you can easily switch between different builds.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ in its own separate branch of the Git repository, you can easily
+ switch between different builds.
</para>
</section>
</appendix>
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-style.css b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-style.css
index 6e0c1c7fc9..9c01aa7983 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-style.css
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev-style.css
@@ -730,6 +730,10 @@ div.navfooter {
border-color: black;
}
+.writernotes {
+ color: red;
+}
+
/*********** /
/ graphics /
diff --git a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml
index 28a3364084..ec36d24491 100644
--- a/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml
+++ b/import-layers/yocto-poky/documentation/kernel-dev/kernel-dev.xml
@@ -22,11 +22,11 @@
<authorgroup>
<author>
- <firstname>Darren</firstname> <surname>Hart</surname>
+ <firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
- <email>darren.hart@intel.com</email>
+ <email>srifenbark@gmail.com</email>
</author>
</authorgroup>
@@ -82,24 +82,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -116,30 +111,31 @@
<note><title>Manual Notes</title>
<itemizedlist>
<listitem><para>
- For the latest version of the Yocto Project Linux
- Kernel Development Manual associated with this Yocto
- Project release (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Linux Kernel Development
- Manual from the
+ This version of the
+ <emphasis>Yocto Project Linux Kernel Development Manual</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
</para></listitem>
<listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
+ For manuals associated with other releases of the Yocto
+ Project, go to the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
+ and choose the manual associated with the desired
+ Yocto Project.
</para></listitem>
<listitem><para>
- For an in-development version of the Yocto Project
- Linux Kernel Development Manual, see
- <ulink url='&YOCTO_DOCS_URL;/latest/kernel-dev/kernel-dev.html'></ulink>.
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
</para></listitem>
- </itemizedlist>
- </note>
+ </itemizedlist>
+ </note>
</legalnotice>
</bookinfo>
@@ -154,10 +150,6 @@
<xi:include href="kernel-dev-maint-appx.xml"/>
-<!--
- <xi:include href="kernel-dev-examples.xml"/>
--->
-
<xi:include href="kernel-dev-faq.xml"/>
<!-- <index id='index'>
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/yocto-environment.png b/import-layers/yocto-poky/documentation/mega-manual/figures/YP-flow-diagram.png
index 35969038c9..35969038c9 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/yocto-environment.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/YP-flow-diagram.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/bitbake-build-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/bitbake-build-flow.png
new file mode 100644
index 0000000000..eb95eb3da0
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/bitbake-build-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png
index 540b0abb9f..0f82a1f67e 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/bsp-dev-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/dev-title.png b/import-layers/yocto-poky/documentation/mega-manual/figures/dev-title.png
index d3cac4a7e5..15e67d0744 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/dev-title.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/dev-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.png
deleted file mode 100644
index c09e60e355..0000000000
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.png
deleted file mode 100644
index cd7f4d05b1..0000000000
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.png
deleted file mode 100644
index d25168c840..0000000000
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/index-downloads.png b/import-layers/yocto-poky/documentation/mega-manual/figures/index-downloads.png
index c907997db2..96303b8781 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/index-downloads.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/index-downloads.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-dev-flow.png b/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-dev-flow.png
index 009105d122..793a395e8f 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-dev-flow.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-dev-flow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-overview-2-generic.png b/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-overview-2-generic.png
index cb970eae7c..ee2cdb206b 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-overview-2-generic.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/kernel-overview-2-generic.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-title.png b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-title.png
index e9d5b346bb..e69e03935a 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-title.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/sdk-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/figures/source-repos.png b/import-layers/yocto-poky/documentation/mega-manual/figures/source-repos.png
index 65c5f29a43..e9cff16cc8 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/figures/source-repos.png
+++ b/import-layers/yocto-poky/documentation/mega-manual/figures/source-repos.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml b/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml
index d06f851374..a941d799a1 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml
+++ b/import-layers/yocto-poky/documentation/mega-manual/mega-manual.xml
@@ -33,7 +33,7 @@
<author>
<firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
<email>srifenbark@gmail.com</email>
</author>
@@ -66,24 +66,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -100,27 +95,29 @@
<note><title>Manual Notes</title>
<itemizedlist>
<listitem><para>
- For the latest version of the Yocto Project
- Mega-Manual associated with this Yocto Project release
- (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Mega-Manual from the
+ This version of the
+ <emphasis>Yocto Project Mega-Manual</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
</para></listitem>
<listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
+ For manuals associated with other releases of the Yocto
+ Project, go to the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
+ and choose the manual associated with the desired
+ Yocto Project.
</para></listitem>
<listitem><para>
- For an in-development version of the Yocto Project
- Mega-Manual, see
- <ulink url='&YOCTO_DOCS_URL;/latest/mega-manual/mega-manual.html'></ulink>.
- </para></listitem>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
+ </para></listitem>
</itemizedlist>
</note>
@@ -146,8 +143,6 @@
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-newbie.xml"/>
<xi:include
- xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-model.xml"/>
- <xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-common-tasks.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-qemu.xml"/>
@@ -167,6 +162,8 @@
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-working-projects.xml"/>
<xi:include
+ xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-eclipse-project.xml"/>
+ <xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-obtain.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-customizing.xml"/>
@@ -229,7 +226,7 @@
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/usingpoky.xml"/>
<xi:include
- xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/closer-look.xml"/>
+ xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-development-environment.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/technical-details.xml"/>
@@ -253,6 +250,9 @@
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-devtool-reference.xml"/>
<xi:include
+ xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-kickstart.xml"/>
+
+ <xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-qa-checks.xml"/>
<xi:include
diff --git a/import-layers/yocto-poky/documentation/mega-manual/mega-style.css b/import-layers/yocto-poky/documentation/mega-manual/mega-style.css
index df71a20a02..cd71eb6425 100644
--- a/import-layers/yocto-poky/documentation/mega-manual/mega-style.css
+++ b/import-layers/yocto-poky/documentation/mega-manual/mega-style.css
@@ -731,6 +731,11 @@ div.navfooter {
}
+.writernotes {
+ color: red;
+}
+
+
/*********** /
/ graphics /
/ ***********/
diff --git a/import-layers/yocto-poky/documentation/poky.ent b/import-layers/yocto-poky/documentation/poky.ent
index 14d67e5746..db3eef0862 100644
--- a/import-layers/yocto-poky/documentation/poky.ent
+++ b/import-layers/yocto-poky/documentation/poky.ent
@@ -1,10 +1,13 @@
-<!ENTITY DISTRO "2.3.4">
-<!ENTITY DISTRO_COMPRESSED "234">
-<!ENTITY DISTRO_NAME_NO_CAP "pyro">
-<!ENTITY DISTRO_NAME "Pyro">
-<!ENTITY YOCTO_DOC_VERSION "2.3.4">
-<!ENTITY POKYVERSION "18.0.4">
-<!ENTITY POKYVERSION_COMPRESSED "1804">
+<!ENTITY DISTRO "2.4.2">
+<!ENTITY DISTRO_COMPRESSED "242">
+<!ENTITY DISTRO_NAME_NO_CAP "rocko">
+<!ENTITY DISTRO_NAME "Rocko">
+<!ENTITY YOCTO_DOC_VERSION "2.4.2">
+<!ENTITY DISTRO_REL_TAG "yocto-2.4.2">
+<!ENTITY METAINTELVERSION "8.0">
+<!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;">
+<!ENTITY POKYVERSION "19.0.2">
+<!ENTITY POKYVERSION_COMPRESSED "1902">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;">
<!ENTITY COPYRIGHT_YEAR "2010-2018">
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
diff --git a/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml b/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml
index b668fd47ad..f742e88718 100644
--- a/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml
+++ b/import-layers/yocto-poky/documentation/profile-manual/profile-manual.xml
@@ -22,11 +22,11 @@
<authorgroup>
<author>
- <firstname>Tom</firstname> <surname>Zanussi</surname>
+ <firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
- <email>tom.zanussi@intel.com</email>
+ <email>srifenbark@gmail.com</email>
</author>
</authorgroup>
@@ -82,24 +82,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -115,34 +110,34 @@
Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
Creative Commons.
</para>
-
- <note><title>Manual Notes</title>
- <itemizedlist>
- <listitem><para>
- For the latest version of the Yocto Project Profiling
- and Tracing Manual associated with this Yocto Project
- release (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Profiling and Tracing Manual
- from the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
- </para></listitem>
- <listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
- and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
- </para></listitem>
- <listitem><para>
- For an in-development version of the Yocto Project
- Profiling and Tracing Manual, see
- <ulink url='&YOCTO_DOCS_URL;/latest/profile-manual/profile-manual.html'></ulink>.
+ <note><title>Manual Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ This version of the
+ <emphasis>Yocto Project Profiling and Tracing Manual</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
+ </para></listitem>
+ <listitem><para>
+ For manuals associated with other releases of the Yocto
+ Project, go to the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+ and use the drop-down "Active Releases" button
+ and choose the manual associated with the desired
+ Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
</para></listitem>
- </itemizedlist>
- </note>
+ </itemizedlist>
+ </note>
</legalnotice>
</bookinfo>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/faq.xml b/import-layers/yocto-poky/documentation/ref-manual/faq.xml
index 5f3f173495..11dfc5b13e 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/faq.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/faq.xml
@@ -13,11 +13,11 @@
</question>
<answer>
<para>
- The term "<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>"
+ The term "<link link='poky'>Poky</link>"
refers to the specific reference build system that
the Yocto Project provides.
- Poky is based on <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink>
- and <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
+ Poky is based on <link linkend='oe-core'>OE-Core</link>
+ and <link linkend='bitbake-term'>BitBake</link>.
Thus, the generic term used here for the build system is
the "OpenEmbedded build system."
Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
@@ -60,7 +60,7 @@
There are three areas that help with stability;
<itemizedlist>
<listitem><para>The Yocto Project team keeps
- <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
+ <link linkend='oe-core'>OE-Core</link> small
and focused, containing around 830 recipes as opposed to the thousands
available in other OpenEmbedded community layers.
Keeping it small makes it easy to test and maintain.</para></listitem>
@@ -86,7 +86,7 @@
Board Support Package (BSP) layer for it.
For more information on how to create a BSP layer, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
- section in the Yocto Project Development Manual and the
+ section in the Yocto Project Development Tasks Manual and the
<ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
</para>
<para>
@@ -143,7 +143,7 @@
To add a package, you need to create a BitBake recipe.
For information on how to create a BitBake recipe, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe'>Writing a New Recipe</ulink>"
- in the Yocto Project Development Manual.
+ in the Yocto Project Development Tasks Manual.
</para>
</answer>
</qandaentry>
@@ -235,8 +235,9 @@
<qandaentry>
<question>
<para>
- I see lots of 404 responses for files on
- <filename>&YOCTO_HOME_URL;/sources/*</filename>. Is something wrong?
+ I see lots of 404 responses for files when the OpenEmbedded
+ build system is trying to download sources.
+ Is something wrong?
</para>
</question>
<answer>
@@ -416,9 +417,9 @@
<para>
You can find more information on licensing in the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#licensing'>Licensing</ulink>"
- and "<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>"
- sections, both of which are in the Yocto Project Development
+ "<link linkend='licensing'>Licensing</link>" section and in the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
+ section, which is in the Yocto Project Development Tasks
Manual.
</para>
</answer>
@@ -547,7 +548,7 @@
file to include from the
<filename>meta/conf/distro/include</filename> directory within
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
<para>
@@ -699,10 +700,9 @@
When you use BitBake to build an image, all the build output
goes into the directory created when you run the
build environment setup script (i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
- By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
+ By default, this
+ <link linkend='build-directory'>Build Directory</link>
is named <filename>build</filename> but can be named
anything you want.
</para>
@@ -765,7 +765,7 @@
<para>
Meanwhile, <filename>DESTDIR</filename> is a path within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
However, when the recipe builds a native program (i.e. one
that is intended to run on the build machine), that program
is never installed directly to the build machine's root
@@ -810,7 +810,7 @@
<para>
This situation results when a build system does
not recognize the environment variables supplied to it by
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
+ <link linkend='bitbake-term'>BitBake</link>.
The incident that prompted this FAQ entry involved a Makefile
that used an environment variable named
<filename>BINDIR</filename> instead of the more standard
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/YP-flow-diagram.png b/import-layers/yocto-poky/documentation/ref-manual/figures/YP-flow-diagram.png
new file mode 100644
index 0000000000..8264410504
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/ref-manual/figures/YP-flow-diagram.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/git-workflow.png b/import-layers/yocto-poky/documentation/ref-manual/figures/git-workflow.png
index e401330a12..e401330a12 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/git-workflow.png
+++ b/import-layers/yocto-poky/documentation/ref-manual/figures/git-workflow.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/index-downloads.png b/import-layers/yocto-poky/documentation/ref-manual/figures/index-downloads.png
new file mode 100644
index 0000000000..96303b8781
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/ref-manual/figures/index-downloads.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.png b/import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.png
new file mode 100644
index 0000000000..e9cff16cc8
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/ref-manual/figures/source-repos.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/dev-manual/figures/yp-download.png b/import-layers/yocto-poky/documentation/ref-manual/figures/yp-download.png
index 5770be6883..5770be6883 100644
--- a/import-layers/yocto-poky/documentation/dev-manual/figures/yp-download.png
+++ b/import-layers/yocto-poky/documentation/ref-manual/figures/yp-download.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/ref-manual/introduction.xml b/import-layers/yocto-poky/documentation/ref-manual/introduction.xml
index eec6cb34f1..29ef2d5503 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/introduction.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/introduction.xml
@@ -5,118 +5,159 @@
<chapter id='ref-manual-intro'>
<title>Introduction</title>
-<section id='intro-welcome'>
- <title>Introduction</title>
+<section id='ref-welcome'>
+ <title>Welcome</title>
<para>
+ Welcome to the Yocto Project Reference Manual.
This manual provides reference information for the current release
of the Yocto Project.
- The Yocto Project is an open-source collaboration project focused
- on embedded Linux developers.
- Amongst other things, the Yocto Project uses the OpenEmbedded build
- system, which is based on the Poky project, to construct complete
- Linux images.
- You can find complete introductory and getting started information
- on the Yocto Project by reading the
- <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+ This manual is best used after you have an understanding
+ of the basics of the Yocto Project.
+ The manual is neither meant to be read as a starting point to the
+ Yocto Project nor read from start to finish.
+ Use this manual to find concepts, variable definitions, class
+ descriptions, and so forth as needed during the course of using
+ the Yocto Project.
</para>
<para>
- For task-based information using the Yocto Project, see the
- <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>
- and the <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
- For Board Support Package (BSP) structure information, see the
- <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
- For information on how to use a Software Development Kit, (SDK), see the
- <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
- You can find information on tracing and profiling in the
- <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
- For information on BitBake, which is the task execution tool the
- OpenEmbedded build system is based on, see the
- <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
- Finally, you can also find lots of Yocto Project information on the
- <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
+ For introductory information on the Yocto Project, see the
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and the
+ "<link linkend='yp-intro'>Introducing the Yocto Project Development Environment</link>"
+ section.
</para>
-</section>
-<section id='intro-manualoverview'>
- <title>Documentation Overview</title>
<para>
- This reference manual consists of the following:
- <itemizedlist>
- <listitem><para><emphasis>
- <link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
- Provides an overview of the components that make up the Yocto Project
- followed by information about debugging images created in the Yocto Project.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>:</emphasis>
- Provides a more detailed look at the Yocto Project development
- environment within the context of development.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='technical-details'>Technical Details</link>:</emphasis>
- Describes fundamental Yocto Project components as well as an explanation
- behind how the Yocto Project uses shared state (sstate) cache to speed build time.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='migration'>Migrating to a Newer Yocto Project Release</link>:</emphasis>
- Describes release-specific information that helps you move from
- one Yocto Project Release to another.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-structure'>Directory Structure</link>:</emphasis>
- Describes the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> created
- either by unpacking a released Yocto Project tarball on your host development system,
- or by cloning the upstream
- <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-classes'>Classes</link>:</emphasis>
- Describes the classes used in the Yocto Project.</para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-tasks'>Tasks</link>:</emphasis>
- Describes the tasks defined by the OpenEmbedded build system.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-devtool-reference'><filename>devtool</filename> Quick Reference</link>:</emphasis>
- Provides a quick reference for the <filename>devtool</filename>
- command.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-qa-checks'>QA Error and Warning Messages</link>:</emphasis>
- Lists and describes QA warning and error messages.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-images'>Images</link>:</emphasis>
- Describes the standard images that the Yocto Project supports.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-features'>Features</link>:</emphasis>
- Describes mechanisms for creating distribution, machine, and image
- features during the build process using the OpenEmbedded build system.</para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
- Presents most variables used by the OpenEmbedded build system, which
- uses BitBake.
- Entries describe the function of the variable and how to apply them.
- </para></listitem>
- <listitem><para><emphasis>
- <link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
- Provides variable locality or context.</para></listitem>
- <listitem><para><emphasis>
- <link linkend='faq'>FAQ</link>:</emphasis>
- Provides answers for commonly asked questions in the Yocto Project
- development environment.</para></listitem>
- <listitem><para><emphasis>
- <link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
- Provides guidance on how you can contribute back to the Yocto
- Project.</para></listitem>
- </itemizedlist>
+ If you want to use the Yocto Project to test run building an image
+ without having to understand concepts, work through the
+ <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+ You can find "how-to" information in the
+ <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>.
+ <note><title>Tip</title>
+ For more information about the Yocto Project Documentation set,
+ see the
+ "<link linkend='resources-links-and-related-documentation'>Links and Related Documentation</link>"
+ section.
+ </note>
</para>
</section>
+<section id='yp-intro'>
+ <title>Introducing the Yocto Project Development Environment</title>
+
+ <para>
+ The Yocto Project is an open-source collaboration project whose
+ focus is for developers of embedded Linux systems.
+ Among other things, the Yocto Project uses an
+ <link linkend='build-system-term'>OpenEmbedded build system</link>.
+ The build system, which is based on the OpenEmbedded (OE) project and
+ uses the
+ <link linkend='bitbake-term'>BitBake</link> tool, constructs complete
+ Linux images for architectures based on ARM, MIPS, PowerPC, x86 and
+ x86-64.
+ <note>
+ Historically, the OpenEmbedded build system, which is the
+ combination of BitBake and OE components, formed a reference
+ build host that was known as
+ "<link linkend='poky'>Poky</link>" (<emphasis>Pah</emphasis>-kee).
+ The term "Poky", as used throughout the Yocto Project Documentation
+ set, can have different meanings.
+ </note>
+ The Yocto Project provides various ancillary tools for the embedded
+ developer and also features the Sato reference User Interface, which
+ is optimized for stylus-driven, low-resolution screens.
+ </para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/YP-flow-diagram.png"
+ format="PNG" align='center' width="8in"/>
+ </imageobject>
+ </mediaobject>
+
+ <para>
+ Here are some highlights for the Yocto Project:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>
+ Provides a recent Linux kernel along with a set of system
+ commands and libraries suitable for the embedded
+ environment.
+ </para></listitem>
+ <listitem><para>
+ Makes available system components such as X11, GTK+, Qt,
+ Clutter, and SDL (among others) so you can create a rich user
+ experience on devices that have display hardware.
+ For devices that do not have a display or where you wish to
+ use alternative UI frameworks, these components need not be
+ installed.
+ </para></listitem>
+ <listitem><para>
+ Creates a focused and stable core compatible with the
+ OpenEmbedded project with which you can easily and reliably
+ build and develop.
+ </para></listitem>
+ <listitem><para>
+ Fully supports a wide range of hardware and device emulation
+ through the Quick EMUlator (QEMU).
+ </para></listitem>
+ <listitem><para>
+ Provides a layer mechanism that allows you to easily extend
+ the system, make customizations, and keep them organized.
+ </para></listitem>
+ </itemizedlist>
+
+ <para>
+ You can use the Yocto Project to generate images for many kinds
+ of devices.
+ As mentioned earlier, the Yocto Project supports creation of
+ reference images that you can boot within and emulate using QEMU.
+ The standard example machines target QEMU full-system
+ emulation for 32-bit and 64-bit variants of x86, ARM, MIPS, and
+ PowerPC architectures.
+ Beyond emulation, you can use the layer mechanism to extend
+ support to just about any platform that Linux can run on and that
+ a toolchain can target.
+ </para>
+
+ <para>
+ Another Yocto Project feature is the Sato reference User
+ Interface.
+ This optional UI that is based on GTK+ is intended for devices with
+ restricted screen sizes and is included as part of the
+ OpenEmbedded Core layer so that developers can test parts of the
+ software stack.
+ </para>
+
+ <para>
+ While the Yocto Project does not provide a strict testing framework,
+ it does provide or generate for you artifacts that let you perform
+ target-level and emulated testing and debugging.
+ Additionally, if you are an
+ <trademark class='trade'>Eclipse</trademark> IDE user, you can
+ install an Eclipse Yocto Plug-in to allow you to develop within that
+ familiar environment.
+ </para>
+
+ <para>
+ By default, using the Yocto Project to build an image creates a Poky
+ distribution.
+ However, you can create your own distribution by providing key
+ <link link='metadata'>Metadata</link>.
+ A good example is Angstrom, which has had a distribution
+ based on the Yocto Project since its inception.
+ Other examples include commercial distributions like
+ <ulink url='https://www.yoctoproject.org/organization/wind-river-systems'>Wind River Linux</ulink>,
+ <ulink url='https://www.yoctoproject.org/organization/mentor-graphics'>Mentor Embedded Linux</ulink>,
+ <ulink url='https://www.yoctoproject.org/organization/enea-ab'>ENEA Linux</ulink>
+ and <ulink url='https://www.yoctoproject.org/ecosystem/member-organizations'>others</ulink>.
+ See the "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-your-own-distribution'>Creating Your Own Distribution</ulink>"
+ section in the Yocto Project Development Tasks Manual for more
+ information.
+ </para>
+</section>
<section id='intro-requirements'>
<title>System Requirements</title>
@@ -163,12 +204,12 @@
<listitem><para>Ubuntu 10.04</para></listitem>
<listitem><para>Ubuntu 11.10</para></listitem>
<listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
- <listitem><para>Ubuntu 13.10</para></listitem> -->
- <listitem><para>Ubuntu 14.04 (LTS)</para></listitem>
+ <listitem><para>Ubuntu 13.10</para></listitem>
+ <listitem><para>Ubuntu 14.04 (LTS)</para></listitem> -->
<listitem><para>Ubuntu 14.10</para></listitem>
<listitem><para>Ubuntu 15.04</para></listitem>
<listitem><para>Ubuntu 15.10</para></listitem>
- <listitem><para>Ubuntu 16.04</para></listitem>
+ <listitem><para>Ubuntu 16.04 (LTS)</para></listitem>
<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
<listitem><para>Fedora 17 (Spherical)</para></listitem>
<listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
@@ -185,6 +226,7 @@
<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem>
<listitem><para>Debian GNU/Linux 7.x (Wheezy)</para></listitem> -->
<listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem>
+ <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem>
<!-- <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
@@ -413,7 +455,7 @@
Python:
<itemizedlist>
<listitem><para>Git 1.8.3.1 or greater</para></listitem>
- <listitem><para>tar 1.24 or greater</para></listitem>
+ <listitem><para>tar 1.27 or greater</para></listitem>
<listitem><para>Python 3.4.0 or greater</para></listitem>
</itemizedlist>
</para>
@@ -492,9 +534,7 @@
On the machine that is able to run BitBake,
be sure you have set up your build environment with
the setup script
- (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
</para></listitem>
<listitem><para>
Run the BitBake command to build the tarball:
@@ -512,7 +552,7 @@
<filename>.sh</filename> file that installs
the tools in the <filename>tmp/deploy/sdk</filename>
subdirectory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
The installer file has the string "buildtools"
in the name.
</para></listitem>
@@ -600,12 +640,441 @@
<title>Development Checkouts</title>
<para>
Development using the Yocto Project requires a local
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
You can set up the Source Directory by cloning a copy of the upstream
- <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>poky</ulink> Git repository.
+ <link linkend='poky'>poky</link> Git repository.
For information on how to do this, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
- section in the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para>
+</section>
+
+<section id='yocto-project-terms'>
+ <title>Yocto Project Terms</title>
+
+ <para>
+ Following is a list of terms and definitions users new to the Yocto
+ Project development environment might find helpful.
+ While some of these terms are universal, the list includes them
+ just in case:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Append Files:</emphasis>
+ Files that append build information to a recipe file.
+ Append files are known as BitBake append files and
+ <filename>.bbappend</filename> files.
+ The OpenEmbedded build system expects every append file to have
+ a corresponding recipe (<filename>.bb</filename>) file.
+ Furthermore, the append file and corresponding recipe file
+ must use the same root filename.
+ The filenames can differ only in the file type suffix used
+ (e.g.
+ <filename>formfactor_0.0.bb</filename> and
+ <filename>formfactor_0.0.bbappend</filename>).</para>
+
+ <para>Information in append files extends or overrides the
+ information in the similarly-named recipe file.
+ For an example of an append file in use, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ <note>
+ Append files can also use wildcard patterns in their
+ version numbers so they can be applied to more than one
+ version of the underlying recipe file.
+ </note>
+ </para></listitem>
+ <listitem><para id='bitbake-term'>
+ <emphasis>BitBake:</emphasis>
+ The task executor and scheduler used by the OpenEmbedded build
+ system to build images.
+ For more information on BitBake, see the
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
+ </para></listitem>
+ <listitem><para id='board-support-package-bsp-term'>
+ <emphasis>Board Support Package (BSP):</emphasis>
+ A group of drivers, definitions, and other components that
+ provide support for a specific hardware configuration.
+ For more information on BSPs, see the
+ <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
+ </para></listitem>
+ <listitem>
+ <para id='build-directory'>
+ <emphasis>Build Directory:</emphasis>
+ This term refers to the area used by the OpenEmbedded build
+ system for builds.
+ The area is created when you <filename>source</filename> the
+ setup environment script that is found in the Source Directory
+ (i.e. <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
+ The
+ <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link>
+ variable points to the Build Directory.</para>
+
+ <para>You have a lot of flexibility when creating the Build
+ Directory.
+ Following are some examples that show how to create the
+ directory.
+ The examples assume your
+ <link linkend='source-directory'>Source Directory</link> is
+ named <filename>poky</filename>:
+ <itemizedlist>
+ <listitem><para>Create the Build Directory inside your
+ Source Directory and let the name of the Build
+ Directory default to <filename>build</filename>:
+ <literallayout class='monospaced'>
+ $ cd $HOME/poky
+ $ source &OE_INIT_FILE;
+ </literallayout>
+ </para></listitem>
+ <listitem><para>Create the Build Directory inside your
+ home directory and specifically name it
+ <filename>test-builds</filename>:
+ <literallayout class='monospaced'>
+ $ cd $HOME
+ $ source poky/&OE_INIT_FILE; test-builds
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Provide a directory path and specifically name the
+ Build Directory.
+ Any intermediate folders in the pathname must exist.
+ This next example creates a Build Directory named
+ <filename>YP-&POKYVERSION;</filename>
+ in your home directory within the existing
+ directory <filename>mybuilds</filename>:
+ <literallayout class='monospaced'>
+ $cd $HOME
+ $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
+ <note>
+ By default, the Build Directory contains
+ <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
+ which is a temporary directory the build system uses for
+ its work.
+ <filename>TMPDIR</filename> cannot be under NFS.
+ Thus, by default, the Build Directory cannot be under NFS.
+ However, if you need the Build Directory to be under NFS,
+ you can set this up by setting <filename>TMPDIR</filename>
+ in your <filename>local.conf</filename> file
+ to use a local drive.
+ Doing so effectively separates <filename>TMPDIR</filename>
+ from <filename>TOPDIR</filename>, which is the Build
+ Directory.
+ </note>
+ </para></listitem>
+ <listitem><para id='hardware-build-system-term'>
+ <emphasis>Build System:</emphasis>
+ The system used to build images in a Yocto Project
+ Development environment.
+ The build system is sometimes referred to as the
+ development host.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Classes:</emphasis>
+ Files that provide for logic encapsulation and inheritance so
+ that commonly used patterns can be defined once and then
+ easily used in multiple recipes.
+ For reference information on the Yocto Project classes, see the
+ "<link linkend='ref-classes'>Classes</link>" chapter.
+ Class files end with the <filename>.bbclass</filename>
+ filename extension.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Configuration File:</emphasis>
+ Configuration information in various <filename>.conf</filename>
+ files provides global definitions of variables.
+ The <filename>conf/local.conf</filename> configuration file in
+ the
+ <link linkend='build-directory'>Build Directory</link>
+ contains user-defined variables that affect every build.
+ The <filename>meta-poky/conf/distro/poky.conf</filename>
+ configuration file defines Yocto "distro" configuration
+ variables used only when building with this policy.
+ Machine configuration files, which
+ are located throughout the
+ <link linkend='source-directory'>Source Directory</link>, define
+ variables for specific hardware and are only used when building
+ for that target (e.g. the
+ <filename>machine/beaglebone.conf</filename> configuration
+ file defines variables for the Texas Instruments ARM Cortex-A8
+ development board).
+ Configuration files end with a <filename>.conf</filename>
+ filename extension.
+ </para></listitem>
+ <listitem><para id='cross-development-toolchain'>
+ <emphasis>Cross-Development Toolchain:</emphasis>
+ In general, a cross-development toolchain is a collection of
+ software development tools and utilities that run on one
+ architecture and allow you to develop software for a
+ different, or targeted, architecture.
+ These toolchains contain cross-compilers, linkers, and
+ debuggers that are specific to the target architecture.</para>
+
+ <para>The Yocto Project supports two different cross-development
+ toolchains:
+ <itemizedlist>
+ <listitem><para>
+ A toolchain only used by and within
+ BitBake when building an image for a target
+ architecture.
+ </para></listitem>
+ <listitem><para>A relocatable toolchain used outside of
+ BitBake by developers when developing applications
+ that will run on a targeted device.
+ </para></listitem>
+ </itemizedlist></para>
+
+ <para>Creation of these toolchains is simple and automated.
+ For information on toolchain concepts as they apply to the
+ Yocto Project, see the
+ "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
+ section.
+ You can also find more information on using the
+ relocatable toolchain in the
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Image:</emphasis>
+ An image is an artifact of the BitBake build process given
+ a collection of recipes and related Metadata.
+ Images are the binary output that run on specific hardware or
+ QEMU and are used for specific use-cases.
+ For a list of the supported image types that the Yocto Project
+ provides, see the
+ "<link linkend='ref-images'>Images</link>"
+ chapter.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Layer:</emphasis>
+ A collection of recipes representing the core,
+ a BSP, or an application stack.
+ For a discussion specifically on BSP Layers, see the
+ "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+ section in the Yocto Project Board Support Packages (BSP)
+ Developer's Guide.
+ </para></listitem>
+ <listitem><para id='metadata'>
+ <emphasis>Metadata:</emphasis>
+ The files that BitBake parses when building an image.
+ In general, Metadata includes recipes, classes, and
+ configuration files.
+ In the context of the kernel ("kernel Metadata"), the
+ term refers to the kernel config fragments and features
+ contained in the
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache'><filename>yocto-kernel-cache</filename></ulink>
+ Git repository.
+ </para></listitem>
+ <listitem><para id='oe-core'>
+ <emphasis>OE-Core:</emphasis>
+ A core set of Metadata originating with OpenEmbedded (OE)
+ that is shared between OE and the Yocto Project.
+ This Metadata is found in the <filename>meta</filename>
+ directory of the
+ <link linkend='source-directory'>Source Directory</link>.
+ </para></listitem>
+ <listitem><para id='build-system-term'>
+ <emphasis>OpenEmbedded Build System:</emphasis>
+ The build system specific to the Yocto Project.
+ The OpenEmbedded build system is based on another project known
+ as "Poky", which uses
+ <link linkend='bitbake-term'>BitBake</link> as the task
+ executor.
+ Throughout the Yocto Project documentation set, the
+ OpenEmbedded build system is sometimes referred to simply
+ as "the build system".
+ If other build systems, such as a host or target build system
+ are referenced, the documentation clearly states the
+ difference.
+ <note>
+ For some historical information about Poky, see the
+ <link linkend='poky'>Poky</link> term.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Package:</emphasis>
+ In the context of the Yocto Project, this term refers to a
+ recipe's packaged output produced by BitBake (i.e. a
+ "baked recipe").
+ A package is generally the compiled binaries produced from the
+ recipe's sources.
+ You "bake" something by running it through BitBake.</para>
+
+ <para>It is worth noting that the term "package" can,
+ in general, have subtle meanings.
+ For example, the packages referred to in the
+ "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>"
+ section in the Yocto Project Quick Start are compiled binaries
+ that, when installed, add functionality to your Linux
+ distribution.</para>
+
+ <para>Another point worth noting is that historically within
+ the Yocto Project, recipes were referred to as packages - thus,
+ the existence of several BitBake variables that are seemingly
+ mis-named,
+ (e.g. <link linkend='var-PR'><filename>PR</filename></link>,
+ <link linkend='var-PV'><filename>PV</filename></link>, and
+ <link linkend='var-PE'><filename>PE</filename></link>).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Package Groups:</emphasis>
+ Arbitrary groups of software Recipes.
+ You use package groups to hold recipes that, when built,
+ usually accomplish a single task.
+ For example, a package group could contain the recipes for a
+ company’s proprietary or value-add software.
+ Or, the package group could contain the recipes that enable
+ graphics.
+ A package group is really just another recipe.
+ Because package group files are recipes, they end with the
+ <filename>.bb</filename> filename extension.
+ </para></listitem>
+ <listitem><para id='poky'>
+ <emphasis>Poky:</emphasis>
+ The term "poky", which is pronounced
+ <emphasis>Pah</emphasis>-kee, can mean several things:
+ <itemizedlist>
+ <listitem><para>
+ In its most general sense, poky is an open-source
+ project that was initially developed by OpenedHand.
+ OpenedHand developed poky off of the existing
+ OpenEmbedded build system to create a commercially
+ supportable build system for embedded Linux.
+ After Intel Corporation acquired OpenedHand, the
+ poky project became the basis for the Yocto Project's
+ build system.
+ </para></listitem>
+ <listitem><para>
+ Within the Yocto Project
+ <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>,
+ "poky" exists as a separate Git
+ repository from which you can clone to yield a local
+ Git repository that is a copy on your host system.
+ Thus, "poky" can refer to the upstream or
+ local copy of the files used for development within
+ the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ Finally, "poky" can refer to the default
+ <link linkend='var-DISTRO'><filename>DISTRO</filename></link>
+ (i.e. distribution) created when you use the Yocto
+ Project in conjunction with the
+ <filename>poky</filename> repository to build an image.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Recipe:</emphasis>
+ A set of instructions for building packages.
+ A recipe describes where you get source code, which patches
+ to apply, how to configure the source, how to compile it and so on.
+ Recipes also describe dependencies for libraries or for other
+ recipes.
+ Recipes represent the logical unit of execution, the software
+ to build, the images to build, and use the
+ <filename>.bb</filename> file extension.
+ </para></listitem>
+ <listitem><para id='reference-kit-term'>
+ <emphasis>Reference Kit:</emphasis>
+ A working example of a system, which includes a
+ <link linkend='board-support-package-bsp-term'>BSP</link>
+ as well as a
+ <link linkend='hardware-build-system-term'>build system</link>
+ and other components, that can work on specific hardware.
+ </para></listitem>
+ <listitem>
+ <para id='source-directory'>
+ <emphasis>Source Directory:</emphasis>
+ This term refers to the directory structure created as a result
+ of creating a local copy of the <filename>poky</filename> Git
+ repository <filename>git://git.yoctoproject.org/poky</filename>
+ or expanding a released <filename>poky</filename> tarball.
+ <note>
+ Creating a local copy of the <filename>poky</filename>
+ Git repository is the recommended method for setting up
+ your Source Directory.
+ </note>
+ Sometimes you might hear the term "poky directory" used to refer
+ to this directory structure.
+ <note>
+ The OpenEmbedded build system does not support file or
+ directory names that contain spaces.
+ Be sure that the Source Directory you use does not contain
+ these types of names.
+ </note></para>
+
+ <para>The Source Directory contains BitBake, Documentation,
+ Metadata and other files that all support the Yocto Project.
+ Consequently, you must have the Source Directory in place on
+ your development system in order to do any development using
+ the Yocto Project.</para>
+
+ <para>When you create a local copy of the Git repository, you
+ can name the repository anything you like.
+ Throughout much of the documentation, "poky"
+ is used as the name of the top-level folder of the local copy of
+ the poky Git repository.
+ So, for example, cloning the <filename>poky</filename> Git
+ repository results in a local Git repository whose top-level
+ folder is also named "poky".</para>
+
+ <para>While it is not recommended that you use tarball expansion
+ to set up the Source Directory, if you do, the top-level
+ directory name of the Source Directory is derived from the
+ Yocto Project release tarball.
+ For example, downloading and unpacking
+ <filename>&YOCTO_POKY_TARBALL;</filename> results in a
+ Source Directory whose root folder is named
+ <filename>&YOCTO_POKY;</filename>.</para>
+
+ <para>It is important to understand the differences between the
+ Source Directory created by unpacking a released tarball as
+ compared to cloning
+ <filename>git://git.yoctoproject.org/poky</filename>.
+ When you unpack a tarball, you have an exact copy of the files
+ based on the time of release - a fixed release point.
+ Any changes you make to your local files in the Source Directory
+ are on top of the release and will remain local only.
+ On the other hand, when you clone the <filename>poky</filename>
+ Git repository, you have an active development repository with
+ access to the upstream repository's branches and tags.
+ In this case, any local changes you make to the local
+ Source Directory can be later applied to active development
+ branches of the upstream <filename>poky</filename> Git
+ repository.</para>
+
+ <para>For more information on concepts related to Git
+ repositories, branches, and tags, see the
+ "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>"
+ section.
+ </para></listitem>
+ <listitem><para><emphasis>Task:</emphasis>
+ A unit of execution for BitBake (e.g.
+ <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
+ <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>,
+ <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>,
+ and so forth).
+ </para></listitem>
+ <listitem><para id='toaster-term'><emphasis>Toaster:</emphasis>
+ A web interface to the Yocto Project's
+ <link linkend='build-system-term'>OpenEmbedded Build System</link>.
+ The interface enables you to configure and run your builds.
+ Information about builds is collected and stored in a database.
+ For information on Toaster, see the
+ <ulink url='&YOCTO_DOCS_TOAST_URL;'>Yocto Project Toaster Manual</ulink>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Upstream:</emphasis>
+ A reference to source code or repositories
+ that are not local to the development system but located in a
+ master area that is controlled by the maintainer of the source
+ code.
+ For example, in order for a developer to work on a particular
+ piece of code, they need to first get a copy of it from an
+ "upstream" source.
+ </para></listitem>
+ </itemizedlist>
</para>
</section>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/migration.xml b/import-layers/yocto-poky/documentation/ref-manual/migration.xml
index 7ca929c140..811577bb6f 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/migration.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/migration.xml
@@ -251,7 +251,7 @@
The following recipes have been removed.
For most of them, it is unlikely that you would have any
references to them in your own
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>.
+ <link linkend='metadata'>Metadata</link>.
However, you should check your metadata against this list to be sure:
<itemizedlist>
<listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
@@ -293,7 +293,7 @@
For the remainder, you can now find them in the
<filename>meta-extras</filename> repository, which is in the
Yocto Project
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>.
+ <link linkend='source-repositories'>Source Repositories</link>.
</para>
</section>
</section>
@@ -438,11 +438,11 @@
you now need to create an append file for the
<filename>init-ifupdown</filename> recipe instead, which you can
find in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
at <filename>meta/recipes-core/init-ifupdown</filename>.
For information on how to use append files, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
- in the Yocto Project Development Manual.
+ in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -821,7 +821,7 @@
<listitem><para>
When buildhistory is enabled, its output is now written
under the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
rather than
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>.
Doing so makes it easier to delete
@@ -992,7 +992,7 @@
<para>
You can learn more about performing automated image tests in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -1173,7 +1173,7 @@
class has been rewritten and its configuration has been simplified.
For more details on the source archiver, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -1218,7 +1218,7 @@
<para>
The following changes have been made to
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
+ <link linkend='bitbake-term'>BitBake</link>.
</para>
<section id='migration-1.6-matching-branch-requirement-for-git-fetching'>
@@ -1362,7 +1362,7 @@
increments on changes, use the PR service instead.
You can find out more about this service in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -1453,7 +1453,7 @@
Package Tests (ptest) are built but not installed by default.
For information on using Package Tests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Setting up and running package test (ptest)</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
For information on the <filename>ptest</filename> class, see the
"<link linkend='ref-classes-ptest'><filename>ptest.bbclass</filename></link>"
section.
@@ -1525,7 +1525,7 @@
<para>
The top-level <filename>LICENSE</filename> file has been changed
to better describe the license of the various components of
- OE-Core.
+ <link linkend='oe-core'>OE-Core</link>.
However, the licensing itself remains unchanged.
</para>
@@ -1748,7 +1748,7 @@
<para>
The minimum
- <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> version required
+ <link linkend='git'>Git</link> version required
on the build host is now 1.7.8 because the
<filename>--list</filename> option is now required by
BitBake's Git fetcher.
@@ -2572,7 +2572,8 @@
<para>
Maintenance tracking data for recipes that was previously part
- of <filename>meta-yocto</filename> has been moved to OE-Core.
+ of <filename>meta-yocto</filename> has been moved to
+ <link linkend='oe-core'>OE-Core</link>.
The change includes <filename>package_regex.inc</filename> and
<filename>distro_alias.inc</filename>, which are typically enabled
when using the
@@ -3000,8 +3001,7 @@
from <filename>autotools</filename> instead.
</para></listitem>
<listitem><para><filename>boot-directdisk</filename>:
- Merged into the
- <link linkend='ref-classes-image-vm'><filename>image-vm</filename></link>
+ Merged into the <filename>image-vm</filename>
class.
The <filename>boot-directdisk</filename> class was rarely
directly used.
@@ -3210,7 +3210,8 @@
You can enable, disable, and test the generation of this data.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-gobject-introspection-support'>Enabling GObject Introspection Support</ulink>"
- section for more information.
+ section in the Yocto Project Development Tasks Manual
+ for more information.
</para>
</section>
@@ -3419,7 +3420,8 @@
For help preparing metadata, see any of the many Python 3 porting
guides available.
Alternatively, you can reference the conversion commits for Bitbake
- and you can use OE-Core as a guide for changes.
+ and you can use
+ <link linkend='oe-core'>OE-Core</link> as a guide for changes.
Following are particular areas of interest:
<literallayout class='monospaced'>
* subprocess command-line pipes needing locale decoding
@@ -3508,7 +3510,8 @@
hard-coding any knowledge about different machines.
Using a configuration file is particularly convenient when trying
to use QEMU with machines other than the
- <filename>qemu*</filename> machines in OE-Core.
+ <filename>qemu*</filename> machines in
+ <link linkend='oe-core'>OE-Core</link>.
The <filename>qemuboot.conf</filename> file is generated by the
<filename>qemuboot</filename>
class when the root filesystem is being build (i.e.
@@ -4035,7 +4038,7 @@ $ runqemu qemux86-64 tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.
<para>For an example, see the
<filename>pixbufcache</filename> class in
<filename>meta/classes/</filename> in the Yocto Project
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>.
+ <link linkend='source-repositories'>Source Repositories</link>.
<note>
The <filename>SSTATEPOSTINSTFUNCS</filename> variable
itself is now deprecated in favor of the
@@ -4478,7 +4481,8 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
needed by current hardware.
Thus, GStreamer's ivorbis plugin has been disabled
by default eliminating the need for the
- <filename>tremor</filename> recipe in OE-Core.
+ <filename>tremor</filename> recipe in
+ <link linkend='oe-core'>OE-Core</link>.
</para></listitem>
<listitem><para>
<emphasis><filename>gummiboot:</filename></emphasis>
@@ -4495,8 +4499,8 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
The following changes have been made to Wic:
<note>
For more information on Wic, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images'>Creating Partitioned Images</ulink>"
- section in the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
+ section in the Yocto Project Development Tasks Manual.
</note>
<itemizedlist>
<listitem><para>
@@ -4717,6 +4721,523 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
</para>
</section>
</section>
+
+<section id='moving-to-the-yocto-project-2.4-release'>
+ <title>Moving to the Yocto Project 2.4 Release</title>
+
+ <para>
+ This section provides migration information for moving to the
+ Yocto Project 2.4 Release from the prior release.
+ </para>
+
+ <section id='migration-2.4-memory-resident-mode'>
+ <title>Memory Resident Mode</title>
+
+ <para>
+ A persistent mode is now available in BitBake's default operation,
+ replacing its previous "memory resident mode" (i.e.
+ <filename>oe-init-build-env-memres</filename>).
+ Now you only need to set
+ <filename>BB_SERVER_TIMEOUT</filename> to a timeout
+ (in seconds) and BitBake's server stays resident for that
+ amount of time between invocations.
+ The <filename>oe-init-build-env-memres</filename> script has been
+ removed since a separate environment setup script is no longer
+ needed.
+ </para>
+ </section>
+
+ <section id='migration-2.4-packaging-changes'>
+ <title>Packaging Changes</title>
+
+ <para>
+ This section provides information about packaging changes that have
+ ocurred:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>python3</filename> Changes:</emphasis>
+ <itemizedlist>
+ <listitem><para>
+ The main "python3" package now brings in all of the
+ standard Python 3 distribution rather than a subset.
+ This behavior matches what is expected based on
+ traditional Linux distributions.
+ If you wish to install a subset of Python 3, specify
+ <filename>python-core</filename> plus one or more of
+ the individual packages that are still produced.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python3</filename>:</emphasis>
+ The <filename>bz2.py</filename>,
+ <filename>lzma.py</filename>, and
+ <filename>_compression.py</filename> scripts have
+ been moved from the
+ <filename>python3-misc</filename> package to
+ the <filename>python3-compression</filename> package.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>binutils</filename>:</emphasis>
+ The <filename>libbfd</filename> library is now packaged in
+ a separate "libbfd" package.
+ This packaging saves space when certain tools
+ (e.g. <filename>perf</filename>) are installed.
+ In such cases, the tools only need
+ <filename>libbfd</filename> rather than all the packages in
+ <filename>binutils</filename>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>util-linux</filename> Changes:</emphasis>
+ <itemizedlist>
+ <listitem><para>
+ The <filename>su</filename> program is now packaged
+ in a separate "util-linux-su" package, which is only
+ built when "pam" is listed in the
+ <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
+ variable.
+ <filename>util-linux</filename> should not be
+ installed unless it is needed because
+ <filename>su</filename> is normally provided through
+ the shadow file format.
+ The main <filename>util-linux</filename> package has
+ runtime dependencies (i.e.
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
+ on the <filename>util-linux-su</filename> package
+ when "pam" is in
+ <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
+ </para></listitem>
+ <listitem><para>
+ The <filename>switch_root</filename> program is now
+ packaged in a separate "util-linux-switch-root"
+ package for small initramfs images that do not need
+ the whole <filename>util-linux</filename> package or
+ the busybox binary, which are both much larger than
+ <filename>switch_root</filename>.
+ The main <filename>util-linux</filename> package has
+ a recommended runtime dependency (i.e.
+ <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
+ on the <filename>util-linux-switch-root</filename> package.
+ </para></listitem>
+ <listitem><para>
+ The <filename>ionice</filename> program is now
+ packaged in a separate "util-linux-ionice" package.
+ The main <filename>util-linux</filename> package has
+ a recommended runtime dependency (i.e.
+ <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
+ on the <filename>util-linux-ionice</filename> package.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>initscripts</filename>:</emphasis>
+ The <filename>sushell</filename> program is now packaged in
+ a separate "initscripts-sushell" package.
+ This packaging change allows systems to pull
+ <filename>sushell</filename> in when
+ <filename>selinux</filename> is enabled.
+ The change also eliminates needing to pull in the entire
+ <filename>initscripts</filename> package.
+ The main <filename>initscripts</filename> package has a
+ runtime dependency (i.e.
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
+ on the <filename>sushell</filename> package when
+ "selinux" is in
+ <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>glib-2.0</filename>:</emphasis>
+ The <filename>glib-2.0</filename> package now has a
+ recommended runtime dependency (i.e.
+ <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
+ on the
+ <filename>shared-mime-info</filename> package, since large
+ portions of GIO are not useful without the MIME database.
+ You can remove the dependency by using the
+ <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
+ variable if <filename>shared-mime-info</filename> is too
+ large and is not required.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Go Standard Runtime:</emphasis>
+ The Go standard runtime has been split out from the main
+ <filename>go</filename> recipe into a separate
+ <filename>go-runtime</filename> recipe.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-2.4-removed-recipes'>
+ <title>Removed Recipes</title>
+
+ <para>
+ The following recipes have been removed:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>acpitests</filename>:</emphasis>
+ This recipe is not maintained.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>autogen-native</filename>:</emphasis>
+ No longer required by Grub, oe-core, or meta-oe.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>bdwgc</filename>:</emphasis>
+ Nothing in OpenEmbedded-Core requires this recipe.
+ It has moved to meta-oe.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>byacc</filename>:</emphasis>
+ This recipe was only needed by rpm 5.x and has moved to
+ meta-oe.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>gcc (5.4)</filename>:</emphasis>
+ The 5.4 series dropped the recipe in favor of 6.3 / 7.2.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>gnome-common</filename>:</emphasis>
+ Deprecated upstream and no longer needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>go-bootstrap-native</filename>:</emphasis>
+ Go 1.9 does its own bootstrapping so this recipe has been
+ removed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>guile</filename>:</emphasis>
+ This recipe was only needed by
+ <filename>autogen-native</filename> and
+ <filename>remake</filename>.
+ The recipe is no longer needed by either of these programs.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libclass-isa-perl</filename>:</emphasis>
+ This recipe was previously needed for LSB 4, no longer
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libdumpvalue-perl</filename>:</emphasis>
+ This recipe was previously needed for LSB 4, no longer
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libenv-perl</filename>:</emphasis>
+ This recipe was previously needed for LSB 4, no longer
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libfile-checktree-perl</filename>:</emphasis>
+ This recipe was previously needed for LSB 4, no longer
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libi18n-collate-perl</filename>:</emphasis>
+ This recipe was previously needed for LSB 4, no longer
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libiconv</filename>:</emphasis>
+ This recipe was only needed for <filename>uclibc</filename>,
+ which was removed in the previous release.
+ <filename>glibc</filename> and <filename>musl</filename>
+ have their own implementations.
+ <filename>meta-mingw</filename> still needs
+ <filename>libiconv</filename>, so it has
+ been moved to <filename>meta-mingw</filename>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libpng12</filename>:</emphasis>
+ This recipe was previously needed for LSB. The current
+ <filename>libpng</filename> is 1.6.x.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>libpod-plainer-perl</filename>:</emphasis>
+ This recipe was previously needed for LSB 4, no longer
+ needed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>linux-yocto (4.1)</filename>:</emphasis>
+ This recipe was removed in favor of 4.4, 4.9, 4.10 and 4.12.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>mailx</filename>:</emphasis>
+ This recipe was previously only needed for LSB
+ compatibility, and upstream is defunct.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>mesa (git version only)</filename>:</emphasis>
+ The git version recipe was stale with respect to the release
+ version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>ofono (git version only)</filename>:</emphasis>
+ The git version recipe was stale with respect to the release
+ version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>portmap</filename>:</emphasis>
+ This recipe is obsolete and is superseded by
+ <filename>rpcbind</filename>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python3-pygpgme</filename>:</emphasis>
+ This recipe is old and unmaintained. It was previously
+ required by <filename>dnf</filename>, which has switched
+ to official <filename>gpgme</filename> Python bindings.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-async</filename>:</emphasis>
+ This recipe has been removed in favor of the Python 3
+ version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-gitdb</filename>:</emphasis>
+ This recipe has been removed in favor of the Python 3
+ version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-git</filename>:</emphasis>
+ This recipe was removed in favor of the Python 3
+ version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-mako</filename>:</emphasis>
+ This recipe was removed in favor of the Python 3
+ version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-pexpect</filename>:</emphasis>
+ This recipe was removed in favor of the Python 3 version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-ptyprocess</filename>:</emphasis>
+ This recipe was removed in favor of Python the 3 version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-pycurl</filename>:</emphasis>
+ Nothing is using this recipe in OpenEmbedded-Core
+ (i.e. <filename>meta-oe</filename>).
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-six</filename>:</emphasis>
+ This recipe was removed in favor of the Python 3 version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>python-smmap</filename>:</emphasis>
+ This recipe was removed in favor of the Python 3 version.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>remake</filename>:</emphasis>
+ Using <filename>remake</filename> as the provider of
+ <filename>virtual/make</filename> is broken.
+ Consequently, this recipe is not needed in OpenEmbedded-Core.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-2.4-kernel-device-tree-move'>
+ <title>Kernel Device Tree Move</title>
+
+ <para>
+ Kernel Device Tree support is now easier to enable in a kernel
+ recipe.
+ The Device Tree code has moved to a
+ <filename>kernel-devicetree</filename> class.
+ Functionality is automatically enabled for any recipe that inherits
+ the
+ <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
+ class and sets the
+ <link linkend='var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></link>
+ variable.
+ The previous mechanism for doing this,
+ <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>,
+ is still available to avoid breakage, but triggers a
+ deprecation warning.
+ Future releases of the Yocto Project will remove
+ <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>.
+ It is advisable to remove any <filename>require</filename>
+ statements that request
+ <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>
+ from any custom kernel recipes you might have.
+ This will avoid breakage in post 2.4 releases.
+ </para>
+ </section>
+
+ <section id='migration-2.4-package-qa-changes'>
+ <title>Package QA Changes</title>
+
+ <para>
+ The following package QA changes took place:
+ <itemizedlist>
+ <listitem><para>
+ The "unsafe-references-in-scripts" QA check has been
+ removed.
+ </para></listitem>
+ <listitem><para>
+ If you refer to <filename>${COREBASE}/LICENSE</filename>
+ within
+ <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
+ you receive a warning because this file is a description of
+ the license for OE-Core.
+ Use <filename>${COMMON_LICENSE_DIR}/MIT</filename>
+ if your recipe is MIT-licensed and you cannot use the
+ preferred method of referring to a file within the source
+ tree.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-2.4-readme-changes'>
+ <title><filename>README</filename> File Changes</title>
+
+ <para>
+ The following are changes to <filename>README</filename> files:
+ <itemizedlist>
+ <listitem><para>
+ The main Poky <filename>README</filename> file has been
+ moved to the <filename>meta-poky</filename> layer and
+ has been renamed <filename>README.poky</filename>.
+ A symlink has been created so that references to the old
+ location work.
+ </para></listitem>
+ <listitem><para>
+ The <filename>README.hardware</filename> file has been moved
+ to <filename>meta-yocto-bsp</filename>.
+ A symlink has been created so that references to the old
+ location work.
+ </para></listitem>
+ <listitem><para>
+ A <filename>README.qemu</filename> file has been created
+ with coverage of the <filename>qemu*</filename> machines.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='migration-2.4-miscellaneous-changes'>
+ <title>Miscellaneous Changes</title>
+
+ <para>
+ The following are additional changes:
+ <itemizedlist>
+ <listitem><para>
+ The <filename>ROOTFS_PKGMANAGE_BOOTSTRAP</filename>
+ variable and any references to it have been removed.
+ You should remove this variable from any custom recipes.
+ </para></listitem>
+ <listitem><para>
+ The <filename>meta-yocto</filename> directory has been
+ removed.
+ <note>
+ In the Yocto Project 2.1 release
+ <filename>meta-yocto</filename> was renamed to
+ <filename>meta-poky</filename> and the
+ <filename>meta-yocto</filename> subdirectory remained
+ to avoid breaking existing configurations.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ The <filename>maintainers.inc</filename> file, which tracks
+ maintainers by listing a primary person responsible for each
+ recipe in OE-Core, has been moved from
+ <filename>meta-poky</filename> to OE-Core (i.e. from
+ <filename>meta-poky/conf/distro/include</filename> to
+ <filename>meta/conf/distro/include</filename>).
+ </para></listitem>
+ <listitem><para>
+ The
+ <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
+ class now makes a single commit per build rather than one
+ commit per subdirectory in the repository.
+ This behavior assumes the commits are enabled with
+ <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
+ = "1", which is typical.
+ Previously, the <filename>buildhistory</filename> class made
+ one commit per subdirectory in the repository in order to
+ make it easier to see the changes for a particular
+ subdirectory.
+ To view a particular change, specify that subdirectory as
+ the last parameter on the <filename>git show</filename>
+ or <filename>git diff</filename> commands.
+ </para></listitem>
+ <listitem><para>
+ The <filename>x86-base.inc</filename> file, which is
+ included by all x86-based machine configurations, now sets
+ <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
+ using <filename>?=</filename> to "live" rather than
+ appending with <filename>+=</filename>.
+ This change makes the default easier to override.
+ </para></listitem>
+ <listitem><para>
+ BitBake fires multiple "BuildStarted" events when
+ multiconfig is enabled (one per configuration).
+ For more information, see the
+ "<ulink url='&YOCTO_DOCS_BB_URL;#events'>Events</ulink>"
+ in the BitBake User Manual.
+ </para></listitem>
+ <listitem><para>
+ By default, the <filename>security_flags.inc</filename> file
+ sets a <filename>GCCPIE</filename> variable with an option
+ to enable Position Independent Executables (PIE) within
+ <filename>gcc</filename>.
+ Enabling PIE in the GNU C Compiler (GCC), makes Return
+ Oriented Programming (ROP) attacks much more difficult to
+ execute.
+ </para></listitem>
+ <listitem><para>
+ OE-Core now provides a
+ <filename>bitbake-layers</filename> plugin that implements
+ a "create-layer" subcommand.
+ The implementation of this subcommand has resulted in the
+ <filename>yocto-layer</filename> script being deprecated and
+ will likely be removed in the next Yocto Project release.
+ </para></listitem>
+ <listitem><para>
+ The <filename>vmdk</filename>, <filename>vdi</filename>,
+ and <filename>qcow2</filename> image file types are now
+ used in conjunction with the "wic" image type through
+ <filename>CONVERSION_CMD</filename>.
+ Consequently, the equivalent image types are now
+ <filename>wic.vmdk</filename>, <filename>wic.vdi</filename>,
+ and <filename>wic.qcow2</filename>, respectively.
+ </para></listitem>
+ <listitem><para>
+ <filename>do_image_&lt;type&gt;[depends]</filename> has
+ replaced <filename>IMAGE_DEPENDS_&lt;type&gt;</filename>.
+ If you have your own classes that implement custom image
+ types, then you need to update them.
+ </para></listitem>
+ <listitem><para>
+ OpenSSL 1.1 has been introduced.
+ However, the default is still 1.0.x through the
+ <link linkend='var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></link>
+ variable.
+ This preference is set is due to the remaining compatibility
+ issues with other software.
+ The
+ <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
+ variable in the openssl 1.0 recipe now includes "openssl10"
+ as a marker that can be used in
+ <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
+ within recipes that build software that still depend on
+ OpenSSL 1.0.
+ </para></listitem>
+ <listitem><para>
+ To ensure consistent behavior, BitBake's "-r" and "-R"
+ options (i.e. prefile and postfile), which are used to
+ read or post-read additional configuration files from the
+ command line, now only affect the current BitBake command.
+ Before these BitBake changes, these options would "stick"
+ for future executions.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml
index 2f36e16eaf..17f4c54b9c 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-bitbake.xml
@@ -8,7 +8,7 @@
<para>
BitBake is a program written in Python that interprets the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> used by
+ <link linkend='metadata'>Metadata</link> used by
the OpenEmbedded build system.
At some point, developers wonder what actually happens when you enter:
<literallayout class='monospaced'>
@@ -24,7 +24,7 @@
BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
As such, it has no real knowledge of what the tasks being executed actually do.
BitBake just considers a list of tasks with dependencies and handles
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
consisting of variables in a certain format that get passed to the tasks.
</note>
@@ -36,9 +36,10 @@
</para>
<para>
- The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
+ The first thing BitBake does is look for the
+ <filename>bitbake.conf</filename> file.
This file resides in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
within the <filename>meta/conf/</filename> directory.
BitBake finds it by examining its
<link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
@@ -92,8 +93,8 @@
<filename>meta/recipes-*/</filename> directory within Poky.
Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
BitBake layers as described in the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
- Creating Layers</ulink>" section of the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
+ section of the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -227,13 +228,14 @@
<para>
Dependencies are defined through several variables.
- You can find information about variables BitBake uses in the BitBake documentation,
- which is found in the <filename>bitbake/doc/manual</filename> directory within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ You can find information about variables BitBake uses in the
+ BitBake documentation, which is found in the
+ <filename>bitbake/doc/manual</filename> directory within the
+ <link linkend='source-directory'>Source Directory</link>.
At a basic level, it is sufficient to know that BitBake uses the
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
- <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
- calculating dependencies.
+ <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
+ variables when calculating dependencies.
</para>
</section>
@@ -448,20 +450,23 @@ Options:
You can find information about the options and formats of entries for specific
fetchers in the BitBake manual located in the
<filename>bitbake/doc/manual</filename> directory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
<para>
- One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
- "auto-update" when the upstream SCM changes version.
- Since this ability requires certain functionality from the SCM, not all
- systems support it.
- Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
+ One useful feature for certain Source Code Manager (SCM) fetchers
+ is the ability to "auto-update" when the upstream SCM changes
+ version.
+ Since this ability requires certain functionality from the SCM,
+ not all systems support it.
+ Currently Subversion, Bazaar and to a limited extent, Git support
+ the ability to "auto-update".
This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
variable.
See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
- in the Yocto Project Development Manual for more information.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>"
+ section in the Yocto Project Development Tasks Manual for more
+ information.
</para>
</section>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml
index c88162b3ba..5961d3ea78 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-classes.xml
@@ -16,12 +16,12 @@
</para>
<para>
- Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
+ Any <link linkend='metadata'>Metadata</link> usually
found in a recipe can also be placed in a class file.
Class files are identified by the extension <filename>.bbclass</filename>
and are usually placed in a <filename>classes/</filename> directory beneath
the <filename>meta*/</filename> directory found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
Class files can also be pointed to by
<link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
(e.g. <filename>build/</filename>) in the same way as
@@ -36,7 +36,7 @@
This chapter discusses only the most useful and important classes.
Other classes do exist within the <filename>meta/classes</filename>
directory in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
You can reference the <filename>.bbclass</filename> files directly
for more information.
</para>
@@ -94,7 +94,7 @@
<para>
For more details on the source archiver, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
You can also see the
<link linkend='var-ARCHIVER_MODE'><filename>ARCHIVER_MODE</filename></link>
variable for information about the variable flags (varflags)
@@ -122,7 +122,7 @@
These classes can also work with software that emulates Autotools.
For more information, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package'>Autotooled Package</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -333,7 +333,7 @@
For details on how the class works, see the
<filename>meta/classes/bluetooth.bbclass</filename> file in the Yocto
Project
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
</section>
@@ -641,7 +641,7 @@
Distribution policy dictates whether to include this class.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
- in the Yocto Project Development Manual for more information about
+ in the Yocto Project Development Tasks Manual for more information about
using <filename>devshell</filename>.
</para>
</section>
@@ -816,11 +816,11 @@
For more information on the
<filename>externalsrc</filename> class, see the comments in
<filename>meta/classes/externalsrc.bbclass</filename> in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
For information on how to use the <filename>externalsrc</filename>
class, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -1247,7 +1247,7 @@
</itemizedlist>
For information on customizing images, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
For information on how images are created, see the
"<link linkend='images-dev-environment'>Images</link>" section elsewhere
in this manual.
@@ -1286,14 +1286,15 @@
<filename>image_types</filename> must also appear in
<filename>IMAGE_CLASSES</filename>.
</para>
-</section>
-
-<section id='ref-classes-image_types_uboot'>
- <title><filename>image_types_uboot.bbclass</filename></title>
<para>
- The <filename>image_types_uboot</filename> class
- defines additional image types specifically for the U-Boot bootloader.
+ This class also handles conversion and compression of images.
+ <note>
+ To build a VMware VMDK image, you need to add "wic.vmdk" to
+ <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
+ This would also be similar for Virtual Box Virtual Disk Image
+ ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.
+ </note>
</para>
</section>
@@ -1370,27 +1371,6 @@
</para>
</section>
-<section id='ref-classes-image-vm'>
- <title><filename>image-vm.bbclass</filename></title>
-
- <para>
- The <filename>image-vm</filename> class supports building VM
- images.
- </para>
-</section>
-
-<section id='ref-classes-image-vmdk'>
- <title><filename>image-vmdk.bbclass</filename></title>
-
- <para>
- The <filename>image-vmdk</filename> class supports building VMware
- VMDK images.
- Normally, you do not use this class directly.
- Instead, you add "vmdk" to
- <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
- </para>
-</section>
-
<section id='ref-classes-insane'>
<title><filename>insane.bbclass</filename></title>
@@ -1788,27 +1768,6 @@ This check was removed for YP 2.3 release
</note>
</para></listitem>
-->
- <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
- Reports when a script file installed in
- <filename>${base_libdir}</filename>,
- <filename>${base_bindir}</filename>, or
- <filename>${base_sbindir}</filename>, depends on files
- installed under <filename>${exec_prefix}</filename>.
- This dependency is a concern if you want the system to remain
- basically operable if <filename>/usr</filename> is mounted
- separately and is not mounted.
- <note>
- Defaults for binaries installed in
- <filename>${base_libdir}</filename>,
- <filename>${base_bindir}</filename>, and
- <filename>${base_sbindir}</filename> are
- <filename>/lib</filename>, <filename>/bin</filename>, and
- <filename>/sbin</filename>, respectively.
- The default for a binary installed
- under <filename>${exec_prefix}</filename> is
- <filename>/usr</filename>.
- </note>
- </para></listitem>
<listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
Checks for dynamic library load paths (rpaths) in the binaries that
by default on a standard system are searched by the linker (e.g.
@@ -1900,7 +1859,7 @@ This check was removed for YP 2.3 release
you build the kernel image.
For information on how to build an initramfs, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -2194,7 +2153,7 @@ This check was removed for YP 2.3 release
<para>
For more information on using the Multilib feature, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -2328,7 +2287,7 @@ This check was removed for YP 2.3 release
The <filename>oelint</filename> class is an
obsolete lint checking tool that exists in
<filename>meta/classes</filename> in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
<para>
@@ -2393,7 +2352,7 @@ This check was removed for YP 2.3 release
<filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
variable defined in your <filename>conf/local.conf</filename>
configuration file, which is located in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
When defining the variable, you can specify one or more package types.
Since images are generated from packages, a packaging class is
needed to enable image generation.
@@ -2407,7 +2366,7 @@ This check was removed for YP 2.3 release
on the target (i.e. runtime installation of packages).
For more information, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -2419,7 +2378,7 @@ This check was removed for YP 2.3 release
all dependencies previously built.
The reason for this discrepancy is because the RPM package manager
creates and processes more
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> than the
+ <link linkend='metadata'>Metadata</link> than the
IPK package manager.
Consequently, you might consider setting
<filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are
@@ -2587,7 +2546,7 @@ This check was removed for YP 2.3 release
<para>
For information on how to use this class, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -2676,7 +2635,8 @@ This check was removed for YP 2.3 release
<link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
task, see the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
- section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
</para>
</section>
@@ -2756,8 +2716,8 @@ This check was removed for YP 2.3 release
<link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
task, see the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
- section in the Yocto Project Software Development Kit (SDK) Developer's
- Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
</para>
</section>
@@ -2830,8 +2790,8 @@ This check was removed for YP 2.3 release
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
- section in the Yocto Project Development Manual for more information
- on ptest.
+ section in the Yocto Project Development Tasks Manual for more
+ information on ptest.
</para>
</section>
@@ -2847,7 +2807,7 @@ This check was removed for YP 2.3 release
<para>
For information on setting up and running ptests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -2988,7 +2948,7 @@ This check was removed for YP 2.3 release
as the build progresses, you can enable <filename>rm_work</filename>
by adding the following to your <filename>local.conf</filename> file,
which is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
<literallayout class='monospaced'>
INHERIT += "rm_work"
</literallayout>
@@ -3455,7 +3415,7 @@ This check was removed for YP 2.3 release
<para>
For more information on <filename>systemd</filename>, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -3555,7 +3515,7 @@ This check was removed for YP 2.3 release
<para>
For information on how to enable, run, and create new tests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -3737,7 +3697,8 @@ This check was removed for YP 2.3 release
provide pathnames for links, default links for targets, and
so forth.
For details on how to use this class, see the comments in the
- <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>
+ file.
</para>
<note>
@@ -3777,8 +3738,9 @@ This check was removed for YP 2.3 release
For example, if you have packages that contain system services that
should be run under their own user or group, you can use these classes
to enable creation of the user or group.
- The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
- recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ The
+ <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
+ recipe in the <link linkend='source-directory'>Source Directory</link>
provides a simple example that shows how to add three
users and groups to two packages.
See the <filename>useradd-example.bb</filename> recipe for more
diff --git a/import-layers/yocto-poky/documentation/ref-manual/closer-look.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-development-environment.xml
index 923ed21da3..52197d16d5 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/closer-look.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-development-environment.xml
@@ -2,18 +2,1133 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
-<chapter id='closer-look'>
-<title>A Closer Look at the Yocto Project Development Environment</title>
+<chapter id='ref-development-environment'>
+<title>The Yocto Project Development Environment</title>
+
+<para>
+ This chapter takes a look at the Yocto Project development
+ environment and also provides a detailed look at what goes on during
+ development in that environment.
+ The chapter provides Yocto Project Development environment concepts that
+ help you understand how work is accomplished in an open source environment,
+ which is very different as compared to work accomplished in a closed,
+ proprietary environment.
+</para>
+
+<para>
+ Specifically, this chapter addresses open source philosophy, workflows,
+ Git, source repositories, licensing, recipe syntax, and development
+ syntax.
+</para>
+
+<section id='open-source-philosophy'>
+ <title>Open Source Philosophy</title>
<para>
- This chapter takes a more detailed look at the Yocto Project
- development environment.
- The following diagram represents the development environment at a
- high level.
+ Open source philosophy is characterized by software development
+ directed by peer production and collaboration through an active
+ community of developers.
+ Contrast this to the more standard centralized development models
+ used by commercial software companies where a finite set of developers
+ produces a product for sale using a defined set of procedures that
+ ultimately result in an end product whose architecture and source
+ material are closed to the public.
+ </para>
+
+ <para>
+ Open source projects conceptually have differing concurrent agendas,
+ approaches, and production.
+ These facets of the development process can come from anyone in the
+ public (community) that has a stake in the software project.
+ The open source environment contains new copyright, licensing, domain,
+ and consumer issues that differ from the more traditional development
+ environment.
+ In an open source environment, the end product, source material,
+ and documentation are all available to the public at no cost.
+ </para>
+
+ <para>
+ A benchmark example of an open source project is the Linux kernel,
+ which was initially conceived and created by Finnish computer science
+ student Linus Torvalds in 1991.
+ Conversely, a good example of a non-open source project is the
+ <trademark class='registered'>Windows</trademark> family of operating
+ systems developed by
+ <trademark class='registered'>Microsoft</trademark> Corporation.
+ </para>
+
+ <para>
+ Wikipedia has a good historical description of the Open Source
+ Philosophy
+ <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
+ You can also find helpful information on how to participate in the
+ Linux Community
+ <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
+ </para>
+</section>
+
+<section id='workflows'>
+ <title>Workflows</title>
+
+ <para>
+ This section provides workflow concepts using the Yocto Project and
+ Git.
+ In particular, the information covers basic practices that describe
+ roles and actions in a collaborative development environment.
+ <note>
+ If you are familiar with this type of development environment, you
+ might not want to read this section.
+ </note>
+ </para>
+
+ <para>
+ The Yocto Project files are maintained using Git in "master"
+ branches whose Git histories track every change and whose structures
+ provides branches for all diverging functionality.
+ Although there is no need to use Git, many open source projects do so.
+ <para>
+
+ </para>
+ For the Yocto Project, a key individual called the "maintainer" is
+ responsible for the "master" branch of a given Git repository.
+ The "master" branch is the “upstream” repository from which final or
+ most recent builds of the project occur.
+ The maintainer is responsible for accepting changes from other
+ developers and for organizing the underlying branch structure to
+ reflect release strategies and so forth.
+ <note>For information on finding out who is responsible for (maintains)
+ a particular area of code, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+ section of the Yocto Project Development Tasks Manual.
+ </note>
+ </para>
+
+ <para>
+ The Yocto Project <filename>poky</filename> Git repository also has an
+ upstream contribution Git repository named
+ <filename>poky-contrib</filename>.
+ You can see all the branches in this repository using the web interface
+ of the
+ <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> organized
+ within the "Poky Support" area.
+ These branches temporarily hold changes to the project that have been
+ submitted or committed by the Yocto Project development team and by
+ community members who contribute to the project.
+ The maintainer determines if the changes are qualified to be moved
+ from the "contrib" branches into the "master" branch of the Git
+ repository.
+ </para>
+
+ <para>
+ Developers (including contributing community members) create and
+ maintain cloned repositories of the upstream "master" branch.
+ The cloned repositories are local to their development platforms and
+ are used to develop changes.
+ When a developer is satisfied with a particular feature or change,
+ they "push" the changes to the appropriate "contrib" repository.
+ </para>
+
+ <para>
+ Developers are responsible for keeping their local repository
+ up-to-date with "master".
+ They are also responsible for straightening out any conflicts that
+ might arise within files that are being worked on simultaneously by
+ more than one person.
+ All this work is done locally on the developer’s machine before
+ anything is pushed to a "contrib" area and examined at the maintainer’s
+ level.
+ </para>
+
+ <para>
+ A somewhat formal method exists by which developers commit changes
+ and push them into the "contrib" area and subsequently request that
+ the maintainer include them into "master".
+ This process is called “submitting a patch” or "submitting a change."
+ For information on submitting patches and changes, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para>
+
+ <para>
+ To summarize the development workflow: a single point of entry
+ exists for changes into the project’s "master" branch of the
+ Git repository, which is controlled by the project’s maintainer.
+ And, a set of developers exist who independently develop, test, and
+ submit changes to "contrib" areas for the maintainer to examine.
+ The maintainer then chooses which changes are going to become a
+ permanent part of the project.
+ </para>
+
+ <para>
+ <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
+ </para>
+
+ <para>
+ While each development environment is unique, there are some best
+ practices or methods that help development run smoothly.
+ The following list describes some of these practices.
+ For more information about Git workflows, see the workflow topics in
+ the
+ <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Make Small Changes:</emphasis>
+ It is best to keep the changes you commit small as compared to
+ bundling many disparate changes into a single commit.
+ This practice not only keeps things manageable but also allows
+ the maintainer to more easily include or refuse changes.</para>
+
+ <para>It is also good practice to leave the repository in a
+ state that allows you to still successfully build your project.
+ In other words, do not commit half of a feature,
+ then add the other half as a separate, later commit.
+ Each commit should take you from one buildable project state
+ to another buildable state.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Use Branches Liberally:</emphasis>
+ It is very easy to create, use, and delete local branches in
+ your working Git repository.
+ You can name these branches anything you like.
+ It is helpful to give them names associated with the particular
+ feature or change on which you are working.
+ Once you are done with a feature or change and have merged it
+ into your local master branch, simply discard the temporary
+ branch.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Merge Changes:</emphasis>
+ The <filename>git merge</filename> command allows you to take
+ the changes from one branch and fold them into another branch.
+ This process is especially helpful when more than a single
+ developer might be working on different parts of the same
+ feature.
+ Merging changes also automatically identifies any collisions
+ or "conflicts" that might happen as a result of the same lines
+ of code being altered by two different developers.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Manage Branches:</emphasis>
+ Because branches are easy to use, you should use a system
+ where branches indicate varying levels of code readiness.
+ For example, you can have a "work" branch to develop in, a
+ "test" branch where the code or change is tested, a "stage"
+ branch where changes are ready to be committed, and so forth.
+ As your project develops, you can merge code across the
+ branches to reflect ever-increasing stable states of the
+ development.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Use Push and Pull:</emphasis>
+ The push-pull workflow is based on the concept of developers
+ "pushing" local commits to a remote repository, which is
+ usually a contribution repository.
+ This workflow is also based on developers "pulling" known
+ states of the project down into their local development
+ repositories.
+ The workflow easily allows you to pull changes submitted by
+ other developers from the upstream repository into your
+ work area ensuring that you have the most recent software
+ on which to develop.
+ The Yocto Project has two scripts named
+ <filename>create-pull-request</filename> and
+ <filename>send-pull-request</filename> that ship with the
+ release to facilitate this workflow.
+ You can find these scripts in the <filename>scripts</filename>
+ folder of the
+ <link linkend='source-directory'>Source Directory</link>.
+ For information on how to use these scripts, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream'>Using Scripts to Push a Change Upstream and Request a Pull</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Patch Workflow:</emphasis>
+ This workflow allows you to notify the maintainer through an
+ email that you have a change (or patch) you would like
+ considered for the "master" branch of the Git repository.
+ To send this type of change, you format the patch and then
+ send the email using the Git commands
+ <filename>git format-patch</filename> and
+ <filename>git send-email</filename>.
+ For information on how to use these scripts, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+</section>
+
+<section id='git'>
+ <title>Git</title>
+
+ <para>
+ The Yocto Project makes extensive use of Git, which is a
+ free, open source distributed version control system.
+ Git supports distributed development, non-linear development,
+ and can handle large projects.
+ It is best that you have some fundamental understanding
+ of how Git tracks projects and how to work with Git if
+ you are going to use the Yocto Project for development.
+ This section provides a quick overview of how Git works and
+ provides you with a summary of some essential Git commands.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ For more information on Git, see
+ <ulink url='http://git-scm.com/documentation'></ulink>.
+ </para></listitem>
+ <listitem><para>
+ If you need to download Git, it is recommended that you add
+ Git to your system through your distribution's "software
+ store" (e.g. for Ubuntu, use the Ubuntu Software feature).
+ For the Git download page, see
+ <ulink url='http://git-scm.com/download'></ulink>.
+ </para></listitem>
+ <listitem><para>
+ For examples beyond the limited few in this section on how
+ to use Git with the Yocto Project, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
+
+ <section id='repositories-tags-and-branches'>
+ <title>Repositories, Tags, and Branches</title>
+
+ <para>
+ As mentioned briefly in the previous section and also in the
+ "<link linkend='workflows'>Workflows</link>" section,
+ the Yocto Project maintains source repositories at
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
+ If you look at this web-interface of the repositories, each item
+ is a separate Git repository.
+ </para>
+
+ <para>
+ Git repositories use branching techniques that track content
+ change (not files) within a project (e.g. a new feature or updated
+ documentation).
+ Creating a tree-like structure based on project divergence allows
+ for excellent historical information over the life of a project.
+ This methodology also allows for an environment from which you can
+ do lots of local experimentation on projects as you develop
+ changes or new features.
+ </para>
+
+ <para>
+ A Git repository represents all development efforts for a given
+ project.
+ For example, the Git repository <filename>poky</filename> contains
+ all changes and developments for Poky over the course of its
+ entire life.
+ That means that all changes that make up all releases are captured.
+ The repository maintains a complete history of changes.
+ </para>
+
+ <para>
+ You can create a local copy of any repository by "cloning" it
+ with the <filename>git clone</filename> command.
+ When you clone a Git repository, you end up with an identical
+ copy of the repository on your development system.
+ Once you have a local copy of a repository, you can take steps to
+ develop locally.
+ For examples on how to clone Git repositories, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para>
+
+ <para>
+ It is important to understand that Git tracks content change and
+ not files.
+ Git uses "branches" to organize different development efforts.
+ For example, the <filename>poky</filename> repository has
+ several branches that include the current "&DISTRO_NAME_NO_CAP;"
+ branch, the "master" branch, and many branches for past
+ Yocto Project releases.
+ You can see all the branches by going to
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
+ clicking on the
+ <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
+ link beneath the "Branch" heading.
+ </para>
+
+ <para>
+ Each of these branches represents a specific area of development.
+ The "master" branch represents the current or most recent
+ development.
+ All other branches represent offshoots of the "master" branch.
+ </para>
+
+ <para>
+ When you create a local copy of a Git repository, the copy has
+ the same set of branches as the original.
+ This means you can use Git to create a local working area
+ (also called a branch) that tracks a specific development branch
+ from the upstream source Git repository.
+ in other words, you can define your local Git environment to
+ work on any development branch in the repository.
+ To help illustrate, consider the following example Git commands:
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ git clone git://git.yoctoproject.org/poky
+ $ cd poky
+ $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
+ </literallayout>
+ In the previous example after moving to the home directory, the
+ <filename>git clone</filename> command creates a
+ local copy of the upstream <filename>poky</filename> Git repository.
+ By default, Git checks out the "master" branch for your work.
+ After changing the working directory to the new local repository
+ (i.e. <filename>poky</filename>), the
+ <filename>git checkout</filename> command creates
+ and checks out a local branch named "&DISTRO_NAME_NO_CAP;", which
+ tracks the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.
+ Changes you make while in this branch would ultimately affect
+ the upstream "&DISTRO_NAME_NO_CAP;" branch of the
+ <filename>poky</filename> repository.
+ </para>
+
+ <para>
+ It is important to understand that when you create and checkout a
+ local working branch based on a branch name,
+ your local environment matches the "tip" of that particular
+ development branch at the time you created your local branch,
+ which could be different from the files in the "master" branch
+ of the upstream repository.
+ In other words, creating and checking out a local branch based on
+ the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
+ cloning and checking out the "master" branch if the repository.
+ Keep reading to see how you create a local snapshot of a Yocto
+ Project Release.
+ </para>
+
+ <para>
+ Git uses "tags" to mark specific changes in a repository.
+ Typically, a tag is used to mark a special point such as the final
+ change before a project is released.
+ You can see the tags used with the <filename>poky</filename> Git
+ repository by going to
+ <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
+ clicking on the
+ <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
+ link beneath the "Tag" heading.
+ </para>
+
+ <para>
+ Some key tags for the <filename>poky</filename> are
+ <filename>jethro-14.0.3</filename>,
+ <filename>morty-16.0.1</filename>,
+ <filename>pyro-17.0.0</filename>, and
+ <filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
+ These tags represent Yocto Project releases.
+ </para>
+
+ <para>
+ When you create a local copy of the Git repository, you also
+ have access to all the tags in the upstream repository.
+ Similar to branches, you can create and checkout a local working
+ Git branch based on a tag name.
+ When you do this, you get a snapshot of the Git repository that
+ reflects the state of the files when the change was made associated
+ with that tag.
+ The most common use is to checkout a working branch that matches
+ a specific Yocto Project release.
+ Here is an example:
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ git clone git://git.yoctoproject.org/poky
+ $ cd poky
+ $ git fetch --all --tags --prune
+ $ git checkout tags/pyro-17.0.0 -b my-pyro-17.0.0
+ </literallayout>
+ In this example, the name of the top-level directory of your
+ local Yocto Project repository is <filename>poky</filename>.
+ After moving to the <filename>poky</filename> directory, the
+ <filename>git fetch</filename> command makes all the upstream
+ tags available locally in your repository.
+ Finally, the <filename>git checkout</filename> command
+ creates and checks out a branch named "my-pyro-17.0.0" that is
+ based on the specific change upstream in the repository
+ associated with the "pyro-17.0.0" tag.
+ The files in your repository now exactly match that particular
+ Yocto Project release as it is tagged in the upstream Git
+ repository.
+ It is important to understand that when you create and
+ checkout a local working branch based on a tag, your environment
+ matches a specific point in time and not the entire development
+ branch (i.e. the "tip" of the branch).
+ </para>
+ </section>
+
+ <section id='basic-commands'>
+ <title>Basic Commands</title>
+
+ <para>
+ Git has an extensive set of commands that lets you manage changes
+ and perform collaboration over the life of a project.
+ Conveniently though, you can manage with a small set of basic
+ operations and workflows once you understand the basic
+ philosophy behind Git.
+ You do not have to be an expert in Git to be functional.
+ A good place to look for instruction on a minimal set of Git
+ commands is
+ <ulink url='http://git-scm.com/documentation'>here</ulink>.
+ </para>
+
+ <para>
+ If you do not know much about Git, you should educate
+ yourself by visiting the links previously mentioned.
+ </para>
+
+ <para>
+ The following list of Git commands briefly describes some basic
+ Git operations as a way to get started.
+ As with any set of commands, this list (in most cases) simply shows
+ the base command and omits the many arguments they support.
+ See the Git documentation for complete descriptions and strategies
+ on how to use these commands:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>git init</filename>:</emphasis>
+ Initializes an empty Git repository.
+ You cannot use Git commands unless you have a
+ <filename>.git</filename> repository.
+ </para></listitem>
+ <listitem><para id='git-commands-clone'>
+ <emphasis><filename>git clone</filename>:</emphasis>
+ Creates a local clone of a Git repository that is on
+ equal footing with a fellow developer’s Git repository
+ or an upstream repository.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git add</filename>:</emphasis>
+ Locally stages updated file contents to the index that
+ Git uses to track changes.
+ You must stage all files that have changed before you
+ can commit them.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git commit</filename>:</emphasis>
+ Creates a local "commit" that documents the changes you
+ made.
+ Only changes that have been staged can be committed.
+ Commits are used for historical purposes, for determining
+ if a maintainer of a project will allow the change,
+ and for ultimately pushing the change from your local
+ Git repository into the project’s upstream repository.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git status</filename>:</emphasis>
+ Reports any modified files that possibly need to be
+ staged and gives you a status of where you stand regarding
+ local commits as compared to the upstream repository.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis>
+ Changes your working branch.
+ This command is analogous to "cd".
+ </para></listitem>
+ <listitem><para><emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable>:</emphasis>
+ Creates and checks out a working branch on your local
+ machine that you can use to isolate your work.
+ It is a good idea to use local branches when adding
+ specific features or changes.
+ Using isolated branches facilitates easy removal of
+ changes if they do not work out.
+ </para></listitem>
+ <listitem><para><emphasis><filename>git branch</filename>:</emphasis>
+ Displays the existing local branches associated with your
+ local repository.
+ The branch that you have currently checked out is noted
+ with an asterisk character.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git branch -D</filename> <replaceable>branch-name</replaceable>:</emphasis>
+ Deletes an existing local branch.
+ You need to be in a local branch other than the one you
+ are deleting in order to delete
+ <replaceable>branch-name</replaceable>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git pull</filename>:</emphasis>
+ Retrieves information from an upstream Git repository
+ and places it in your local Git repository.
+ You use this command to make sure you are synchronized with
+ the repository from which you are basing changes
+ (.e.g. the "master" branch).
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git push</filename>:</emphasis>
+ Sends all your committed local changes to the upstream Git
+ repository that your local repository is tracking
+ (e.g. a contribution repository).
+ The maintainer of the project draws from these repositories
+ to merge changes (commits) into the appropriate branch
+ of project's upstream repository.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git merge</filename>:</emphasis>
+ Combines or adds changes from one
+ local branch of your repository with another branch.
+ When you create a local Git repository, the default branch
+ is named "master".
+ A typical workflow is to create a temporary branch that is
+ based off "master" that you would use for isolated work.
+ You would make your changes in that isolated branch,
+ stage and commit them locally, switch to the "master"
+ branch, and then use the <filename>git merge</filename>
+ command to apply the changes from your isolated branch
+ into the currently checked out branch (e.g. "master").
+ After the merge is complete and if you are done with
+ working in that isolated branch, you can safely delete
+ the isolated branch.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git cherry-pick</filename>:</emphasis>
+ Choose and apply specific commits from one branch
+ into another branch.
+ There are times when you might not be able to merge
+ all the changes in one branch with
+ another but need to pick out certain ones.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>gitk</filename>:</emphasis>
+ Provides a GUI view of the branches and changes in your
+ local Git repository.
+ This command is a good way to graphically see where things
+ have diverged in your local repository.
+ <note>
+ You need to install the <filename>gitk</filename>
+ package on your development system to use this
+ command.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git log</filename>:</emphasis>
+ Reports a history of your commits to the repository.
+ This report lists all commits regardless of whether you
+ have pushed them upstream or not.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>git diff</filename>:</emphasis>
+ Displays line-by-line differences between a local
+ working file and the same file as understood by Git.
+ This command is useful to see what you have changed
+ in any given file.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</section>
+
+<section id='yocto-project-repositories'>
+ <title>Yocto Project Source Repositories</title>
+
+ <para>
+ The Yocto Project team maintains complete source repositories for all
+ Yocto Project files at
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
+ This web-based source code browser is organized into categories by
+ function such as IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and
+ so forth.
+ From the interface, you can click on any particular item in the "Name"
+ column and see the URL at the bottom of the page that you need to clone
+ a Git repository for that particular item.
+ Having a local Git repository of the
+ <link linkend='source-directory'>Source Directory</link>, which is
+ usually named "poky", allows
+ you to make changes, contribute to the history, and ultimately enhance
+ the Yocto Project's tools, Board Support Packages, and so forth.
+ </para>
+
+ <para>
+ For any supported release of Yocto Project, you can also go to the
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
+ select the "Downloads" tab and get a released tarball of the
+ <filename>poky</filename> repository or any supported BSP tarballs.
+ Unpacking these tarballs gives you a snapshot of the released
+ files.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ The recommended method for setting up the Yocto Project
+ <link linkend='source-directory'>Source Directory</link>
+ and the files for supported BSPs
+ (e.g., <filename>meta-intel</filename>) is to use
+ <link linkend='git'>Git</link> to create a local copy of
+ the upstream repositories.
+ </para></listitem>
+ <listitem><para>
+ Be sure to always work in matching branches for both
+ the selected BSP repository and the
+ <link linkend='source-directory'>Source Directory</link>
+ (i.e. <filename>poky</filename>) repository.
+ For example, if you have checked out the "master" branch
+ of <filename>poky</filename> and you are going to use
+ <filename>meta-intel</filename>, be sure to checkout the
+ "master" branch of <filename>meta-intel</filename>.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para>
+
+ <para>
+ In summary, here is where you can get the project files needed for
+ development:
+ <itemizedlist>
+ <listitem><para id='source-repositories'>
+ <emphasis>
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink>
+ </emphasis>
+ This area contains IDE Plugins, Matchbox, Poky, Poky Support,
+ Tools, Yocto Linux Kernel, and Yocto Metadata Layers.
+ You can create local copies of Git repositories for each of
+ these areas.</para>
+
+ <para>
+ <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
+ For steps on how to view and access these upstream Git
+ repositories, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-source-repositories'>Accessing Source Repositories</ulink>"
+ Section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ <listitem><para><anchor id='index-downloads' />
+ <emphasis>
+ <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink>
+ </emphasis>
+ This is an index of releases such as
+ the <trademark class='trade'>Eclipse</trademark>
+ Yocto Plug-in, miscellaneous support, Poky, Pseudo, installers
+ for cross-development toolchains, and all released versions of
+ Yocto Project in the form of images or tarballs.
+ Downloading and extracting these files does not produce a local
+ copy of the Git repository but rather a snapshot of a
+ particular release or image.</para>
+
+ <para>
+ <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="3.5in" />
+ For steps on how to view and access these files, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-index-of-releases'>Accessing Index of Releases</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ <listitem><para id='downloads-page'>
+ <emphasis>"Downloads" page for the
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
+ </emphasis></para>
+
+ <para role="writernotes">This section will change due to
+ reworking of the YP Website.</para>
+
+ <para>The Yocto Project website includes a "Downloads" tab
+ that allows you to download any Yocto Project
+ release and Board Support Package (BSP) in tarball form.
+ The tarballs are similar to those found in the
+ <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para>
+
+ <para>
+ <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
+ For steps on how to use the "Downloads" page, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-downloads-page'>Using the Downloads Page</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+</section>
+
+<section id='licensing'>
+ <title>Licensing</title>
+
+ <para>
+ Because open source projects are open to the public, they have
+ different licensing structures in place.
+ License evolution for both Open Source and Free Software has an
+ interesting history.
+ If you are interested in this history, you can find basic information
+ here:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license history</ulink>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ In general, the Yocto Project is broadly licensed under the
+ Massachusetts Institute of Technology (MIT) License.
+ MIT licensing permits the reuse of software within proprietary
+ software as long as the license is distributed with that software.
+ MIT is also compatible with the GNU General Public License (GPL).
+ Patches to the Yocto Project follow the upstream licensing scheme.
+ You can find information on the MIT license
+ <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
+ You can find information on the GNU GPL
+ <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>here</ulink>.
+ </para>
+
+ <para>
+ When you build an image using the Yocto Project, the build process
+ uses a known list of licenses to ensure compliance.
+ You can find this list in the
+ <link linkend='source-directory'>Source Directory</link> at
+ <filename>meta/files/common-licenses</filename>.
+ Once the build completes, the list of all licenses found and used
+ during that build are kept in the
+ <link linkend='build-directory'>Build Directory</link>
+ at <filename>tmp/deploy/licenses</filename>.
+ </para>
+
+ <para>
+ If a module requires a license that is not in the base list, the
+ build process generates a warning during the build.
+ These tools make it easier for a developer to be certain of the
+ licenses with which their shipped products must comply.
+ However, even with these tools it is still up to the developer to
+ resolve potential licensing issues.
+ </para>
+
+ <para>
+ The base list of licenses used by the build process is a combination
+ of the Software Package Data Exchange (SPDX) list and the Open
+ Source Initiative (OSI) projects.
+ <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of
+ the Linux Foundation that maintains a specification for a standard
+ format for communicating the components, licenses, and copyrights
+ associated with a software package.
+ <ulink url='http://opensource.org'>OSI</ulink> is a corporation
+ dedicated to the Open Source Definition and the effort for reviewing
+ and approving licenses that conform to the Open Source Definition
+ (OSD).
+ </para>
+
+ <para>
+ You can find a list of the combined SPDX and OSI licenses that the
+ Yocto Project uses in the
+ <filename>meta/files/common-licenses</filename> directory in your
+ <link linkend='source-directory'>Source Directory</link>.
+ </para>
+
+ <para>
+ For information that can help you maintain compliance with various
+ open source licensing during the lifecycle of a product created using
+ the Yocto Project, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para>
+</section>
+
+<section id='recipe-syntax'>
+ <title>Recipe Syntax</title>
+
+ <para>
+ Understanding recipe file syntax is important for
+ writing recipes.
+ The following list overviews the basic items that make up a
+ BitBake recipe file.
+ For more complete BitBake syntax descriptions, see the
+ "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
+ chapter of the BitBake User Manual.
+ <itemizedlist>
+ <listitem><para><emphasis>Variable Assignments and Manipulations:</emphasis>
+ Variable assignments allow a value to be assigned to a
+ variable.
+ The assignment can be static text or might include
+ the contents of other variables.
+ In addition to the assignment, appending and prepending
+ operations are also supported.</para>
+ <para>The following example shows some of the ways
+ you can use variables in recipes:
+ <literallayout class='monospaced'>
+ S = "${WORKDIR}/postfix-${PV}"
+ CFLAGS += "-DNO_ASM"
+ SRC_URI_append = " file://fixup.patch"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Functions:</emphasis>
+ Functions provide a series of actions to be performed.
+ You usually use functions to override the default
+ implementation of a task function or to complement
+ a default function (i.e. append or prepend to an
+ existing function).
+ Standard functions use <filename>sh</filename> shell
+ syntax, although access to OpenEmbedded variables and
+ internal methods are also available.</para>
+ <para>The following is an example function from the
+ <filename>sed</filename> recipe:
+ <literallayout class='monospaced'>
+ do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+ rmdir ${D}${bindir}/
+ }
+ </literallayout>
+ It is also possible to implement new functions that
+ are called between existing tasks as long as the
+ new functions are not replacing or complementing the
+ default functions.
+ You can implement functions in Python
+ instead of shell.
+ Both of these options are not seen in the majority of
+ recipes.</para></listitem>
+ <listitem><para><emphasis>Keywords:</emphasis>
+ BitBake recipes use only a few keywords.
+ You use keywords to include common
+ functions (<filename>inherit</filename>), load parts
+ of a recipe from other files
+ (<filename>include</filename> and
+ <filename>require</filename>) and export variables
+ to the environment (<filename>export</filename>).</para>
+ <para>The following example shows the use of some of
+ these keywords:
+ <literallayout class='monospaced'>
+ export POSTCONF = "${STAGING_BINDIR}/postconf"
+ inherit autoconf
+ require otherfile.inc
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Comments:</emphasis>
+ Any lines that begin with the hash character
+ (<filename>#</filename>) are treated as comment lines
+ and are ignored:
+ <literallayout class='monospaced'>
+ # This is a comment
+ </literallayout>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ This next list summarizes the most important and most commonly
+ used parts of the recipe syntax.
+ For more information on these parts of the syntax, you can
+ reference the
+ <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>
+ chapter in the BitBake User Manual.
+ <itemizedlist>
+ <listitem><para><emphasis>Line Continuation: <filename>\</filename></emphasis> -
+ Use the backward slash (<filename>\</filename>)
+ character to split a statement over multiple lines.
+ Place the slash character at the end of the line that
+ is to be continued on the next line:
+ <literallayout class='monospaced'>
+ VAR = "A really long \
+ line"
+ </literallayout>
+ <note>
+ You cannot have any characters including spaces
+ or tabs after the slash character.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Using Variables: <filename>${...}</filename></emphasis> -
+ Use the <filename>${<replaceable>VARNAME</replaceable>}</filename> syntax to
+ access the contents of a variable:
+ <literallayout class='monospaced'>
+ SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz"
+ </literallayout>
+ <note>
+ It is important to understand that the value of a
+ variable expressed in this form does not get
+ substituted automatically.
+ The expansion of these expressions happens
+ on-demand later (e.g. usually when a function that
+ makes reference to the variable executes).
+ This behavior ensures that the values are most
+ appropriate for the context in which they are
+ finally used.
+ On the rare occasion that you do need the variable
+ expression to be expanded immediately, you can use
+ the <filename>:=</filename> operator instead of
+ <filename>=</filename> when you make the
+ assignment, but this is not generally needed.
+ </note>
+ </para></listitem>
+ <listitem><para><emphasis>Quote All Assignments: <filename>"<replaceable>value</replaceable>"</filename></emphasis> -
+ Use double quotes around the value in all variable
+ assignments.
+ <literallayout class='monospaced'>
+ VAR1 = "${OTHERVAR}"
+ VAR2 = "The version is ${PV}"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Conditional Assignment: <filename>?=</filename></emphasis> -
+ Conditional assignment is used to assign a value to
+ a variable, but only when the variable is currently
+ unset.
+ Use the question mark followed by the equal sign
+ (<filename>?=</filename>) to make a "soft" assignment
+ used for conditional assignment.
+ Typically, "soft" assignments are used in the
+ <filename>local.conf</filename> file for variables
+ that are allowed to come through from the external
+ environment.
+ </para>
+ <para>Here is an example where
+ <filename>VAR1</filename> is set to "New value" if
+ it is currently empty.
+ However, if <filename>VAR1</filename> has already been
+ set, it remains unchanged:
+ <literallayout class='monospaced'>
+ VAR1 ?= "New value"
+ </literallayout>
+ In this next example, <filename>VAR1</filename>
+ is left with the value "Original value":
+ <literallayout class='monospaced'>
+ VAR1 = "Original value"
+ VAR1 ?= "New value"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Appending: <filename>+=</filename></emphasis> -
+ Use the plus character followed by the equals sign
+ (<filename>+=</filename>) to append values to existing
+ variables.
+ <note>
+ This operator adds a space between the existing
+ content of the variable and the new content.
+ </note></para>
+ <para>Here is an example:
+ <literallayout class='monospaced'>
+ SRC_URI += "file://fix-makefile.patch"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Prepending: <filename>=+</filename></emphasis> -
+ Use the equals sign followed by the plus character
+ (<filename>=+</filename>) to prepend values to existing
+ variables.
+ <note>
+ This operator adds a space between the new content
+ and the existing content of the variable.
+ </note></para>
+ <para>Here is an example:
+ <literallayout class='monospaced'>
+ VAR =+ "Starts"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Appending: <filename>_append</filename></emphasis> -
+ Use the <filename>_append</filename> operator to
+ append values to existing variables.
+ This operator does not add any additional space.
+ Also, the operator is applied after all the
+ <filename>+=</filename>, and
+ <filename>=+</filename> operators have been applied and
+ after all <filename>=</filename> assignments have
+ occurred.
+ </para>
+ <para>The following example shows the space being
+ explicitly added to the start to ensure the appended
+ value is not merged with the existing value:
+ <literallayout class='monospaced'>
+ SRC_URI_append = " file://fix-makefile.patch"
+ </literallayout>
+ You can also use the <filename>_append</filename>
+ operator with overrides, which results in the actions
+ only being performed for the specified target or
+ machine:
+ <literallayout class='monospaced'>
+ SRC_URI_append_sh4 = " file://fix-makefile.patch"
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Prepending: <filename>_prepend</filename></emphasis> -
+ Use the <filename>_prepend</filename> operator to
+ prepend values to existing variables.
+ This operator does not add any additional space.
+ Also, the operator is applied after all the
+ <filename>+=</filename>, and
+ <filename>=+</filename> operators have been applied and
+ after all <filename>=</filename> assignments have
+ occurred.
+ </para>
+ <para>The following example shows the space being
+ explicitly added to the end to ensure the prepended
+ value is not merged with the existing value:
+ <literallayout class='monospaced'>
+ CFLAGS_prepend = "-I${S}/myincludes "
+ </literallayout>
+ You can also use the <filename>_prepend</filename>
+ operator with overrides, which results in the actions
+ only being performed for the specified target or
+ machine:
+ <literallayout class='monospaced'>
+ CFLAGS_prepend_sh4 = "-I${S}/myincludes "
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Overrides:</emphasis> -
+ You can use overrides to set a value conditionally,
+ typically based on how the recipe is being built.
+ For example, to set the
+ <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>
+ variable's value to "standard/base" for any target
+ <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
+ except for qemuarm where it should be set to
+ "standard/arm-versatile-926ejs", you would do the
+ following:
+ <literallayout class='monospaced'>
+ KBRANCH = "standard/base"
+ KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
+ </literallayout>
+ Overrides are also used to separate alternate values
+ of a variable in other situations.
+ For example, when setting variables such as
+ <link linkend='var-FILES'><filename>FILES</filename></link>
+ and
+ <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
+ that are specific to individual packages produced by
+ a recipe, you should always use an override that
+ specifies the name of the package.
+ </para></listitem>
+ <listitem><para><emphasis>Indentation:</emphasis>
+ Use spaces for indentation rather than than tabs.
+ For shell functions, both currently work.
+ However, it is a policy decision of the Yocto Project
+ to use tabs in shell functions.
+ Realize that some layers have a policy to use spaces
+ for all indentation.
+ </para></listitem>
+ <listitem><para><emphasis>Using Python for Complex Operations: <filename>${@<replaceable>python_code</replaceable>}</filename></emphasis> -
+ For more advanced processing, it is possible to use
+ Python code during variable assignments (e.g.
+ search and replacement on a variable).</para>
+ <para>You indicate Python code using the
+ <filename>${@<replaceable>python_code</replaceable>}</filename>
+ syntax for the variable assignment:
+ <literallayout class='monospaced'>
+ SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Shell Function Syntax:</emphasis>
+ Write shell functions as if you were writing a shell
+ script when you describe a list of actions to take.
+ You should ensure that your script works with a generic
+ <filename>sh</filename> and that it does not require
+ any <filename>bash</filename> or other shell-specific
+ functionality.
+ The same considerations apply to various system
+ utilities (e.g. <filename>sed</filename>,
+ <filename>grep</filename>, <filename>awk</filename>,
+ and so forth) that you might wish to use.
+ If in doubt, you should check with multiple
+ implementations - including those from BusyBox.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+</section>
+
+<section id="development-concepts">
+ <title>Development Concepts</title>
+
+ <para>
+ This section takes a more detailed look inside the development
+ process.
+ The following diagram represents development at a high level.
The remainder of this chapter expands on the fundamental input, output,
process, and
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>) blocks
- in the Yocto Project development environment.
+ <link linkend='metadata'>Metadata</link>) blocks
+ that make up development in the Yocto Project environment.
</para>
<para id='general-yocto-environment-figure'>
@@ -21,8 +1136,7 @@
</para>
<para>
- The generalized Yocto Project Development Environment consists of
- several functional areas:
+ In general, development consists of several functional areas:
<itemizedlist>
<listitem><para><emphasis>User Configuration:</emphasis>
Metadata you can use to control the build process.
@@ -34,7 +1148,7 @@
Upstream releases, local projects, and SCMs.</para></listitem>
<listitem><para><emphasis>Build System:</emphasis>
Processes under the control of
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
+ <link linkend='bitbake-term'>BitBake</link>.
This block expands on how BitBake fetches source, applies
patches, completes compilation, analyzes output for package
generation, creates and tests packages, generates images, and
@@ -81,7 +1195,7 @@
a build.
These files are <filename>*.conf</filename> files.
The minimally necessary ones reside as example files in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
For simplicity, this section refers to the Source Directory as
the "Poky Directory."
</para>
@@ -107,14 +1221,12 @@
configuration files when you source the build environment
script
(i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
</para>
<para>
Sourcing the build environment script creates a
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
if one does not already exist.
BitBake uses the Build Directory for all its work during builds.
The Build Directory has a <filename>conf</filename> directory that
@@ -128,8 +1240,7 @@
<para>
Because the Poky repository is fundamentally an aggregation of
existing repositories, some users might be familiar with running
- the <filename>&OE_INIT_FILE;</filename> or
- <filename>oe-init-build-env-memres</filename> script in the context
+ the <filename>&OE_INIT_FILE;</filename> script in the context
of separate OpenEmbedded-Core and BitBake repositories rather than a
single Poky repository.
This discussion assumes the script is executed from within a cloned
@@ -201,7 +1312,7 @@
You can find more information on working with the
<filename>bblayers.conf</filename> file in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -354,7 +1465,7 @@
<para>
For more information on layers, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<section id="distro-layer">
@@ -641,7 +1752,7 @@
<para>
When the OpenEmbedded build system generates an image or an SDK,
it gets the packages from a package feed area located in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
The
<link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
shows this package feeds area in the upper-right corner.
@@ -727,7 +1838,7 @@
<para>
The OpenEmbedded build system uses
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
+ <link linkend='bitbake-term'>BitBake</link>
to produce images.
You can see from the
<link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
@@ -770,7 +1881,7 @@
depend on it are re-executed.
</note>
By default, everything is accomplished in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+ <link linkend='build-directory'>Build Directory</link>,
which has a defined structure.
For additional general information on the Build Directory,
see the
@@ -1119,7 +2230,9 @@
<para>
After the root filesystem is built, processing begins on
- the image through the <filename>do_image</filename> task.
+ the image through the
+ <link linkend='ref-tasks-image'><filename>do_image</filename></link>
+ task.
The build system runs any pre-processing commands as defined
by the
<link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
@@ -1130,20 +2243,38 @@
</para>
<para>
- The <filename>do_image</filename> task dynamically creates
- other <filename>do_image_*</filename> tasks as needed, which
- include compressing the root filesystem image to reduce the
- overall size of the image.
- The process turns everything into an image file or a set of
- image files.
- The formats used for the root filesystem depend on the
+ The OpenEmbedded build system dynamically creates
+ <filename>do_image_*</filename> tasks as needed, based
+ on the image types specified in the
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
variable.
+ The process turns everything into an image file or a set of
+ image files and compresses the root filesystem image to reduce
+ the overall size of the image.
+ The formats used for the root filesystem depend on the
+ <filename>IMAGE_FSTYPES</filename> variable.
+ </para>
+
+ <para>
+ As an example, a dynamically created task when creating a
+ particular image <replaceable>type</replaceable> would take the
+ following form:
+ <literallayout class='monospaced'>
+ do_image_<replaceable>type</replaceable>[depends]
+ </literallayout>
+ So, if the <replaceable>type</replaceable> as specified by the
+ <filename>IMAGE_FSTYPES</filename> were
+ <filename>ext4</filename>, the dynamically generated task
+ would be as follows:
+ <literallayout class='monospaced'>
+ do_image_ext4[depends]
+ </literallayout>
</para>
<para>
The final task involved in image creation is the
- <filename>do_image_complete</filename> task.
+ <link linkend='ref-tasks-image-complete'><filename>do_image_complete</filename></link>
+ task.
This task completes the image by applying any image
post processing as defined through the
<link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>
@@ -1180,8 +2311,8 @@
<link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
task, see the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
- section in the Yocto Project Software Development Kit (SDK)
- Developer's Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (SDK) manual.
</note>
<para>
@@ -1430,7 +2561,7 @@
<para>
Images are written out to the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
inside the <filename>tmp/deploy/images/<replaceable>machine</replaceable>/</filename>
folder as shown in the figure.
This folder contains any files expected to be loaded on the
@@ -1544,11 +2675,10 @@
</para></listitem>
</itemizedlist>
</note>
-
<para>
Once built, the SDK installers are written out to the
<filename>deploy/sdk</filename> folder inside the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
as shown in the figure at the beginning of this section.
Depending on the type of SDK, several variables exist that help
configure these files.
@@ -1623,6 +2753,7 @@
</itemizedlist>
</para>
</section>
+</section>
</chapter>
<!--
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml
index 99d5a52a0f..e29bf89e51 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-devtool-reference.xml
@@ -20,8 +20,8 @@
For more information on how to apply the command when using the
extensible SDK, see the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
- section in the Yocto Project Software Development Kit (SDK) Developer's
- Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
</para>
<section id='devtool-getting-help'>
@@ -35,45 +35,59 @@
the commands:
<literallayout class='monospaced'>
$ devtool --help
- usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
- [--color COLOR] [-h]
- &lt;subcommand&gt; ...
+ usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
+ [--fetch-dev] [--version VERSION] [--no-git]
+ [--srcrev SRCREV | --autorev] [--srcbranch SRCBRANCH]
+ [--binary] [--also-native] [--src-subdir SUBDIR]
+ [--mirrors] [--provides PROVIDES]
+ [recipename] [srctree] [fetchuri]
- OpenEmbedded development tool
+ Adds a new recipe to the workspace to build a specified source tree. Can
+ optionally fetch a remote URI and unpack it to create the source tree.
+
+ arguments:
+ recipename Name for new recipe to add (just name - no version,
+ path or extension). If not specified, will attempt
+ to auto-detect it.
+ srctree Path to external source tree. If not specified, a
+ subdirectory of
+ /home/<replaceable>user</replaceable>/poky/build/workspace/sources will be
+ used.
+ fetchuri Fetch the specified URI and extract it to create
+ the source tree
options:
- --basepath BASEPATH Base directory of SDK / build directory
- --bbpath BBPATH Explicitly specify the BBPATH, rather than getting it
- from the metadata
- -d, --debug Enable debug output
- -q, --quiet Print only errors
- --color COLOR Colorize output (where COLOR is auto, always, never)
- -h, --help show this help message and exit
-
- subcommands:
- Beginning work on a recipe:
- add Add a new recipe
- modify Modify the source for an existing recipe
- upgrade Upgrade an existing recipe
- Getting information:
- status Show workspace status
- search Search available recipes
- Working on a recipe in the workspace:
- edit-recipe Edit a recipe file in your workspace
- configure-help Get help on configure script options
- build Build a recipe
- update-recipe Apply changes from external source tree to recipe
- reset Remove a recipe from your workspace
- finish Finish working on a recipe in your workspace
- Testing changes on target:
- deploy-target Deploy recipe output files to live target machine
- undeploy-target Undeploy recipe output files in live target machine
- build-image Build image including workspace recipe packages
- Advanced:
- create-workspace Set up workspace in an alternative location
- extract Extract the source for an existing recipe
- sync Synchronize the source tree for an existing recipe
- Use devtool &lt;subcommand&gt; --help to get help on a specific command
+ -h, --help show this help message and exit
+ --same-dir, -s Build in same directory as source
+ --no-same-dir Force build in a separate build directory
+ --fetch URI, -f URI Fetch the specified URI and extract it to create
+ the source tree (deprecated - pass as positional
+ argument instead)
+ --fetch-dev For npm, also fetch devDependencies
+ --version VERSION, -V VERSION
+ Version to use within recipe (PV)
+ --no-git, -g If fetching source, do not set up source tree as a
+ git repository
+ --srcrev SRCREV, -S SRCREV
+ Source revision to fetch if fetching from an SCM
+ such as git (default latest)
+ --autorev, -a When fetching from a git repository, set SRCREV in
+ the recipe to a floating revision instead of fixed
+ --srcbranch SRCBRANCH, -B SRCBRANCH
+ Branch in source repository if fetching from an SCM
+ such as git (default master)
+ --binary, -b Treat the source tree as something that should be
+ installed verbatim (no compilation, same directory
+ structure). Useful with binary packages e.g. RPMs.
+ --also-native Also add native variant (i.e. support building
+ recipe for the build host as well as the target
+ machine)
+ --src-subdir SUBDIR Specify subdirectory within source tree to use
+ --mirrors Enable PREMIRRORS and MIRRORS for source tree
+ fetching (disable by default).
+ --provides PROVIDES, -p PROVIDES
+ Specify an alias for the item provided by the
+ recipe. E.g. virtual/libgl
</literallayout>
</para>
@@ -194,9 +208,9 @@
The following example creates and adds a new recipe named
<filename>jackson</filename> to a workspace layer the tool creates.
The source code built by the recipes resides in
- <filename>/home/scottrif/sources/jackson</filename>:
+ <filename>/home/<replaceable>user</replaceable>/sources/jackson</filename>:
<literallayout class='monospaced'>
- $ devtool add jackson /home/scottrif/sources/jackson
+ $ devtool add jackson /home/<replaceable>user</replaceable>/sources/jackson
</literallayout>
</para>
@@ -214,18 +228,52 @@
append files, and source files into the existing workspace layer.
The <filename>.bbappend</filename> file is created to point
to the external source tree.
+ <note>
+ If your recipe has runtime dependencies defined, you must be sure
+ that these packages exist on the target hardware before attempting
+ to run your application.
+ If dependent packages (e.g. libraries) do not exist on the target,
+ your application, when run, will fail to find those functions.
+ For more information, see the
+ "<link linkend='devtool-deploying-your-software-on-the-target-machine'>Deploying Your Software on the Target Machine</link>"
+ section.
+ </note>
</para>
- <note>
- If your recipe has runtime dependencies defined, you must be sure
- that these packages exist on the target hardware before attempting
- to run your application.
- If dependent packages (e.g. libraries) do not exist on the target,
- your application, when run, will fail to find those functions.
- For more information, see the
- "<link linkend='devtool-deploying-your-software-on-the-target-machine'>Deploying Your Software on the Target Machine</link>"
- section.
- </note>
+ <para>
+ By default, <filename>devtool add</filename> uses the latest
+ revision (i.e. master) when unpacking files from a remote URI.
+ In some cases, you might want to specify a source revision by
+ branch, tag, or commit hash. You can specify these options when
+ using the <filename>devtool add</filename> command:
+ <itemizedlist>
+ <listitem><para>
+ To specify a source branch, use the
+ <filename>--srcbranch</filename> option:
+ <literallayout class='monospaced'>
+ $ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/<replaceable>user</replaceable>/sources/jackson
+ </literallayout>
+ In the previous example, you are checking out the
+ &DISTRO_NAME_NO_CAP; branch.
+ </para></listitem>
+ <listitem><para>
+ To specify a specific tag or commit hash, use the
+ <filename>--srcrev</filename> option:
+ <literallayout class='monospaced'>
+ $ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/<replaceable>user</replaceable>/sources/jackson
+ $ devtool add --srcrev <replaceable>some_commit_hash</replaceable> /home/<replaceable>user</replaceable>/sources/jackson
+ </literallayout>
+ The previous examples check out the &DISTRO_REL_TAG; tag
+ and the commit associated with the
+ <replaceable>some_commit_hash</replaceable> hash.
+ </para></listitem>
+ </itemizedlist>
+ <note>
+ If you prefer to use the latest revision every time the recipe is
+ built, use the options <filename>--autorev</filename>
+ or <filename>-a</filename>.
+ </note>
+ </para>
</section>
<section id='devtool-extracting-the-source-for-an-existing-recipe'>
@@ -276,7 +324,7 @@
Use the <filename>devtool modify</filename> command to begin
modifying the source of an existing recipe.
This command is very similar to the
- <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-adding-a-new-recipe-to-the-workspace'><filename>add</filename></ulink>
+ <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>add</filename></link>
command except that it does not physically create the
recipe in the workspace layer because the recipe already
exists in an another layer.
@@ -334,7 +382,7 @@
to the source files.
For example, if you know you are going to work on some
code, you could first use the
- <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-modifying-a-recipe'><filename>devtool modify</filename></ulink>
+ <link linkend='devtool-modifying-a-recipe'><filename>devtool modify</filename></link>
command to extract the code and set up the workspace.
After which, you could modify, compile, and test the code.
</para>
@@ -556,7 +604,7 @@
remove deployed build output from the target machine.
For the <filename>devtool undeploy-target</filename> command to
work, you must have previously used the
- <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-deploying-your-software-on-the-target-machine'><filename>devtool deploy-target</filename></ulink>
+ <link linkend='devtool-deploying-your-software-on-the-target-machine'><filename>devtool deploy-target</filename></link>
command.
<literallayout class='monospaced'>
$ devtool undeploy-target <replaceable>recipe</replaceable>&nbsp;<replaceable>target</replaceable>
@@ -573,7 +621,7 @@
<para>
Use the <filename>devtool create-workspace</filename> command to
create a new workspace layer in your
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
When you create a new workspace layer, it is populated with the
<filename>README</filename> file and the
<filename>conf</filename> directory only.
@@ -616,7 +664,7 @@
$ devtool status
</literallayout>
Following is sample output after using
- <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></ulink>
+ <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></link>
to create and add the <filename>mtr_0.86.bb</filename> recipe
to the <filename>workspace</filename> directory:
<literallayout class='monospaced'>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml
index 7e1c5ef2f1..02857dce38 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-features.xml
@@ -36,7 +36,7 @@
<para>
One method you can use to determine which recipes are checking to see if a
particular feature is contained or not is to <filename>grep</filename> through
- the <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ the <link linkend='metadata'>Metadata</link>
for the feature.
Here is an example that discovers the recipes whose build is potentially
changed based on a given feature:
@@ -132,7 +132,7 @@
These select features make sense to be controlled both at
the machine and distribution configuration level.
See the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></ulink>
+ <link linkend='var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></link>
variable for more information.
</para>
@@ -151,8 +151,8 @@
is used.
See the
"<ulink url='&YOCTO_DOCS_SDK_URL;#adding-api-documentation-to-the-standard-sdk'>Adding API Documentation to the Standard SDK</ulink>"
- section in the Yocto Project Software Development Kit (SDK)
- Developer's Guide for more information.
+ section in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual.
</para></listitem>
<listitem><para><emphasis>bluetooth:</emphasis> Include
bluetooth support (integrated BT only).</para></listitem>
@@ -217,7 +217,7 @@
the package tests where supported by individual recipes.
For more information on package tests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
client support (for mounting Samba/Microsoft Windows shares
@@ -304,7 +304,7 @@
<note>
To make the <filename>/var/log</filename> directory
on the target persistent, use the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-VOLATILE_LOG_DIR'><filename>VOLATILE_LOG_DIR</filename></ulink>
+ <link linkend='var-VOLATILE_LOG_DIR'><filename>VOLATILE_LOG_DIR</filename></link>
variable by setting it to "no".
</note>
</para></listitem>
@@ -315,8 +315,8 @@
Creates an image whose root filesystem is read-only.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
- section in the Yocto Project Development Manual for more
- information.
+ section in the Yocto Project Development Tasks Manual for
+ more information.
</para></listitem>
<listitem><para><emphasis>splash:</emphasis>
Enables showing a splash screen during boot.
@@ -356,7 +356,8 @@
<filename>perf</filename>, <filename>systemtap</filename>,
and <filename>LTTng</filename>.
For general information on user-space tools, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual.
</para></listitem>
<listitem><para><emphasis>ssh-server-dropbear:</emphasis>
Installs the Dropbear minimal SSH server.
@@ -374,7 +375,7 @@
<filename>strace</filename> and <filename>gdb</filename>.
For information on GDB, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
For information on tracing and profiling, see the
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
</para></listitem>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml
index f2209686f0..c752f94c3d 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-images.xml
@@ -30,8 +30,8 @@
<para>
From within the <filename>poky</filename> Git repository, you can use
the following command to display the list of directories within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
- that containe image recipe files:
+ <link linkend='source-directory'>Source Directory</link>
+ that contain image recipe files:
<literallayout class='monospaced'>
$ ls meta*/recipes*/images/*.bb
</literallayout>
@@ -140,7 +140,7 @@
second image to be tested.
You can find more information about runtime testing in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para><filename>core-image-testmaster-initramfs</filename>:
A RAM-based Initial Root Filesystem (initramfs) image tailored for
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml
new file mode 100644
index 0000000000..1dd36b242c
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-kickstart.xml
@@ -0,0 +1,284 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='ref-kickstart'>
+<title>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</title>
+
+ <section id='openembedded-kickstart-wks-reference'>
+ <title>Introduction</title>
+
+ <para>
+ The current Wic implementation supports only the basic kickstart
+ partitioning commands:
+ <filename>partition</filename> (or <filename>part</filename>
+ for short) and <filename>bootloader</filename>.
+ <note>
+ Future updates will implement more commands and options.
+ If you use anything that is not specifically supported, results
+ can be unpredictable.
+ </note>
+ </para>
+
+ <para>
+ This chapter provides a reference on the available kickstart
+ commands.
+ The information lists the commands, their syntax, and meanings.
+ Kickstart commands are based on the Fedora kickstart versions but
+ with modifications to reflect Wic capabilities.
+ You can see the original documentation for those commands at the
+ following links:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition'>http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition</ulink>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader'>http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader</ulink>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='command-part-or-partition'>
+ <title>Command: part or partition</title>
+
+ <para>
+ Either of these commands create a partition on the system and use
+ the following syntax:
+ <literallayout class='monospaced'>
+ part [<replaceable>mntpoint</replaceable>]
+ partition [<replaceable>mntpoint</replaceable>]
+ </literallayout>
+ If you do not provide <replaceable>mntpoint</replaceable>, Wic
+ creates a partition but does not mount it.
+ </para>
+
+ <para>
+ The <filename><replaceable>mntpoint</replaceable></filename> is
+ where the partition will be mounted and must be of one of the
+ following forms:
+ <itemizedlist>
+ <listitem><para>
+ <filename>/<replaceable>path</replaceable></filename>:
+ For example, "/", "/usr", or "/home"
+ </para></listitem>
+ <listitem><para>
+ <filename>swap</filename>:
+ The created partition is used as swap space.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Specifying a <replaceable>mntpoint</replaceable> causes the
+ partition to automatically be mounted.
+ Wic achieves this by adding entries to the filesystem table (fstab)
+ during image generation.
+ In order for wic to generate a valid fstab, you must also provide
+ one of the <filename>--ondrive</filename>,
+ <filename>--ondisk</filename>, or
+ <filename>--use-uuid</filename> partition options as part of the
+ command.
+ Here is an example using "/" as the mountpoint.
+ The command uses "--ondisk" to force the partition onto the
+ <filename>sdb</filename> disk:
+ <literallayout class='monospaced'>
+ part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
+ </literallayout>
+ </para>
+
+ <para>
+ Here is a list that describes other supported options you can use
+ with the <filename>part</filename> and
+ <filename>partition</filename> commands:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>--size</filename>:</emphasis>
+ The minimum partition size in MBytes.
+ Specify an integer value such as 500.
+ Do not append the number with "MB".
+ You do not need this option if you use
+ <filename>--source</filename>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--source</filename>:</emphasis>
+ This option is a Wic-specific option that names the source
+ of the data that populates the partition.
+ The most common value for this option is "rootfs", but you
+ can use any value that maps to a valid source plug-in.
+ For information on the source plug-ins, see the
+ "<link linkend='wic-plug-ins-interface'>Wic Plug-Ins Interface</link>"
+ section.</para>
+
+ <para>If you use <filename>--source rootfs</filename>, Wic
+ creates a partition as large as needed and to fill it with
+ the contents of the root filesystem pointed to by the
+ <filename>-r</filename> command-line option or the
+ equivalent rootfs derived from the <filename>-e</filename>
+ command-line option.
+ The filesystem type used to create the partition is driven
+ by the value of the <filename>--fstype</filename> option
+ specified for the partition.
+ See the entry on <filename>--fstype</filename> that follows
+ for more information.</para>
+
+ <para>If you use
+ <filename>--source <replaceable>plugin-name</replaceable></filename>,
+ Wic creates a partition as large as needed and fills it
+ with the contents of the partition that is generated by the
+ specified plug-in name using the data pointed to by the
+ <filename>-r</filename> command-line option or the
+ equivalent rootfs derived from the <filename>-e</filename>
+ command-line option.
+ Exactly what those contents and filesystem type end up
+ being are dependent on the given plug-in implementation.
+ </para>
+
+ <para>If you do not use the <filename>--source</filename>
+ option, the <filename>wic</filename> command creates an
+ empty partition.
+ Consequently, you must use the <filename>--size</filename>
+ option to specify the size of the empty partition.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--ondisk</filename> or <filename>--ondrive</filename>:</emphasis>
+ Forces the partition to be created on a particular disk.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--fstype</filename>:</emphasis>
+ Sets the file system type for the partition.
+ Valid values are:
+ <itemizedlist>
+ <listitem><para>
+ <filename>ext4</filename>
+ </para></listitem>
+ <listitem><para>
+ <filename>ext3</filename>
+ </para></listitem>
+ <listitem><para>
+ <filename>ext2</filename>
+ </para></listitem>
+ <listitem><para>
+ <filename>btrfs</filename>
+ </para></listitem>
+ <listitem><para>
+ <filename>squashfs</filename>
+ </para></listitem>
+ <listitem><para>
+ <filename>swap</filename>
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--fsoptions</filename>:</emphasis>
+ Specifies a free-form string of options to be used when
+ mounting the filesystem.
+ This string will be copied into the
+ <filename>/etc/fstab</filename> file of the installed
+ system and should be enclosed in quotes.
+ If not specified, the default string is "defaults".
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--label label</filename>:</emphasis>
+ Specifies the label to give to the filesystem to be made on
+ the partition.
+ If the given label is already in use by another filesystem,
+ a new label is created for the partition.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--active</filename>:</emphasis>
+ Marks the partition as active.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--align (in KBytes)</filename>:</emphasis>
+ This option is a Wic-specific option that says to start a
+ partition on an <replaceable>x</replaceable> KBytes
+ boundary.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--no-table</filename>:</emphasis>
+ This option is a Wic-specific option.
+ Using the option reserves space for the partition and
+ causes it to become populated.
+ However, the partition is not added to the partition table.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--extra-space</filename>:</emphasis>
+ This option is a Wic-specific option that adds extra space
+ after the space filled by the content of the partition.
+ The final size can go beyond the size specified by the
+ <filename>--size</filename> option.
+ The default value is 10 Mbytes.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--overhead-factor</filename>:</emphasis>
+ This option is a Wic-specific option that multiplies the
+ size of the partition by the option's value.
+ You must supply a value greater than or equal to "1".
+ The default value is "1.3".
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--part-type</filename>:</emphasis>
+ This option is a Wic-specific option that specifies the
+ partition type globally unique identifier (GUID) for GPT
+ partitions.
+ You can find the list of partition type GUIDs at
+ <ulink url='http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs'></ulink>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--use-uuid</filename>:</emphasis>
+ This option is a Wic-specific option that causes Wic to
+ generate a random GUID for the partition.
+ The generated identifier is used in the bootloader
+ configuration to specify the root partition.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--uuid</filename>:</emphasis>
+ This option is a Wic-specific option that specifies the
+ partition UUID.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='command-bootloader'>
+ <title>Command: bootloader</title>
+
+ <para>
+ This command specifies how the bootloader should be configured and
+ supports the following options:
+ <note>
+ Bootloader functionality and boot partitions are implemented by
+ the various <filename>--source</filename> plug-ins that
+ implement bootloader functionality.
+ The bootloader command essentially provides a means of
+ modifying bootloader configuration.
+ </note>
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>--timeout</filename>:</emphasis>
+ Specifies the number of seconds before the bootloader times
+ out and boots the default option.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--append</filename>:</emphasis>
+ Specifies kernel parameters.
+ These parameters will be added to the syslinux
+ <filename>APPEND</filename> or <filename>grub</filename>
+ kernel command line.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>--configfile</filename>:</emphasis>
+ Specifies a user-defined configuration file for the
+ bootloader.
+ You can provide a full pathname for the file or a file that
+ exists in the <filename>canned-wks</filename> folder.
+ This option overrides all other bootloader options.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml
index 752b210152..d4b7bee7d5 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-manual.xml
@@ -22,11 +22,11 @@
<authorgroup>
<author>
- <firstname>Richard</firstname> <surname>Purdie</surname>
+ <firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Linux Foundation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
- <email>richard.purdie@linuxfoundation.org</email>
+ <email>srifenbark@gmail.com</email>
</author>
</authorgroup>
@@ -113,24 +113,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -147,29 +142,31 @@
<note><title>Manual Notes</title>
<itemizedlist>
<listitem><para>
- For the latest version of the Yocto Project Reference
- Manual associated with this Yocto Project release
- (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Reference Manual from the
+ This version of the
+ <emphasis>Yocto Project Reference Manual</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
</para></listitem>
<listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
+ For manuals associated with other releases of the Yocto
+ Project, go to the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
+ and choose the manual associated with the desired
+ Yocto Project.
</para></listitem>
<listitem><para>
- For an in-development version of the Yocto Project
- Reference Manual, see
- <ulink url='&YOCTO_DOCS_URL;/latest/ref-manual/ref-manual.html'></ulink>.
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
</para></listitem>
- </itemizedlist>
- </note>
+ </itemizedlist>
+ </note>
</legalnotice>
</bookinfo>
@@ -178,7 +175,7 @@
<xi:include href="usingpoky.xml"/>
- <xi:include href="closer-look.xml"/>
+ <xi:include href="ref-development-environment.xml"/>
<xi:include href="technical-details.xml"/>
@@ -194,6 +191,8 @@
<xi:include href="ref-devtool-reference.xml"/>
+ <xi:include href="ref-kickstart.xml"/>
+
<xi:include href="ref-qa-checks.xml"/>
<xi:include href="ref-images.xml"/>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml
index fe3ba0933e..e2902eb38b 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-release-process.xml
@@ -61,9 +61,9 @@
<para>
Each major release receives a codename that identifies the release in
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>.
+ <link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>.
The concept is that branches of
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
with the same codename are likely to be compatible and thus
work together.
<note>
@@ -131,7 +131,7 @@
Yocto Project.
For information on how to run available tests on your projects, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -206,7 +206,8 @@
<para>
The Yocto Project's main Autobuilder
(<filename>autobuilder.yoctoproject.org</filename>) publicly tests
- each Yocto Project release's code in the OE-Core, Poky, and BitBake
+ each Yocto Project release's code in the
+ <link linkend='oe-core'>OE-Core</link>, Poky, and BitBake
repositories.
The testing occurs for both the current state of the
"master" branch and also for submitted patches.
@@ -216,7 +217,7 @@
in the <filename>poky</filename> repository.
<note>
You can find all these branches in the Yocto Project
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>.
+ <link linkend='source-repositories'>Source Repositories</link>.
</note>
Testing within these public branches ensures in a publicly visible way
that all of the main supposed architectures and recipes in OE-Core
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml
index 9b2701cc31..4bddc59965 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-structure.xml
@@ -7,16 +7,19 @@
<title>Source Directory Structure</title>
<para>
- The <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> consists of several components.
- Understanding them and knowing where they are located is key to using the Yocto Project well.
- This chapter describes the Source Directory and gives information about the various
- files and directories.
+ The <link linkend='source-directory'>Source Directory</link>
+ consists of several components.
+ Understanding them and knowing where they are located is key to using the
+ Yocto Project well.
+ This chapter describes the Source Directory and gives information about
+ the various files and directories.
</para>
<para>
- For information on how to establish a local Source Directory on your development system, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
- section in the Yocto Project Development Manual.
+ For information on how to establish a local Source Directory on your
+ development system, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+ section in the Yocto Project Development Tasks Manual.
</para>
<note>
@@ -31,7 +34,7 @@
<para>
This section describes the top-level components of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
<section id='structure-core-bitbake'>
@@ -42,7 +45,7 @@
The copy usually matches the current stable BitBake release from
the BitBake project.
BitBake, a
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
interpreter, reads the Yocto Project Metadata and runs the tasks
defined by that data.
Failures are usually from the Metadata and not from BitBake itself.
@@ -53,10 +56,8 @@
When you run the <filename>bitbake</filename> command, the
main BitBake executable, which resides in the
<filename>bitbake/bin/</filename> directory, starts.
- Sourcing an environment setup script (e.g.
- <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend="structure-memres-core-script"><filename>oe-init-build-env-memres</filename></link>)
+ Sourcing the environment setup script (i.e.
+ <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>)
places the <filename>scripts</filename> and
<filename>bitbake/bin</filename> directories (in that order) into
the shell's <filename>PATH</filename> environment variable.
@@ -75,27 +76,24 @@
This directory contains user configuration files and the output
generated by the OpenEmbedded build system in its standard configuration where
the source tree is combined with the output.
- The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ The
+ <link linkend='build-directory'>Build Directory</link>
is created initially when you <filename>source</filename>
the OpenEmbedded build environment setup script
(i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
</para>
<para>
It is also possible to place output and configuration
files in a directory separate from the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
by providing a directory name when you <filename>source</filename>
the setup script.
For information on separating output from your local
Source Directory files, see the
- "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- and
- "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
- sections.
+ "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
+ section.
</para>
</section>
@@ -175,9 +173,7 @@
This directory contains various integration scripts that implement
extra functionality in the Yocto Project environment (e.g. QEMU scripts).
The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
- and
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
- scripts append this directory to the shell's
+ script appends this directory to the shell's
<filename>PATH</filename> environment variable.
</para>
@@ -192,14 +188,7 @@
<title><filename>&OE_INIT_FILE;</filename></title>
<para>
- This script is one of two scripts that set up the OpenEmbedded build
- environment.
- For information on the other script, see the
- "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
- section.
- </para>
-
- <para>
+ This script sets up the OpenEmbedded build environment.
Running this script with the <filename>source</filename> command in
a shell makes changes to <filename>PATH</filename> and sets other
core BitBake variables based on the current working directory.
@@ -212,7 +201,7 @@
<para>
When you run this script, your Yocto Project environment is set
up, a
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
is created, your working directory becomes the Build Directory,
and you are presented with a list of common BitBake targets.
Here is an example:
@@ -234,19 +223,19 @@
The script gets its default list of common targets from the
<filename>conf-notes.txt</filename> file, which is found in the
<filename>meta-poky</filename> directory within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
Should you have custom distributions, it is very easy to modify
this configuration file to include your targets for your
distribution.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
- section in the Yocto Project Development Manual for more
+ section in the Yocto Project Development Tasks Manual for more
information.
</para>
<para>
By default, running this script without a
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
argument creates the <filename>build</filename> directory
in your current working directory.
If you provide a Build Directory argument when you
@@ -254,17 +243,17 @@
build system to create a Build Directory of your choice.
For example, the following command creates a Build Directory named
<filename>mybuilds</filename> that is outside of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
+ <link linkend='source-directory'>Source Directory</link>:
<literallayout class='monospaced'>
$ source &OE_INIT_FILE; ~/mybuilds
</literallayout>
The OpenEmbedded build system uses the template configuration
files, which are found by default in the
<filename>meta-poky/conf</filename> directory in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ Source Directory.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
- section in the Yocto Project Development Manual for more
+ section in the Yocto Project Development Tasks Manual for more
information.
<note>
The OpenEmbedded build system does not support file or directory names that
@@ -278,157 +267,6 @@
</para>
</section>
- <section id='structure-memres-core-script'>
- <title><filename>oe-init-build-env-memres</filename></title>
-
- <para>
- This script is one of two scripts that set up the OpenEmbedded
- build environment.
- Aside from setting up the environment, this script starts a
- memory-resident BitBake server.
- For information on the other setup script, see the
- "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
- section.
- </para>
-
- <para>
- Memory-resident BitBake resides in memory until you specifically
- remove it using the following BitBake command:
- <literallayout class='monospaced'>
- $ bitbake -m
- </literallayout>
- </para>
-
- <para>
- Running this script with the <filename>source</filename> command in
- a shell makes changes to <filename>PATH</filename> and sets other
- core BitBake variables based on the current working directory.
- One of these variables is the
- <link linkend='var-BBSERVER'><filename>BBSERVER</filename></link>
- variable, which allows the OpenEmbedded build system to locate
- the server that is running BitBake.
- </para>
-
- <para>
- You need to run an environment setup script before using BitBake
- commands.
- Following is the script syntax:
- <literallayout class='monospaced'>
- $ source oe-init-build-env-memres <replaceable>port_number</replaceable> <replaceable>build_dir</replaceable>
- </literallayout>
- Following are some considerations when sourcing this script:
- <itemizedlist>
- <listitem><para>
- The script uses other scripts within the
- <filename>scripts</filename> directory to do the bulk of
- the work.
- </para></listitem>
- <listitem><para>
- If you do not provide a port number with the script, the
- BitBake server starts at a randomly selected port.
- </para></listitem>
- <listitem><para>
- The script's parameters are positionally dependent.
- Consequently, you cannot run the script and provide a
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- name without also providing a port number.
- In other words, the following syntax is illegal:
- <literallayout class='monospaced'>
- $ source oe-initbuild-env-memres <replaceable>build_dir</replaceable>
- </literallayout>
- <note>
- The previous restriction might be resolved in the
- future.
- See
- <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=7555'>Bug 7555</ulink>
- for more information.
- </note>
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- When you run this script, your Yocto Project environment is set
- up, a Build Directory is created, your working directory becomes
- the Build Directory, and you are presented with a list of common
- BitBake targets.
- Here is an example:
- <literallayout class='monospaced'>
- $ source oe-init-build-env-memres
- No port specified, using dynamically selected port
-
- ### Shell environment set up for builds. ###
-
- You can now run 'bitbake &lt;target&gt;'
-
- Common targets are:
- core-image-minimal
- core-image-sato
- meta-toolchain
- meta-ide-support
-
- You can also run generated qemu images with a command like 'runqemu qemux86'
- Bitbake server address: 127.0.0.1, server port: 53995
- Bitbake server started on demand as needed, use bitbake -m to shut it down
- </literallayout>
- The script gets its default list of common targets from the
- <filename>conf-notes.txt</filename> file, which is found in the
- <filename>meta-poky</filename> directory within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
- Should you have custom distributions, it is very easy to modify
- this configuration file to include your targets for your
- distribution.
- See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
- section in the Yocto Project Development Manual for more
- information.
- </para>
-
- <para>
- By default, running this script without a
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- argument creates a build directory named
- <filename>build</filename>.
- If you provide a Build Directory argument and port number when you
- <filename>source</filename> the script, the Build Directory is
- created using that name.
- For example, the following command starts the BitBake server using
- port 53995 and creates a Build Directory named
- <filename>mybuilds</filename> that is outside of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
- <literallayout class='monospaced'>
- $ source oe-init-build-env-memres 53995 ~/mybuilds
- </literallayout>
- The <filename>oe-init-build-env-memres</filename> script starts a
- memory resident BitBake server.
- This BitBake instance uses the
- <filename>bitbake-cookerdaemon.log</filename> file, which is
- located in the Build Directory.
- </para>
-
- <para>
- The OpenEmbedded build system uses the template configuration
- files, which are found by default in the
- <filename>meta-poky/conf</filename> directory in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
- See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
- section in the Yocto Project Development Manual for more
- information.
- <note>
- The OpenEmbedded build system does not support file or
- directory names that contain spaces.
- If you attempt to run the
- <filename>oe-init-build-env-memres</filename> script
- from a Source Directory that contains spaces in either the
- filenames or directory names, the script returns an error
- indicating no such file or directory.
- Be sure to use a Source Directory free of names containing
- spaces.
- </note>
- </para>
- </section>
-
<section id='structure-basic-top-level'>
<title><filename>LICENSE, README, and README.hardware</filename></title>
@@ -443,11 +281,9 @@
<para>
The OpenEmbedded build system creates the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- when you run one of the build environment setup scripts (i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ <link linkend='build-directory'>Build Directory</link>
+ when you run the build environment setup scripts (i.e.
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
</para>
<para>
@@ -505,9 +341,7 @@
<filename>local.conf.sample</filename> when
you <filename>source</filename> the top-level build environment
setup script (i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
</para>
<para>
@@ -533,7 +367,7 @@
You can see how the <filename>TEMPLATECONF</filename> variable
is used by looking at the
<filename>scripts/oe-setup-builddir</filename> script in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
You can find the Yocto Project version of the
<filename>local.conf.sample</filename> file in the
<filename>meta-poky/conf</filename> directory.
@@ -559,9 +393,7 @@
<filename>bblayers.conf.sample</filename> when
you <filename>source</filename> the top-level build environment
setup script (i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
</para>
<para>
@@ -585,7 +417,7 @@
<note>
You can see how the <filename>TEMPLATECONF</filename> variable
<filename>scripts/oe-setup-builddir</filename> script in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
You can find the Yocto Project version of the
<filename>bblayers.conf.sample</filename> file in the
<filename>meta-poky/conf</filename> directory.
@@ -733,7 +565,7 @@
contain appropriate <filename>COPYING</filename> license files with other licensing information.
For information on licensing, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
- section.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -777,7 +609,8 @@
sysroot that matches your target hardware.
You can find out more about these installers in the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
- section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
</para>
</section>
@@ -808,7 +641,8 @@
recipe listed in
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
Population of this directory is handled through shared state, while
- the path is specified by the <filename>COMPONENTS_DIR</filename>
+ the path is specified by the
+ <link linkend='var-COMPONENTS_DIR'><filename>COMPONENTS_DIR</filename></link>
variable. Apart from a few unusual circumstances, handling of the
<filename>sysroots-components</filename> directory should be
automatic, and recipes should not directly reference
@@ -907,7 +741,8 @@
<filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
(See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Using Quilt in Your Workflow</ulink>"
- section in the Yocto Project Development Manual for more information.)
+ section in the Yocto Project Development Tasks Manual for more
+ information.)
Within the <filename>linux-qemux86-standard-build</filename> directory,
standard Quilt directories <filename>linux-3.0/patches</filename>
and <filename>linux-3.0/.pc</filename> are created,
@@ -1041,7 +876,7 @@
<para>
As mentioned previously,
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> is the core
+ <link linkend='metadata'>Metadata</link> is the core
of the Yocto Project.
Metadata has several important subdivisions:
</para>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-style.css b/import-layers/yocto-poky/documentation/ref-manual/ref-style.css
index 8ea8dac730..7077e4b70d 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-style.css
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-style.css
@@ -773,6 +773,10 @@ div.navfooter {
border-color: black;
}
+.writernotes {
+ color: red;
+}
+
/*********** /
/ graphics /
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml
index 87ddb98278..c726cb904b 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-tasks.xml
@@ -302,7 +302,7 @@
See the <filename>bin_package.bbclass</filename>
file in the <filename>meta/classes</filename>
directory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
for an example.
</para></listitem>
</itemizedlist>
@@ -495,10 +495,11 @@
<para>
Installs the files into the individual recipe specific sysroots
- (i.e.
+ (i.e. <filename>recipe-sysroot</filename> and
+ <filename>recipe-sysroot-native</filename> under
<filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>
based upon the dependencies specified by
- <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
+ <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>).
See the
"<link linkend='ref-classes-staging'><filename>staging</filename></link>"
class for more information.
@@ -717,7 +718,7 @@
the BitBake environment.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devpyshell'>Using a Development Python Shell</ulink>"
- section in the Yocto Project Development Manual for more
+ section in the Yocto Project Development Tasks Manual for more
information about using <filename>devpyshell</filename>.
</para>
</section>
@@ -730,7 +731,7 @@
development, debugging, or both.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>"
- section in the Yocto Project Development Manual for more
+ section in the Yocto Project Development Tasks Manual for more
information about using <filename>devshell</filename>.
</para>
</section>
@@ -820,7 +821,7 @@
Boots an image and performs runtime tests within the image.
For information on automatically testing images, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
@@ -838,17 +839,7 @@
<para>
For information on automatically testing images, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
- </para>
- </section>
-
- <section id='ref-tasks-vmdkimg'>
- <title><filename>do_vmdkimg</filename></title>
-
- <para>
- Creates a <filename>.vmdk</filename> image for use with
- <ulink url='http://www.vmware.com/'>VMware</ulink>
- and compatible virtual machine hosts.
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
</section>
@@ -892,7 +883,7 @@
$ bitbake linux-yocto -c diffconfig
</literallayout>
For more information, see the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
+ "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
section in the Yocto Project Linux Kernel Development Manual.
</para>
</section>
@@ -927,7 +918,7 @@
$ bitbake linux-yocto -c kernel_configcheck -f
</literallayout>
For more information, see the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
+ "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#validating-configuration'>Validating Configuration</ulink>"
section in the Yocto Project Linux Kernel Development Manual.
</para>
</section>
@@ -965,12 +956,9 @@
</literallayout>
</note>
See the
- "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
+ "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
section in the Yocto Project Linux Kernel Development Manual
for more information on this configuration tool.
- You can also reference the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
- section in the Yocto Project Development Manual.
</para>
</section>
@@ -997,8 +985,8 @@
<para>
Runs <filename>make menuconfig</filename> for the kernel.
For information on <filename>menuconfig</filename>, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using&nbsp;&nbsp;<filename>menuconfig</filename></ulink>"
- section in the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using&nbsp;&nbsp;<filename>menuconfig</filename></ulink>"
+ section in the Yocto Project Linux Kernel Development Manual.
</para>
</section>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml b/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml
index ad10139727..2b0172317d 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/ref-variables.xml
@@ -29,7 +29,7 @@
<link linkend='var-KARCH'>K</link>
<link linkend='var-LABELS'>L</link>
<link linkend='var-MACHINE'>M</link>
-<!-- <link linkend='var-glossary-n'>N</link> -->
+ <link linkend='var-NATIVELSBSTRING'>N</link>
<link linkend='var-OBJCOPY'>O</link>
<link linkend='var-P'>P</link>
<!-- <link linkend='var-glossary-q'>Q</link> -->
@@ -321,7 +321,7 @@
For information on how the variable works, see the
<filename>meta/classes/archiver.bbclass</filename> file
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
</glossdef>
</glossentry>
@@ -488,7 +488,7 @@
<para>
For more information see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -536,7 +536,7 @@
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The directory within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
in which the OpenEmbedded build system places generated
objects during a recipe's build process.
By default, this directory is the same as the <link linkend='var-S'><filename>S</filename></link>
@@ -626,14 +626,14 @@
Multilib context.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
- section in the Yocto Project Development Manual for
+ section in the Yocto Project Development Tasks Manual for
information on Multilib.
</para>
<para>
The <filename>BASE_LIB</filename> variable is defined in
the machine include files in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
If Multilib is not being used, the value defaults to "lib".
</para>
</glossdef>
@@ -734,7 +734,7 @@
variable to "1", "yes", or "true"
in your <filename>local.conf</filename> file, which is
located in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
+ <link linkend='build-directory'>Build Directory</link>:
Here is an example:
<literallayout class='monospaced'>
BB_DANGLINGAPPENDS_WARNONLY = "1"
@@ -759,7 +759,7 @@
Disk space monitoring is disabled by default.
To enable monitoring, add the <filename>BB_DISKMON_DIRS</filename>
variable to your <filename>conf/local.conf</filename> file found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
Use the following form:
<literallayout class='monospaced'>
BB_DISKMON_DIRS = "<replaceable>action</replaceable>,<replaceable>dir</replaceable>,<replaceable>threshold</replaceable> [...]"
@@ -852,7 +852,7 @@
Defines the disk space and free inode warning intervals.
To set these intervals, define the variable in your
<filename>conf/local.conf</filename> file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
</para>
<para>
@@ -936,7 +936,7 @@
</literallayout>
Set this variable in your <filename>local.conf</filename>
file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
</para>
</glossdef>
</glossentry>
@@ -1154,7 +1154,8 @@
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Lists the layers to enable during the build.
This variable is defined in the <filename>bblayers.conf</filename> configuration
- file in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ file in the
+ <link linkend='build-directory'>Build Directory</link>.
Here is an example:
<literallayout class='monospaced'>
BBLAYERS = " \
@@ -1250,7 +1251,7 @@
BBMULTIFONFIG = "configA configB configC"
</literallayout>
Each configuration file you use must reside in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory's</ulink>
+ <link linkend='build-directory'>Build Directory</link>
<filename>conf/multiconfig</filename> directory
(e.g.
<replaceable>build_directory</replaceable><filename>/conf/multiconfig/configA.conf</filename>).
@@ -1262,7 +1263,7 @@
supports building targets with multiple configurations,
see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-building-targets-with-multiple-configurations'>Building Targets with Multiple Configurations</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -1280,7 +1281,7 @@
<filename>PATH</filename> variable.
<note>
If you run BitBake from a directory outside of the
- <ulink url='&YOCTO_DOCS_DEV_URL;build-directory'>Build Directory</ulink>,
+ <link linkend='build-directory'>Build Directory</link>,
you must be sure to set
<filename>BBPATH</filename> to point to the
Build Directory.
@@ -1298,29 +1299,29 @@
<glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
<info>
- BBSERVER[doc] = "Points to the server that runs memory-resident BitBake."
+ BBSERVER[doc] = "Points to the BitBake remote server."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
- Points to the server that runs memory-resident BitBake.
- This variable is set by the
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
- setup script and should not be hand-edited.
- The variable is only used when you employ memory-resident
- BitBake.
- The setup script exports the value as follows:
+ If defined in the BitBake environment,
+ <filename>BBSERVER</filename> points to the BitBake
+ remote server.
+ </para>
+
+ <para>
+ Use the following format to export the variable to the
+ BitBake environment:
<literallayout class='monospaced'>
- export BBSERVER=localhost:$port
+ export BBSERVER=localhost:$port"
</literallayout>
</para>
<para>
- For more information on how the
- <filename>BBSERVER</filename> is used, see the
- <filename>oe-init-build-env-memres</filename> script, which
- is located in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ By default, <filename>BBSERVER</filename> also appears in
+ <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST'><filename>BB_HASHBASE_WHITELIST</filename></ulink>.
+ Consequently, <filename>BBSERVER</filename> is excluded
+ from checksum and dependency data.
</para>
</glossdef>
</glossentry>
@@ -1373,7 +1374,7 @@
<para>
For more information on how this variable works, see
<filename>meta/classes/binconfig.bbclass</filename> in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
You can also find general information on the class in the
"<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
section.
@@ -1456,6 +1457,51 @@
</glossdef>
</glossentry>
+ <glossentry id='var-BUILD_AS_ARCH'><glossterm>BUILD_AS_ARCH</glossterm>
+ <info>
+ BUILD_AS_ARCH[doc] = "Specifies the architecture-specific assembler flags for the build host."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies the architecture-specific assembler flags for
+ the build host. By default, the value of
+ <filename>BUILD_AS_ARCH</filename> is empty.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-BUILD_CC_ARCH'><glossterm>BUILD_CC_ARCH</glossterm>
+ <info>
+ BUILD_CC_ARCH[doc] = "Specifies the architecture-specific C compiler flags for the build host."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies the architecture-specific C compiler flags for
+ the build host. By default, the value of
+ <filename>BUILD_CC_ARCH</filename> is empty.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-BUILD_CCLD'><glossterm>BUILD_CCLD</glossterm>
+ <info>
+ BUILD_CCLD[doc] = "Specifies the linker command to be used for the build host when the C compiler is being used as the linker."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies the linker command to be used for the build host
+ when the C compiler is being used as the linker. By default,
+ <filename>BUILD_CCLD</filename> points to GCC and passes as
+ arguments the value of
+ <link linkend='var-BUILD_CC_ARCH'><filename>BUILD_CC_ARCH</filename></link>,
+ assuming <filename>BUILD_CC_ARCH</filename> is set.
+ </para>
+ </glossdef>
+ </glossentry>
+
<glossentry id='var-BUILD_CFLAGS'><glossterm>BUILD_CFLAGS</glossterm>
<info>
BUILD_CFLAGS[doc] = "Specifies the flags to pass to the C compiler when building for the build host."
@@ -1505,6 +1551,52 @@
</glossdef>
</glossentry>
+ <glossentry id='var-BUILD_FC'><glossterm>BUILD_FC</glossterm>
+ <info>
+ BUILD_FC[doc] = "Specifies the Fortran compiler command for the build host."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies the Fortran compiler command for the build host.
+ By default, <filename>BUILD_FC</filename> points to
+ Gfortran and passes as arguments the value of
+ <link linkend='var-BUILD_CC_ARCH'><filename>BUILD_CC_ARCH</filename></link>,
+ assuming <filename>BUILD_CC_ARCH</filename> is set.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-BUILD_LD'><glossterm>BUILD_LD</glossterm>
+ <info>
+ BUILD_LD[doc] = "Specifies the linker command for the build host."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies the linker command for the build host. By default,
+ <filename>BUILD_LD</filename> points to the GNU linker (ld)
+ and passes as arguments the value of
+ <link linkend='var-BUILD_LD_ARCH'><filename>BUILD_LD_ARCH</filename></link>,
+ assuming <filename>BUILD_LD_ARCH</filename> is set.
+ </para>
+ </glossdef>
+ </glossentry>
+
+ <glossentry id='var-BUILD_LD_ARCH'><glossterm>BUILD_LD_ARCH</glossterm>
+ <info>
+ BUILD_LD_ARCH[doc] = "Specifies architecture-specific linker flags for the build."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies architecture-specific linker flags for the build
+ host. By default, the value of
+ <filename>BUILD_LD_ARCH</filename> is empty.
+ </para>
+ </glossdef>
+ </glossentry>
+
<glossentry id='var-BUILD_LDFLAGS'><glossterm>BUILD_LDFLAGS</glossterm>
<info>
BUILD_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the build host."
@@ -1578,6 +1670,21 @@
</glossdef>
</glossentry>
+ <glossentry id='var-BUILD_STRIP'><glossterm>BUILD_STRIP</glossterm>
+ <info>
+ BUILD_STRIP[doc] = "Specifies the command to be used to strip debugging symbols from binaries produced for the build host."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Specifies the command to be used to strip debugging symbols
+ from binaries produced for the build host. By default,
+ <filename>BUILD_STRIP</filename> points to
+ <filename>${</filename><link linkend='var-BUILD_PREFIX'><filename>BUILD_PREFIX</filename></link><filename>}strip</filename>.
+ </para>
+ </glossdef>
+ </glossentry>
+
<glossentry id='var-BUILD_SYS'><glossterm>BUILD_SYS</glossterm>
<info>
BUILD_SYS[doc] = "The toolchain binary prefix used for native recipes."
@@ -1626,14 +1733,12 @@
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Points to the location of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
You can define this directory indirectly through the
<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- and
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
- scripts by passing in a Build Directory path when you run
- the scripts.
- If you run the scripts and do not provide a Build Directory
+ script by passing in a Build Directory path when you run
+ the script.
+ If you run the script and do not provide a Build Directory
path, the <filename>BUILDDIR</filename> defaults to
<filename>build</filename> in the current directory.
</para>
@@ -1968,7 +2073,7 @@
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Specifies the directory BitBake uses to store a cache
of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
so it does not need to be parsed every time BitBake is
started.
</para>
@@ -2126,7 +2231,7 @@
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Points to <filename>meta/files/common-licenses</filename>
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+ <link linkend='source-directory'>Source Directory</link>,
which is where generic license files reside.
</para>
</glossdef>
@@ -2207,6 +2312,27 @@
</glossdef>
</glossentry>
+ <glossentry id='var-COMPONENTS_DIR'><glossterm>COMPONENTS_DIR</glossterm>
+ <info>
+ COMPONENTS_DIR[doc] = "Stores sysroot components for each recipe."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Stores sysroot components for each recipe.
+ The OpenEmbedded build system uses
+ <filename>COMPONENTS_DIR</filename> when constructing
+ recipe-specific sysroots for other recipes.
+ </para>
+
+ <para>
+ The default is
+ "<filename>${</filename><link linkend='var-STAGING_DIR'><filename>STAGING_DIR</filename></link><filename>}-components</filename>."
+ (i.e. "<filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/sysroots-components</filename>").
+ </para>
+ </glossdef>
+ </glossentry>
+
<glossentry id='var-CONF_VERSION'><glossterm>CONF_VERSION</glossterm>
<info>
CONF_VERSION[doc] = "Tracks the version of local.conf. Increased each time build/conf/ changes incompatibly."
@@ -2272,7 +2398,7 @@
than <filename>/usr/bin</filename>.
You can find a list of these variables at the top of the
<filename>meta/conf/bitbake.conf</filename> file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</note>
</glossdef>
</glossentry>
@@ -2315,7 +2441,7 @@
<para>
For information on creating an initramfs, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -2549,8 +2675,8 @@
variable for additional information.
You can also reference the
"<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
- section in the Yocto Project Development Manual for
- information on providing license text.
+ section in the Yocto Project Development Tasks Manual
+ for information on providing license text.
</note>
</para>
</glossdef>
@@ -2577,8 +2703,8 @@
variable for additional information.
You can also reference the
"<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
- section in the Yocto Project Development Manual for
- information on providing license text.
+ section in the Yocto Project Development Tasks Manual
+ for information on providing license text.
</note>
</para>
</glossdef>
@@ -2595,7 +2721,7 @@
You should only set this variable in the
<filename>local.conf</filename> configuration file found
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
</para>
<para>
@@ -2805,7 +2931,8 @@
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The destination directory.
- The location in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ The location in the
+ <link linkend='build-directory'>Build Directory</link>
where components are installed by the
<link linkend='ref-tasks-install'><filename>do_install</filename></link>
task.
@@ -3116,7 +3243,7 @@
system uses to place images, packages, SDKs and other output
files that are ready to be used outside of the build system.
By default, this directory resides within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
as <filename>${TMPDIR}/deploy</filename>.
</para>
@@ -3189,7 +3316,7 @@
The directory is machine-specific as it contains the
<filename>${MACHINE}</filename> name.
By default, this directory resides within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
as <filename>${DEPLOY_DIR}/images/${MACHINE}/</filename>.
</para>
@@ -3439,7 +3566,7 @@
and resides in the
<filename>meta-poky/conf/distro</filename> directory of
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
<para>
@@ -3453,7 +3580,7 @@
<para>
Distribution configuration files are located in a
<filename>conf/distro</filename> directory within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
that contains the distribution configuration.
The value for <filename>DISTRO</filename> must not contain
spaces, and is typically all lower-case.
@@ -3794,7 +3921,7 @@
to touch it.
By default, the directory is <filename>downloads</filename>
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
<literallayout class='monospaced'>
#DL_DIR ?= "${TOPDIR}/downloads"
</literallayout>
@@ -3862,14 +3989,14 @@
<glossentry id='var-EFI_PROVIDER'><glossterm>EFI_PROVIDER</glossterm>
<info>
- EFI_PROVIDER[doc] = "When building bootable images (i.e. where hddimg or vmdk is in IMAGE_FSTYPES), the EFI_PROVIDER variable specifies the EFI bootloader to use."
+ 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."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
When building bootable images (i.e. where
- <filename>hddimg</filename> or <filename>vmdk</filename>
- is in
+ <filename>hddimg</filename>, <filename>iso</filename>,
+ or <filename>wic.vmdk</filename> is in
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>),
the <filename>EFI_PROVIDER</filename> variable specifies
the EFI bootloader to use.
@@ -4117,7 +4244,7 @@
You can also find information on how to use this variable
in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -4148,7 +4275,7 @@
You can also find information on how to use this variable
in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -4191,7 +4318,7 @@
<para>
Typically, you configure this variable in your
<filename>local.conf</filename> file, which is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
Although you can use this variable from within a recipe,
best practices dictate that you do not.
<note>
@@ -4225,8 +4352,8 @@
filesystem is read-only. See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
section in the Yocto Project
- Development Manual for more
- information
+ Development Tasks Manual for
+ more information
"tools-debug" - Adds debugging tools such as gdb and
strace.
@@ -4252,7 +4379,7 @@
For an example that shows how to customize your image by
using this variable, see the
"<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>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -4541,7 +4668,7 @@
<filename>/usr/bin</filename>.
You can find a list of these variables at the top of the
<filename>meta/conf/bitbake.conf</filename> file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
You will also find the default values of the various
<filename>FILES_*</filename> variables in this file.
</note>
@@ -4615,7 +4742,8 @@
in a directory that has the same name as the corresponding
append file.
<note>
- <para>When extending <filename>FILESEXTRAPATHS</filename>,
+ <para>When extending
+ <filename>FILESEXTRAPATHS</filename>,
be sure to use the immediate expansion
(<filename>:=</filename>) operator.
Immediate expansion makes sure that BitBake evaluates
@@ -4624,6 +4752,7 @@
some later time when expansion might result in a
directory that does not contain the files you need.
</para>
+
<para>Also, include the trailing separating colon
character if you are prepending.
The trailing colon character is necessary because you
@@ -4641,13 +4770,37 @@
</para>
<para>
- Here is a final example that specifically adds three paths:
+ This next example specifically adds three paths:
<literallayout class='monospaced'>
FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
</literallayout>
</para>
<para>
+ A final example shows how you can extend the search path
+ and include a
+ <link linkend='var-MACHINE'><filename>MACHINE</filename></link>-specific
+ override, which is useful in a BSP layer:
+ <literallayout class='monospaced'>
+ FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
+ </literallayout>
+ The previous statement appears in the
+ <filename>linux-yocto-dev.bbappend</filename> file, which
+ is found in the Yocto Project
+ <link linkend='source-repositories'>Source Repositories</link>
+ in
+ <filename>meta-intel/common/recipes-kernel/linux</filename>.
+ Here, the machine override is a special
+ <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
+ definition for multiple <filename>meta-intel</filename>
+ machines.
+ <note>
+ For a layer that supports a single BSP, the override
+ could just be the value of <filename>MACHINE</filename>.
+ </note>
+ </para>
+
+ <para>
By prepending paths in <filename>.bbappend</filename>
files, you allow multiple append files that reside in
different layers but are used for the same recipe to
@@ -4707,7 +4860,7 @@
The default value for the <filename>FILESPATH</filename>
variable is defined in the <filename>base.bbclass</filename>
class found in <filename>meta/classes</filename> in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
+ <link linkend='source-directory'>Source Directory</link>:
<literallayout class='monospaced'>
FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
"${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
@@ -4753,7 +4906,7 @@
<para>
By default, the OpenEmbedded build system uses the <filename>fs-perms.txt</filename>, which
is located in the <filename>meta/files</filename> folder in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
If you create your own file permissions setting table, you should place it in your
layer or the distro's layer.
</para>
@@ -4761,7 +4914,7 @@
<para>
You define the <filename>FILESYSTEM_PERMS_TABLES</filename> variable in the
<filename>conf/local.conf</filename> file, which is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>, to
+ <link linkend='build-directory'>Build Directory</link>, to
point to your custom <filename>fs-perms.txt</filename>.
You can specify more than a single file permissions setting table.
The paths you specify to these files must be defined within the
@@ -5539,7 +5692,7 @@
<para>
For more information, see
<filename>meta/classes/image_types.bbclass</filename> in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
</glossdef>
</glossentry>
@@ -5613,7 +5766,7 @@
Typically, you configure this variable in an image recipe.
Although you can use this variable from your
<filename>local.conf</filename> file, which is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+ <link linkend='build-directory'>Build Directory</link>,
best practices dictate that you do not.
<note>
To enable extra features from outside the image recipe,
@@ -5633,7 +5786,7 @@
For an example that shows how to customize your image by
using this variable, see the
"<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>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -5662,20 +5815,25 @@
<link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>.
</para>
- <note>
- If you add "live" to <filename>IMAGE_FSTYPES</filename>
- inside an image recipe, be sure that you do so prior to the
- "inherit image" line of the recipe or the live image will
- not build.
- </note>
-
- <note>
- Due to the way this variable is processed, it is not
- possible to update its contents using
- <filename>_append</filename> or
- <filename>_prepend</filename>. To add one or more
- additional options to this variable the
- <filename>+=</filename> operator must be used.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ If you add "live" to
+ <filename>IMAGE_FSTYPES</filename> inside an image
+ recipe, be sure that you do so prior to the
+ "inherit image" line of the recipe or the live
+ image will not build.
+ </para></listitem>
+ <listitem><para>
+ Due to the way the OpenEmbedded build system
+ processes this variable, you cannot update its
+ contents by using <filename>_append</filename> or
+ <filename>_prepend</filename>.
+ You must use the <filename>+=</filename>
+ operator to add one or more options to the
+ <filename>IMAGE_FSTYPES</filename> variable.
+ </para></listitem>
+ </itemizedlist>
</note>
</glossdef>
</glossentry>
@@ -5703,7 +5861,7 @@
not be affected by <filename>IMAGE_INSTALL</filename>.
For information on creating an initramfs, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</note>
</para>
@@ -6188,7 +6346,6 @@
jffs2
jffs2.sum
multiubi
- qcow2
squashfs
squashfs-lzo
squashfs-xz
@@ -6199,8 +6356,6 @@
tar.xz
ubi
ubifs
- vdi
- vmdk
wic
wic.bz2
wic.gz
@@ -6212,7 +6367,7 @@
For more information about these types of images, see
<filename>meta/classes/image_types*.bbclass</filename>
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
</glossdef>
</glossentry>
@@ -6455,7 +6610,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
The default value of this variable, which is set in the
<filename>meta/conf/bitbake.conf</filename> configuration
file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+ <link linkend='source-directory'>Source Directory</link>,
is "cpio.gz".
The Linux kernel's initramfs mechanism, as opposed to the
initial RAM filesystem
@@ -6477,32 +6632,38 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
name of an image recipe that is used to build an initial
RAM filesystem (initramfs) image.
- An initramfs provides a temporary root filesystem used for
- early system initialization (e.g. loading of modules
- needed to locate and mount the "real" root filesystem).
- The specified recipe is added as a dependency of the root
- filesystem recipe (e.g.
- <filename>core-image-sato</filename>).
- See the <filename>meta/recipes-core/images/core-image-minimal-initramfs.bb</filename>
- recipe in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
- for an example initramfs recipe.
- To select this recipe to provide the initramfs,
- set <filename>INITRAMFS_IMAGE</filename> to
- "core-image-minimal-initramfs".
+ In other words, the <filename>INITRAMFS_IMAGE</filename>
+ variable causes an additional recipe to be built as
+ a dependency to whatever root filesystem recipe you
+ might be using (e.g. <filename>core-image-sato</filename>).
+ The initramfs image recipe you provide should set
+ <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
+ to
+ <link linkend='var-INITRAMFS_FSTYPES'><filename>INITRAMFS_FSTYPES</filename></link>.
+ </para>
+
+ <para>
+ An initramfs image provides a temporary root filesystem
+ used for early system initialization (e.g. loading of
+ modules needed to locate and mount the "real" root
+ filesystem).
<note>
- The initramfs image recipe should set
- <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
- to
- <link linkend='var-INITRAMFS_FSTYPES'><filename>INITRAMFS_FSTYPES</filename></link>.
+ See the <filename>meta/recipes-core/images/core-image-minimal-initramfs.bb</filename>
+ recipe in the
+ <link linkend='source-directory'>Source Directory</link>
+ for an example initramfs recipe.
+ To select this sample recipe as the one built
+ to provide the initramfs image,
+ set <filename>INITRAMFS_IMAGE</filename> to
+ "core-image-minimal-initramfs".
</note>
</para>
<para>
You can also find more information by referencing the
- <filename>meta/poky/conf/local.conf.sample.extended</filename>
+ <filename>meta-poky/conf/local.conf.sample.extended</filename>
configuration file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+ <link linkend='source-directory'>Source Directory</link>,
the
<link linkend='ref-classes-image'><filename>image</filename></link>
class, and the
@@ -6513,7 +6674,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
If <filename>INITRAMFS_IMAGE</filename> is empty, which is
- the default, then no initramfs is built.
+ the default, then no initramfs image is built.
</para>
<para>
@@ -6521,10 +6682,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></link>
variable, which allows the generated image to be bundled
inside the kernel image.
- Additionally, for information on creating an initramfs, see
- the
+ Additionally, for information on creating an initramfs
+ image, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -6562,7 +6723,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
The combined binary is deposited into the
<filename>tmp/deploy</filename> directory, which is part
of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
</para>
<para>
@@ -6591,7 +6752,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
file for additional information.
Also, for information on creating an initramfs, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -6862,12 +7023,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
Values for this variable are set in the kernel's recipe
file and the kernel's append file.
- For example, if you are using the Yocto Project kernel that
- is based on the Linux 3.14 kernel, the kernel recipe file
- is the
- <filename>meta/recipes-kernel/linux/linux-yocto_3.14.bb</filename>
+ For example, if you are using the
+ <filename>linux-yocto_4.12</filename> kernel, the kernel
+ recipe file is the
+ <filename>meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>
file.
- Following is an example for a kernel recipe file:
+ <filename>KBRANCH</filename> is set as follows in that
+ kernel recipe file:
<literallayout class='monospaced'>
KBRANCH ?= "standard/base"
</literallayout>
@@ -6877,21 +7039,25 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
This variable is also used from the kernel's append file
to identify the kernel branch specific to a particular
machine or target hardware.
- The kernel's append file is located in the BSP layer for
- a given machine.
- For example, the kernel append file for the Emenlow BSP is in the
- <filename>meta-intel</filename> Git repository and is named
- <filename>meta-emenlow/recipes-kernel/linux/linux-yocto_3.14.bbappend</filename>.
- Here are the related statements from the append file:
+ Continuing with the previous kernel example, the kernel's
+ append file (i.e.
+ <filename>linux-yocto_4.12.bbappend</filename>) is located
+ in the BSP layer for a given machine.
+ For example, the append file for the Beaglebone,
+ EdgeRouter, and generic versions of both 32 and 64-bit IA
+ machines (<filename>meta-yocto-bsp</filename>) is named
+ <filename>meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend</filename>.
+ Here are the related statements from that append file:
<literallayout class='monospaced'>
- COMPATIBLE_MACHINE_emenlow-noemgd = "emenlow-noemgd"
- KMACHINE_emenlow-noemgd = "emenlow"
- KBRANCH_emenlow-noemgd = "standard/base"
- KERNEL_FEATURES_append_emenlow-noemgd = " features/drm-gma500/drm-gma500.scc"
+ KBRANCH_genericx86 = "standard/base"
+ KBRANCH_genericx86-64 = "standard/base"
+ KBRANCH_edgerouter = "standard/edgerouter"
+ KBRANCH_beaglebone = "standard/beaglebone"
+ KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
</literallayout>
- The <filename>KBRANCH</filename> statement identifies
- the kernel branch to use when building for the Emenlow
- BSP.
+ The <filename>KBRANCH</filename> statements identify
+ the kernel branch to use when building for each
+ supported BSP.
</para>
</glossdef>
</glossentry>
@@ -6913,20 +7079,23 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Typically, when using a <filename>defconfig</filename> to
configure a kernel during a build, you place the
file in your layer in the same manner as you would
- patch files and configuration fragment files (i.e.
+ place patch files and configuration fragment files (i.e.
"out-of-tree").
However, if you want to use a <filename>defconfig</filename>
file that is part of the kernel tree (i.e. "in-tree"),
you can use the
- <filename>KBUILD_DEFCONFIG</filename> variable to point
- to the <filename>defconfig</filename> file.
+ <filename>KBUILD_DEFCONFIG</filename> variable and append
+ the
+ <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
+ variable to point to the <filename>defconfig</filename>
+ file.
</para>
<para>
To use the variable, set it in the append file for your
kernel recipe using the following form:
<literallayout class='monospaced'>
- KBUILD_DEFCONFIG_<link linkend='var-KMACHINE'>KMACHINE</link> ?= <replaceable>defconfig_file</replaceable>
+ KBUILD_DEFCONFIG_<replaceable>KMACHINE</replaceable> ?= <replaceable>defconfig_file</replaceable>
</literallayout>
Here is an example from a "raspberrypi2"
<filename>KMACHINE</filename> build that uses a
@@ -7028,41 +7197,50 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
<info>
- KERNEL_FEATURES[doc] = "Includes additional metadata from the Yocto Project kernel Git repository. The metadata you add through this variable includes config fragments and features descriptions."
+ KERNEL_FEATURES[doc] = "Includes additional kernel metadata. The metadata you add through this variable includes config fragments and features descriptions."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
- Includes additional metadata from the Yocto Project kernel Git repository.
- In the OpenEmbedded build system, the default Board Support Packages (BSPs)
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ Includes additional kernel metadata.
+ In the OpenEmbedded build system, the default Board Support
+ Packages (BSPs)
+ <link linkend='metadata'>Metadata</link>
is provided through
the <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
- and <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link> variables.
- You can use the <filename>KERNEL_FEATURES</filename> variable to further
- add metadata for all BSPs.
+ and
+ <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>
+ variables.
+ You can use the <filename>KERNEL_FEATURES</filename>
+ variable from within the kernel recipe or kernel append
+ file to further add metadata for all BSPs or specific
+ BSPs.
</para>
<para>
- The metadata you add through this variable includes config fragments and
- features descriptions,
+ The metadata you add through this variable includes config
+ fragments and features descriptions,
which usually includes patches as well as config fragments.
- You typically override the <filename>KERNEL_FEATURES</filename> variable
- for a specific machine.
- In this way, you can provide validated, but optional, sets of kernel
- configurations and features.
- </para>
-
- <para>
- For example, the following adds <filename>netfilter</filename> to all
- the Yocto Project kernels and adds sound support to the <filename>qemux86</filename>
- machine:
- <literallayout class='monospaced'>
- # Add netfilter to all linux-yocto kernels
- KERNEL_FEATURES="features/netfilter/netfilter.scc"
-
- # Add sound support to the qemux86 machine
- KERNEL_FEATURES_append_qemux86=" cfg/sound.scc"
+ You typically override the
+ <filename>KERNEL_FEATURES</filename> variable for a
+ specific machine.
+ In this way, you can provide validated, but optional,
+ sets of kernel configurations and features.
+ </para>
+
+ <para>
+ For example, the following example from the
+ <filename>linux-yocto-rt_4.12</filename> kernel recipe
+ adds "netfilter" and "taskstats" features to all BSPs
+ as well as "virtio" configurations to all QEMU machines.
+ The last two statements add specific configurations to
+ targeted machine types:
+ <literallayout class='monospaced'>
+ KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+ KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+ KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+ KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+ KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
</literallayout></para>
</glossdef>
</glossentry>
@@ -7739,7 +7917,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
variable, and the
"<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -7838,7 +8016,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
defines the search
arguments used by the kernel tools to find the appropriate
description within the kernel
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
with which to build out the sources and configuration.
</para>
</glossdef>
@@ -7942,7 +8120,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Specifies the target device for which the image is built.
You define <filename>MACHINE</filename> in the
<filename>local.conf</filename> file found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
By default, <filename>MACHINE</filename> is set to
"qemux86", which is an x86-based architecture machine to
be emulated using QEMU:
@@ -7957,7 +8135,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Thus, when <filename>MACHINE</filename> is set to "qemux86" there
exists the corresponding <filename>qemux86.conf</filename> machine
configuration file, which can be found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
in <filename>meta/conf/machine</filename>.
</para>
@@ -8708,6 +8886,29 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
+ <glossentry id='var-NOAUTOPACKAGEDEBUG'><glossterm>NOAUTOPACKAGEDEBUG</glossterm>
+ <info>
+ NOAUTOPACKAGEDEBUG[doc] = "Disables auto package from splitting .debug files."
+ </info>
+ <glossdef>
+ <para role="glossdeffirst">
+<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+ Disables auto package from splitting
+ <filename>.debug</filename> files. If a recipe requires
+ <filename>FILES_${PN}-dbg</filename> to be set manually,
+ the <filename>NOAUTOPACKAGEDEBUG</filename> can be defined
+ allowing you to define the content of the debug package.
+ For example:
+ <literallayout class='monospaced'>
+ NOAUTOPACKAGEDEBUG = "1"
+ FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
+ FILES_${PN}-dbg = "/usr/src/debug/"
+ FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
+ </literallayout>
+ </para>
+ </glossdef>
+ </glossentry>
+
<glossentry id='var-NOHDD'><glossterm>NOHDD</glossterm>
<info>
NOHDD[doc] = "Causes the OpenEmbedded build system to skip building the .hddimg image."
@@ -8798,7 +8999,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
See the <filename>meta/classes/binconfig.bbclass</filename>
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
for details on how this class applies these additional
sed command arguments.
For general information on the
@@ -8863,7 +9064,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>-c devshell</filename> command-line option).
For more information, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
- in the Yocto Project Development Manual.
+ in the Yocto Project Development Tasks Manual.
</para>
<para>
@@ -8891,19 +9092,17 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The directory from which the top-level build environment
setup script is sourced.
- The Yocto Project makes two top-level build environment
- setup scripts available:
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- and
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
- When you run one of these scripts, the
+ The Yocto Project provides a top-level build environment
+ setup script:
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>.
+ When you run this script, the
<filename>OEROOT</filename> variable resolves to the
directory that contains the script.
</para>
<para>
For additional information on how this variable is used,
- see the initialization scripts.
+ see the initialization script.
</para>
</glossdef>
</glossentry>
@@ -9086,7 +9285,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
This variable, which is set in the
<filename>local.conf</filename> configuration file found in
the <filename>conf</filename> folder of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+ <link linkend='build-directory'>Build Directory</link>,
specifies the package manager the OpenEmbedded build system
uses when packaging data.
</para>
@@ -9179,7 +9378,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
You can find out more about debugging using GDB by reading
the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -9466,7 +9665,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
variable.
For information on creating an initramfs, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -9522,7 +9721,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
For information on running post-installation scripts, see
the
"<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts'>Post-Installation Scripts</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -9654,7 +9853,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-PACKAGECONFIG_CONFARGS'><glossterm>PACKAGECONFIG_CONFARGS</glossterm>
<info>
- PACKAGECONFIG_CONFARGS[doc] = "A space-separated list of configuration options generated from PACKAGECONFIG."
+ PACKAGECONFIG_CONFARGS[doc] = "A space-separated list of configuration options generated from the PACKAGECONFIG setting."
</info>
<glossdef>
<para role="glossdeffirst">
@@ -9789,7 +9988,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
For an example of how to use the <filename>PACKAGES_DYNAMIC</filename>
variable when you are splitting packages, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging'>Handling Optional Module Packaging</ulink>" section
- in the Yocto Project Development Manual.
+ in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -9854,7 +10053,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
the recipe as a workaround.
For information on addressing race conditions, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#debugging-parallel-make-races'>Debugging Parallel Make Races</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</note>
For single socket systems (i.e. one CPU), you should not
have to override this variable to gain optimal parallelism
@@ -9903,7 +10102,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
the recipe as a workaround.
For information on addressing race conditions, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#debugging-parallel-make-races'>Debugging Parallel Make Races</ulink>"
- section in the Yocto Project Development Manual.</para>
+ section in the Yocto Project Development Tasks Manual.
+ </para>
</note>
</para>
</glossdef>
@@ -10385,7 +10585,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
cumbersome and error-prone, an automated solution exists.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
- section for more information.
+ section in the Yocto Project Development Tasks Manual
+ for more information.
</para>
</glossdef>
</glossentry>
@@ -10409,6 +10610,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
</literallayout>
+ For more information see:
+ <link linkend='metadata-virtual-providers'>Metadata (Virtual Providers)</link>
<note>
If you set <filename>PREFERRED_PROVIDER</filename>
for a <filename>virtual/*</filename> item, then any
@@ -10445,7 +10648,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Here are two examples:
<literallayout class='monospaced'>
PREFERRED_VERSION_python = "3.4.0"
- PREFERRED_VERSION_linux-yocto = "3.19%"
+ PREFERRED_VERSION_linux-yocto = "4.12%"
</literallayout>
<note>
The specified version is matched against
@@ -10480,14 +10683,14 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
to set a machine-specific override.
Here is an example:
<literallayout class='monospaced'>
- PREFERRED_VERSION_linux-yocto_qemux86 = "3.4%"
+ PREFERRED_VERSION_linux-yocto_qemux86 = "4.12%"
</literallayout>
Although not recommended, worst case, you can also use the
"forcevariable" override, which is the strongest override
possible.
Here is an example:
<literallayout class='monospaced'>
- PREFERRED_VERSION_linux-yocto_forcevariable = "3.4%"
+ PREFERRED_VERSION_linux-yocto_forcevariable = "4.12%"
</literallayout>
<note>
The <filename>_forcevariable</filename> override is
@@ -10532,7 +10735,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
build system to attempt before any others by adding
something like the following to the
<filename>local.conf</filename> configuration file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
+ <link linkend='build-directory'>Build Directory</link>:
<literallayout class='monospaced'>
PREMIRRORS_prepend = "\
git://.*/.* http://www.yoctoproject.org/sources/ \n \
@@ -10710,7 +10913,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
The <filename>conf/local.conf.sample.extended</filename>
configuration file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
shows how the <filename>PRSERV_HOST</filename> variable is
set:
<literallayout class='monospaced'>
@@ -11494,7 +11697,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The location in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
where unpacked recipe source code resides.
By default, this directory is
<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>,
@@ -11502,7 +11705,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
and <filename>${PV}</filename> is the recipe version.
If the source tarball extracts the code to a directory
named anything other than <filename>${BPN}-${PV}</filename>,
- or if the source code if fetched from an SCM such as
+ or if the source code is fetched from an SCM such as
Git or Subversion, then you must set <filename>S</filename>
in the recipe so that the OpenEmbedded build system
knows where to find the unpacked source.
@@ -11510,7 +11713,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
As an example, assume a
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
top-level folder named <filename>poky</filename> and a
default Build Directory at <filename>poky/build</filename>.
In this case, the work directory the build system uses
@@ -12412,7 +12615,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
To enable file removal, set the variable to "1" in your
<filename>conf/local.conf</filename> configuration file
in your:
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
<literallayout class='monospaced'>
SKIP_FILEDEPS = "1"
</literallayout>
@@ -12619,7 +12822,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<listitem><para><emphasis><filename>file://</filename> -</emphasis>
Fetches files, which are usually files shipped with
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
+ <link linkend='metadata'>Metadata</link>,
from the local machine.
The path is relative to the
<link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
@@ -12819,7 +13022,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
The <filename>SRCPV</filename> variable is defined in the
<filename>meta/conf/bitbake.conf</filename> configuration
file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
as follows:
<literallayout class='monospaced'>
SRCPV = "${@bb.fetch2.get_srcrev(d)}"
@@ -12863,7 +13066,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-AUTOREV'><filename>AUTOREV</filename></link>
variable description and the
"<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
- section, which is in the Yocto Project Development Manual.
+ section, which is in the Yocto Project Development
+ Tasks Manual.
</note>
</para>
@@ -13116,7 +13320,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>
variable and the
"<ulink url='&YOCTO_DOCS_DEV_URL;#new-sharing-files-between-recipes'>Sharing Files Between Recipes</ulink>"
- section for more information.
+ section in the Yocto Project Development Tasks Manual
+ for more information.
<note>
Recipes should never write files directly under
the <filename>STAGING_DIR</filename> directory because
@@ -13583,15 +13788,12 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Points to the temporary directory under the work directory
(default
- <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/sysroot-destidir</filename>)
+ "<filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/sysroot-destdir</filename>")
where the files
that will be populated into the sysroot are assembled
during the
<link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
task.
- <literallayout class='monospaced'>
- SYSROOT_DESTDIR ?= "console=ttyS0,115200"
- </literallayout>
</para>
</glossdef>
</glossentry>
@@ -14026,7 +14228,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
See the
<filename>meta/conf/machine/include/arm/feature-arm-thumb.inc</filename>
file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
for an example.
</para>
</glossdef>
@@ -14292,7 +14494,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
The suffix identifies the <filename>libc</filename> variant
for building.
When you are building for multiple variants with the same
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+ <link linkend='build-directory'>Build Directory</link>,
this mechanism ensures that output for different
<filename>libc</filename> variants is kept separate to
avoid potential conflicts.
@@ -14450,7 +14652,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>ssh</filename>.
You can set this variable to "1" in your
<filename>local.conf</filename> file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
to have the OpenEmbedded build system automatically run
these tests after an image successfully builds:
<literallayout class='monospaced'>
@@ -14459,7 +14661,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
For more information on enabling, running, and writing
these tests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual and the
+ section in the Yocto Project Development Tasks Manual and
+ the
"<link linkend='ref-classes-testimage*'><filename>testimage*.bbclass</filename></link>"
section.
</para>
@@ -14543,7 +14746,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
For more information on testing images, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -14650,8 +14853,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Boots a QEMU image and runs the tests.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#qemu-image-enabling-tests'>Enabling Runtime Tests on QEMU</ulink>"
- section in the Yocto Project Development Manual for
- more information.
+ section in the Yocto Project Development Tasks
+ Manual for more information.
</para></listitem>
<listitem><para><emphasis>"simpleremote" and "SimpleRemoteTarget":</emphasis>
Runs the tests on target hardware that is already
@@ -14683,7 +14886,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
For information on running tests on hardware, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#hardware-image-enabling-tests'>Enabling Runtime Tests on Hardware</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -14772,7 +14975,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
For more information on testing images, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
</glossdef>
</glossentry>
@@ -14818,7 +15021,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
files (other than the shared state cache).
By default, the <filename>TMPDIR</filename> variable points
to <filename>tmp</filename> within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
</para>
<para>
@@ -14826,7 +15029,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
than the default, you can uncomment and edit the following
statement in the
<filename>conf/local.conf</filename> file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
+ <link linkend='source-directory'>Source Directory</link>:
<literallayout class='monospaced'>
#TMPDIR = "${TOPDIR}/tmp"
</literallayout>
@@ -14872,8 +15075,9 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
variable, but you can add additional packages to the list.
See the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-adding-individual-packages'>Adding Individual Packages to the Standard SDK</ulink>"
- section in the Yocto Project Software Development Kit (SDK)
- Developer's Guide for more information.
+ section in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual
+ for more information.
</para>
<para>
@@ -14883,7 +15087,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
section.
For information on setting up a cross-development
environment, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual.
</para>
</glossdef>
</glossentry>
@@ -14929,8 +15134,9 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
part of the SDK that runs on the target.
See the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-adding-individual-packages'>Adding Individual Packages to the Standard SDK</ulink>"
- section in the Yocto Project Software Development Kit (SDK)
- Developer's Guide for more information.
+ section in the Yocto Project Application Development and
+ the Extensible Software Development Kit (eSDK) manual for
+ more information.
</para>
<para>
@@ -14940,7 +15146,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
section.
For information on setting up a cross-development
environment, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual.
</para>
</glossdef>
</glossentry>
@@ -14953,12 +15160,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The top-level
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
BitBake automatically sets this variable when you
- initialize your build environment using either
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
+ initialize your build environment using
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>.
</para>
</glossdef>
</glossentry>
@@ -15010,7 +15215,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
For example, the
<filename>meta/conf/machine/include/mips/README</filename>
file in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
provides information for <filename>TUNE_ARCH</filename>
specific to the <filename>mips</filename> architecture.
</para>
@@ -15293,7 +15498,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
Known tuning conflicts are specified in the machine include
files in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
Here is an example from the
<filename>meta/conf/machine/include/mips/arch-mips.inc</filename>
include file that lists the "o32" and "n64" features as
@@ -15325,7 +15530,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
See the machine include files in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
for these features.
</para>
</glossdef>
@@ -15662,7 +15867,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-dev-manager'>Selecting a Device Manager</ulink>"
- section in the Yocto Project Development Manual for
+ section in the Yocto Project Development Tasks Manual for
information on how to use this variable.
</para>
</glossdef>
@@ -15717,7 +15922,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
For more information, see
<filename>meta-poky/conf/local.conf.sample</filename> in
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
</para>
</glossdef>
</glossentry>
@@ -16056,12 +16261,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
kickstart file that is used by the OpenEmbedded build
system to create a partitioned image
(<replaceable>image</replaceable><filename>.wic</filename>).
- For information on how to create a
- partitioned image, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-wic-images-oe'>Creating Partitioned Images</ulink>"
- section.
+ For information on how to create a partitioned image, see
+ the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
+ section in the Yocto Project Development Tasks Manual.
For details on the kickstart file format, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#openembedded-kickstart-wks-reference'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</ulink>.
+ "<link linkend='openembedded-kickstart-wks-reference'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</link>
+ Chapter.
</para>
</glossdef>
</glossentry>
diff --git a/import-layers/yocto-poky/documentation/ref-manual/resources.xml b/import-layers/yocto-poky/documentation/ref-manual/resources.xml
index 8299f9f3ca..d59bea2456 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/resources.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/resources.xml
@@ -3,25 +3,71 @@
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
<chapter id='resources'>
-<title>Contributing to the Yocto Project</title>
+<title>Contributions and Additional Information</title>
<section id='resources-intro'>
<title>Introduction</title>
<para>
- The Yocto Project team is happy for people to experiment with the Yocto Project.
- A number of places exist to find help if you run into difficulties or find bugs.
- To find out how to download source code,
- see the "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto Project Release</ulink>"
- section in the Yocto Project Development Manual.
+ The Yocto Project team is happy for people to experiment with the
+ Yocto Project.
+ A number of places exist to find help if you run into difficulties
+ or find bugs.
+ This presents information about contributing and participating in
+ the Yocto Project.
+ </para>
+</section>
+
+<section id='resources-contributions'>
+ <title>Contributions</title>
+
+ <para>
+ The Yocto Project gladly accepts contributions.
+ You can submit changes to the project either by creating and sending
+ pull requests,
+ or by submitting patches through email.
+ For information on how to do both as well as information on how
+ to identify the maintainer for each area of code, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
<section id='resources-bugtracker'>
- <title>Tracking Bugs</title>
+ <title>Yocto Project Bugzilla</title>
<para>
- If you find problems with the Yocto Project, you should report them using the
- Bugzilla application at <ulink url='&YOCTO_BUGZILLA_URL;'></ulink>.
+ The Yocto Project uses its own implementation of
+ <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track
+ defects (bugs).
+ Implementations of Bugzilla work well for group development because
+ they track bugs and code changes, can be used to communicate changes
+ and problems with developers, can be used to submit and review patches,
+ and can be used to manage quality assurance.
+ </para>
+
+ <para>
+ Sometimes it is helpful to submit, investigate, or track a bug against
+ the Yocto Project itself (e.g. when discovering an issue with some
+ component of the build system that acts contrary to the documentation
+ or your expectations).
+ </para>
+
+ <para>
+ A general procedure and guidelines exist for when you use Bugzilla to
+ submit a bug.
+ For information on how to use Bugzilla to submit a bug against the
+ Yocto Project, see the following:
+ <itemizedlist>
+ <listitem><para>
+ The
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ </para></listitem>
+ <listitem><para>
+ The Yocto Project
+ <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>
+ </para></listitem>
+ </itemizedlist>
</para>
</section>
@@ -43,19 +89,19 @@
Discussion mailing list about OpenEmbedded.</para></listitem>
<listitem><para><ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'></ulink> -
Discussion mailing list about the
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
+ <link linkend='bitbake-term'>BitBake</link>
build tool.</para></listitem>
<listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> -
Discussion mailing list about
- <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>.
+ <link linkend='poky'>Poky</link>.
</para></listitem>
<listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink> -
Mailing list to receive official Yocto Project release and milestone
announcements.</para></listitem>
</itemizedlist>
</para>
- For more Yocto Project-related mailing lists, see the Yocto Project community mailing lists page
- <ulink url='&YOCTO_HOME_URL;/tools-resources/community/mailing-lists'>here</ulink>.
+ For more Yocto Project-related mailing lists, see the
+ <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
</section>
<section id='resources-irc'>
@@ -70,53 +116,160 @@
</para>
</section>
-<section id='resources-links'>
- <title>Links</title>
+<section id='resources-links-and-related-documentation'>
+ <title>Links and Related Documentation</title>
<para>
- Here is a list of resources you will find helpful:
+ Here is a list of resources you might find helpful:
<itemizedlist>
- <listitem><para><emphasis>
+ <listitem><para>
+ <emphasis>
<ulink url='&YOCTO_HOME_URL;'>The Yocto Project website</ulink>:
- </emphasis> The home site for the Yocto
- Project.</para></listitem>
-<!--
- <listitem><para><emphasis>
- <ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
- The company that acquired OpenedHand in 2008 and began
- development on the Yocto Project.</para></listitem>
--->
- <listitem><para><emphasis>
- <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
- The upstream, generic, embedded distribution used as the basis
- for the build system in the Yocto Project.
- Poky derives from and contributes back to the OpenEmbedded
- project.</para></listitem>
- <listitem><para><emphasis>
+ </emphasis> The home site for the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_WIKI_URL;/wiki/Main_Page'>The Yocto Project Main Wiki Page</ulink>:
+ </emphasis>
+ The main wiki page for the Yocto Project.
+ This page contains information about project planning,
+ release engineering, QA &amp; automation, a reference
+ site map, and other resources related to the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:
+ </emphasis>
+ The build system used by the Yocto Project.
+ This project is the upstream, generic, embedded distribution
+ from which the Yocto Project derives its build system (Poky)
+ and to which it contributes.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
<ulink url='http://www.openembedded.org/wiki/BitBake'>
- BitBake</ulink>:</emphasis> The tool used to process metadata.</para></listitem>
+ BitBake</ulink>:
+ </emphasis> The tool used to process metadata.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual:</ulink>
+ </emphasis>
+ A comprehensive guide to the BitBake tool.
+ If you want information on BitBake, see this manual.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:
+ </emphasis>
+ This short document lets you get started
+ with the Yocto Project and quickly begin building an image.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>:
+ </emphasis>
+ This manual is a "how-to" guide that presents procedures
+ useful to both application and system developers who use the
+ Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual:</emphasis>
+ This guide provides information that lets you get going
+ with the standard or extensible SDK.
+ An SDK, with its cross-development toolchains, allows you
+ to develop projects inside or outside of the Yocto Project
+ environment.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:
+ </emphasis>
+ This guide defines the structure for BSP components.
+ Having a commonly understood structure encourages
+ standardization.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>:
+ </emphasis>
+ This manual describes how to work with Linux Yocto kernels as
+ well as provides a bit of conceptual information on the
+ construction of the Yocto Linux kernel tree.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>:
+ </emphasis>
+ This manual presents a set of common and generally useful
+ tracing and profiling schemes along with their applications
+ (as appropriate) to each tool.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-appendix-latest-yp-eclipse-plug-in'>Eclipse IDE Yocto Plug-in</ulink>:
+ </emphasis>
+ Instructions that demonstrate how an application developer
+ uses the Eclipse Yocto Project Plug-in feature within
+ the Eclipse IDE.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:
+ </emphasis>
+ A list of commonly asked questions and their answers.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>:
+ </emphasis>
+ Features, updates and known issues for the current
+ release of the Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>:
+ </emphasis>
+ This manual introduces and describes how to set up and use
+ Toaster.
+ Toaster is an Application Programming Interface (API) and
+ web-based interface to the
+ <link linkend='build-system-term'>OpenEmbedded Build System</link>,
+ which uses BitBake, that reports build information.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:
+ </emphasis>
+ The bug tracking application the Yocto Project uses.
+ If you find problems with the Yocto Project, you should report
+ them using this application.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla Configuration and Bug Tracking Wiki Page</ulink>:
+ </emphasis>
+ Information on how to get set up and use the Yocto Project
+ implementation of Bugzilla for logging and tracking Yocto
+ Project defects.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Internet Relay Chat (IRC):</emphasis>
+ Two IRC channels on freenode are available
+ for Yocto Project and Poky discussions: <filename>#yocto</filename> and
+ <filename>#poky</filename>, respectively.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:
+ </emphasis>
+ An open-source machine emulator and virtualizer.
+ </para></listitem>
</itemizedlist>
- For more links, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#other-information'>Other Information</ulink>"
- section in the Yocto Project Development Manual.
</para>
</section>
-
-<section id='resources-contributions'>
- <title>Contributions</title>
-
- <para>
- The Yocto Project gladly accepts contributions.
- You can submit changes to the project either by creating and sending
- pull requests,
- or by submitting patches through email.
- For information on how to do both as well as information on how
- to identify the maintainer for each area of code, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
- section in the Yocto Project Development Manual.
- </para>
-</section>
-
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml b/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml
index 1964a9a105..e9e76e46d7 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/technical-details.xml
@@ -18,7 +18,7 @@
<para>
The
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
+ <link linkend='bitbake-term'>BitBake</link>
task executor together with various types of configuration files form
the OpenEmbedded Core.
This section overviews these components by describing their use and
@@ -48,15 +48,16 @@
to each data source as a layer.
For information on layers, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
- Creating Layers</ulink>" section of the Yocto Project Development Manual.
+ Creating Layers</ulink>" section of the Yocto Project Development
+ Tasks Manual.
</para>
<para>
Following are some brief details on these core components.
For additional information on how these components interact during
a build, see the
- "<link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>"
- Chapter.
+ "<link linkend='development-concepts'>Development Concepts</link>"
+ section.
</para>
<section id='usingpoky-components-bitbake'>
@@ -65,7 +66,7 @@
<para>
BitBake is the tool at the heart of the OpenEmbedded build system
and is responsible for parsing the
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
+ <link linkend='metadata'>Metadata</link>,
generating a list of tasks from it, and then executing those tasks.
</para>
@@ -146,13 +147,70 @@
</para>
</section>
+ <section id='metadata-virtual-providers'>
+ <title>Metadata (Virtual Providers)</title>
+
+ <para>
+ Prior to the build, if you know that several different recipes
+ provide the same functionality, you can use a virtual provider
+ (i.e. <filename>virtual/*</filename>) as a placeholder for the
+ actual provider.
+ The actual provider would be determined at build
+ time.
+ In this case, you should add <filename>virtual/*</filename>
+ to <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
+ rather than listing the specified provider.
+ You would select the actual provider by setting the
+ <link linkend='var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></link>
+ variable (i.e. <filename>PREFERRED_PROVIDER_virtual/*</filename>)
+ in the build's configuration file (e.g.
+ <filename>poky/build/conf/local.conf</filename>).
+ <note>
+ Any recipe that PROVIDES a <filename>virtual/*</filename> item
+ that is ultimately not selected through
+ <filename>PREFERRED_PROVIDER</filename> does not get built.
+ Preventing these recipes from building is usually the desired
+ behavior since this mechanism's purpose is to select between
+ mutually exclusive alternative providers.
+ </note>
+ </para>
+
+ <para>
+ The following lists specific examples of virtual providers:
+ <itemizedlist>
+ <listitem><para>
+ <filename>virtual/mesa</filename>:
+ Provides <filename>gbm.pc</filename>.
+ </para></listitem>
+ <listitem><para>
+ <filename>virtual/egl</filename>:
+ Provides <filename>egl.pc</filename> and possibly
+ <filename>wayland-egl.pc</filename>.
+ </para></listitem>
+ <listitem><para>
+ <filename>virtual/libgl</filename>:
+ Provides <filename>gl.pc</filename> (i.e. libGL).
+ </para></listitem>
+ <listitem><para>
+ <filename>virtual/libgles1</filename>:
+ Provides <filename>glesv1_cm.pc</filename>
+ (i.e. libGLESv1_CM).
+ </para></listitem>
+ <listitem><para>
+ <filename>virtual/libgles2</filename>:
+ Provides <filename>glesv2.pc</filename> (i.e. libGLESv2).
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
<section id='usingpoky-components-classes'>
<title>Classes</title>
<para>
Class files (<filename>.bbclass</filename>) contain information that
is useful to share between
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> files.
+ <link linkend='metadata'>Metadata</link> files.
An example is the
<link linkend='ref-classes-autotools'><filename>autotools</filename></link>
class, which contains common settings for any application that
@@ -172,7 +230,7 @@
distribution configuration options, compiler tuning options, general common configuration
options, and user configuration options in <filename>local.conf</filename>, which is found
in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
</para>
</section>
</section>
@@ -183,11 +241,12 @@
<para>
The Yocto Project does most of the work for you when it comes to
creating
- <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
+ <link linkend='cross-development-toolchain'>cross-development toolchains</link>.
This section provides some technical background on how
cross-development toolchains are created and used.
For more information on toolchains, you can also see the
- <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual.
</para>
<para>
@@ -372,8 +431,8 @@
For information on advantages gained when building a
cross-development toolchain installer, see the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
- section in the Yocto Project Software Development Kit (SDK) Developer's
- Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
</note>
</section>
@@ -433,7 +492,7 @@
works with packages and can
track incrementing <filename>PR</filename> information, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
- section.
+ section in the Yocto Project Development Tasks Manual.
</note>
<para>
@@ -562,7 +621,7 @@
code.
However, there is still the question of a task's indirect inputs - the
things that were already built and present in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <link linkend='build-directory'>Build Directory</link>.
The checksum (or signature) for a particular task needs to add the hashes
of all the tasks on which the particular task depends.
Choosing which dependencies to add is a policy decision.
@@ -598,11 +657,12 @@
The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
of this and also illustrates how you can insert your own policy into the system
if so desired.
- This file defines the two basic signature generators <filename>OE-Core</filename>
- uses: "OEBasic" and "OEBasicHash".
+ This file defines the two basic signature generators
+ <link linkend='oe-core'>OE-Core</link> uses: "OEBasic" and
+ "OEBasicHash".
By default, there is a dummy "noop" signature handler enabled in BitBake.
This means that behavior is unchanged from previous versions.
- <filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default
+ OE-Core uses the "OEBasicHash" signature handler by default
through this setting in the <filename>bitbake.conf</filename> file:
<literallayout class='monospaced'>
BB_SIGNATURE_HANDLER ?= "OEBasicHash"
@@ -610,7 +670,7 @@
The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
"OEBasic" version but adds the task hash to the stamp files.
This results in any
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <link linkend='metadata'>Metadata</link>
change that changes the task hash, automatically
causing the task to be run again.
This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
@@ -1195,6 +1255,213 @@
</para>
</section>
+<section id='wic-plug-ins-interface'>
+ <title>Wic Plug-Ins Interface</title>
+
+ <para>
+ You can extend and specialize Wic functionality by using
+ Wic plug-ins.
+ This section explains the Wic plug-in interface.
+ For information on using Wic in general, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
+ section in the Yocto Project Development Tasks Manual.
+ <note>
+ Wic plug-ins consist of "source" and "imager" plug-ins.
+ Imager plug-ins are beyond the scope of this section.
+ </note>
+ </para>
+
+ <para>
+ Source plug-ins provide a mechanism to customize partition
+ content during the Wic image generation process.
+ You can use source plug-ins to map values that you specify
+ using <filename>--source</filename> commands in kickstart
+ files (i.e. <filename>*.wks</filename>) to a plug-in
+ implementation used to populate a given partition.
+ <note>
+ If you use plug-ins that have build-time dependencies
+ (e.g. native tools, bootloaders, and so forth)
+ when building a Wic image, you need to specify those
+ dependencies using the
+ <link linkend='var-WKS_FILE_DEPENDS'><filename>WKS_FILE_DEPENDS</filename></link>
+ variable.
+ </note>
+ </para>
+
+ <para>
+ Source plug-ins are subclasses defined in plug-in files.
+ As shipped, the Yocto Project provides several plug-in
+ files.
+ You can see the source plug-in files that ship with the
+ Yocto Project
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/scripts/lib/wic/plugins/source'>here</ulink>.
+ Each of these plug-in files contain source plug-ins that
+ are designed to populate a specific Wic image partition.
+ </para>
+
+ <para>
+ Source plug-ins are subclasses of the
+ <filename>SourcePlugin</filename> class, which is
+ defined in the
+ <filename>poky/scripts/lib/wic/pluginbase.py</filename>
+ file.
+ For example, the <filename>BootimgEFIPlugin</filename>
+ source plug-in found in the
+ <filename>bootimg-efi.py</filename> file is a subclass of
+ the <filename>SourcePlugin</filename> class, which is found
+ in the <filename>pluginbase.py</filename> file.
+ </para>
+
+ <para>
+ You can also implement source plug-ins in a layer outside
+ of the Source Repositories (external layer).
+ To do so, be sure that your plug-in files are located in
+ a directory whose path is
+ <filename>scripts/lib/wic/plugins/source/</filename>
+ within your external layer.
+ When the plug-in files are located there, the source
+ plug-ins they contain are made available to Wic.
+ </para>
+
+ <para>
+ When the Wic implementation needs to invoke a
+ partition-specific implementation, it looks for the plug-in
+ with the same name as the <filename>--source</filename>
+ parameter used in the kickstart file given to that
+ partition.
+ For example, if the partition is set up using the following
+ command in a kickstart file:
+ <literallayout class='monospaced'>
+ part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
+ </literallayout>
+ The methods defined as class members of the matching
+ source plug-in (i.e. <filename>bootimg-pcbios</filename>)
+ in the <filename>bootimg-pcbios.py</filename> plug-in file
+ are used.
+ </para>
+
+ <para>
+ To be more concrete, here is the corresponding plug-in
+ definition from the <filename>bootimg-pcbios.py</filename>
+ file for the previous command along with an example
+ method called by the Wic implementation when it needs to
+ prepare a partition using an implementation-specific
+ function:
+ <literallayout class='monospaced'>
+ bootimg-pcbios.py
+ .
+ .
+ .
+ class BootimgPcbiosPlugin(SourcePlugin):
+ """
+ Create MBR boot partition and install syslinux on it.
+ """
+
+ name = 'bootimg-pcbios'
+ .
+ .
+ .
+ @classmethod
+ def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
+ oe_builddir, bootimg_dir, kernel_dir,
+ rootfs_dir, native_sysroot):
+ """
+ Called to do the actual content population for a partition i.e. it
+ 'prepares' the partition to be incorporated into the image.
+ In this case, prepare content for legacy bios boot partition.
+ """
+ .
+ .
+ .
+ </literallayout>
+ If a subclass (plug-in) itself does not implement a
+ particular function, Wic locates and uses the default
+ version in the superclass.
+ It is for this reason that all source plug-ins are derived
+ from the <filename>SourcePlugin</filename> class.
+ </para>
+
+ <para>
+ The <filename>SourcePlugin</filename> class defined in
+ the <filename>pluginbase.py</filename> file defines
+ a set of methods that source plug-ins can implement or
+ override.
+ Any plug-ins (subclass of
+ <filename>SourcePlugin</filename>) that do not implement
+ a particular method inherit the implementation of the
+ method from the <filename>SourcePlugin</filename> class.
+ For more information, see the
+ <filename>SourcePlugin</filename> class in the
+ <filename>pluginbase.py</filename> file for details:
+ </para>
+
+ <para>
+ The following list describes the methods implemented in the
+ <filename>SourcePlugin</filename> class:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><filename>do_prepare_partition()</filename>:</emphasis>
+ Called to populate a partition with actual content.
+ In other words, the method prepares the final
+ partition image that is incorporated into the
+ disk image.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>do_configure_partition()</filename>:</emphasis>
+ Called before
+ <filename>do_prepare_partition()</filename> to
+ create custom configuration files for a partition
+ (e.g. syslinux or grub configuration files).
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>do_install_disk()</filename>:</emphasis>
+ Called after all partitions have been prepared and
+ assembled into a disk image.
+ This method provides a hook to allow finalization
+ of a disk image (e.g. writing an MBR).
+ </para></listitem>
+ <listitem><para>
+ <emphasis><filename>do_stage_partition()</filename>:</emphasis>
+ Special content-staging hook called before
+ <filename>do_prepare_partition()</filename>.
+ This method is normally empty.</para>
+
+ <para>Typically, a partition just uses the passed-in
+ parameters (e.g. the unmodified value of
+ <filename>bootimg_dir</filename>).
+ However, in some cases, things might need to be
+ more tailored.
+ As an example, certain files might additionally
+ need to be taken from
+ <filename>bootimg_dir + /boot</filename>.
+ This hook allows those files to be staged in a
+ customized fashion.
+ <note>
+ <filename>get_bitbake_var()</filename>
+ allows you to access non-standard variables
+ that you might want to use for this
+ behavior.
+ </note>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ You can extend the source plug-in mechanism.
+ To add more hooks, create more source plug-in methods
+ within <filename>SourcePlugin</filename> and the
+ corresponding derived subclasses.
+ The code that calls the plug-in methods uses the
+ <filename>plugin.get_source_plugin_methods()</filename>
+ function to find the method or methods needed by the call.
+ Retrieval of those methods is accomplished by filling up
+ a dict with keys that contain the method names of interest.
+ On success, these will be filled in with the actual
+ methods.
+ See the Wic implementation for examples and details.
+ </para>
+</section>
+
<section id='x32'>
<title>x32</title>
@@ -1310,7 +1577,7 @@
The Wayland protocol libraries and the reference Weston compositor
ship as integrated packages in the <filename>meta</filename> layer
of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
Specifically, you can find the recipes that build both Wayland
and Weston at <filename>meta/recipes-graphics/wayland</filename>.
</para>
@@ -1425,8 +1692,8 @@
<para>
For information that can help you maintain compliance with various open
source licensing during the lifecycle of the product, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Project's Lifecycle</ulink>" section
- in the Yocto Project Development Manual.
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Project's Lifecycle</ulink>"
+ section in the Yocto Project Development Tasks Manual.
</para>
<section id="usingpoky-configuring-LIC_FILES_CHKSUM">
diff --git a/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml b/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml
index d08031617b..13d9ad6ab7 100644
--- a/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml
+++ b/import-layers/yocto-poky/documentation/ref-manual/usingpoky.xml
@@ -42,11 +42,9 @@
<para>
The first thing you need to do is set up the OpenEmbedded build
- environment by sourcing an environment setup script
+ environment by sourcing the environment setup script
(i.e.
- <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
- or
- <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+ <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
Here is an example:
<literallayout class='monospaced'>
$ source &OE_INIT_FILE; [<replaceable>build_dir</replaceable>]
@@ -56,7 +54,8 @@
<para>
The <replaceable>build_dir</replaceable> argument is optional and specifies the directory the
OpenEmbedded build system uses for the build -
- the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ the
+ <link linkend='build-directory'>Build Directory</link>.
If you do not specify a Build Directory, it defaults to a directory
named <filename>build</filename> in your current working directory.
A common practice is to use a different Build Directory for different targets.
@@ -108,7 +107,7 @@
The <replaceable>target</replaceable> is the name of the recipe you want to build.
Common targets are the images in <filename>meta/recipes-core/images</filename>,
<filename>meta/recipes-sato/images</filename>, etc. all found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <link linkend='source-directory'>Source Directory</link>.
Or, the target can be the name of a recipe for a specific piece of software such as
BusyBox.
For more details about the images the OpenEmbedded build system supports, see the
@@ -142,11 +141,12 @@
<para>
Once an image has been built, it often needs to be installed.
The images and kernels built by the OpenEmbedded build system are placed in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
+ <link linkend='build-directory'>Build Directory</link> in
<filename class="directory">tmp/deploy/images</filename>.
For information on how to run pre-built images such as <filename>qemux86</filename>
and <filename>qemuarm</filename>, see the
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual.
For information about how to install these images, see the documentation for your
particular board or machine.
</para>
@@ -177,16 +177,17 @@
going wrong.
For information on how to enable and use this feature, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>Using the Error Reporting Tool</ulink>"
- section in the Yocto Project Development Manual.
+ section in the Yocto Project Development Tasks Manual.
</para>
<para>
For discussions on debugging, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>" section
- in the Yocto Project Developer's Manual
+ in the Yocto Project Development Tasks Manual
and the
"<ulink url='&YOCTO_DOCS_SDK_URL;#adt-eclipse'>Working within Eclipse</ulink>"
- section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
</para>
<note>
@@ -208,7 +209,7 @@
(<filename>qemux86</filename>) might be in
<filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile</filename>.
To see the commands
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink> ran
+ <link linkend='bitbake-term'>BitBake</link> ran
to generate a log, look at the corresponding
<filename>run.do_</filename><replaceable>taskname</replaceable>
file in the same directory.
@@ -874,7 +875,7 @@
class implements these functions.
See that class in the
<filename>meta/classes</filename> folder of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <link linkend='source-directory'>Source Directory</link>
for information.
</para>
@@ -978,7 +979,7 @@
Removing
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
(usually <filename>tmp/</filename>, within the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>)
+ <link linkend='build-directory'>Build Directory</link>)
can often fix temporary build issues.
Removing <filename>TMPDIR</filename> is usually a
relatively cheap operation, because task output will be
@@ -1031,9 +1032,12 @@
the Yocto Project implementation of
<ulink url='https://bugzilla.yoctoproject.org/'>Bugzilla</ulink>.
For general information on how to submit a bug against
- the Yocto Project, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#tracking-bugs'>Tracking Bugs</ulink>"
- section in the Yocto Project Development Manual.
+ the Yocto Project, see the Yocto Project Bugzilla
+ <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>wiki page</ulink>"
+ or the
+ <ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
+ section, which is in the Yocto Project Development Tasks
+ Manual.
<note>
The manuals might not be the right place to document
variables that are purely internal and have a limited
@@ -1046,6 +1050,376 @@
</section>
</section>
+<section id='ref-quick-emulator-qemu'>
+ <title>Quick EMUlator (QEMU)</title>
+
+ <para>
+ The Yocto Project uses an implementation of the Quick EMUlator (QEMU)
+ Open Source project as part of the Yocto Project development "tool
+ set".
+ </para>
+
+ <para>
+ Within the context of the Yocto Project, QEMU is an
+ emulator and virtualization machine that allows you to run a complete
+ image you have built using the Yocto Project as just another task
+ on your build system.
+ QEMU is useful for running and testing images and applications on
+ supported Yocto Project architectures without having actual hardware.
+ Among other things, the Yocto Project uses QEMU to run automated
+ Quality Assurance (QA) tests on final images shipped with each
+ release.
+ <note>
+ This implementation is not the same as QEMU in general.
+ </note>
+ This section provides a brief reference for the Yocto Project
+ implementation of QEMU.
+ </para>
+
+ <para>
+ For official information and documentation on QEMU in general, see the
+ following references:
+ <itemizedlist>
+ <listitem><para>
+ <emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
+ The official website for the QEMU Open Source project.
+ </para></listitem>
+ <listitem><para>
+ <emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
+ The QEMU user manual.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ For information on how to use the Yocto Project implementation of
+ QEMU, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+ chapter in the Yocto Project Development Tasks Manual.
+ </para>
+
+ <section id='qemu-availability'>
+ <title>QEMU Availability</title>
+
+ <para>
+ QEMU is made available with the Yocto Project a number of ways.
+ One method is to install a Software Development Kit (SDK).
+ For more information on how to make sure you have
+ QEMU available, see
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
+ section in the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
+ </para>
+ </section>
+
+ <section id='qemu-performance'>
+ <title>QEMU Performance</title>
+
+ <para>
+ Using QEMU to emulate your hardware can result in speed issues
+ depending on the target and host architecture mix.
+ For example, using the <filename>qemux86</filename> image in the
+ emulator on an Intel-based 32-bit (x86) host machine is fast
+ because the target and host architectures match.
+ On the other hand, using the <filename>qemuarm</filename> image
+ on the same Intel-based host can be slower.
+ But, you still achieve faithful emulation of ARM-specific issues.
+ </para>
+
+ <para>
+ To speed things up, the QEMU images support using
+ <filename>distcc</filename> to call a cross-compiler outside the
+ emulated system.
+ If you used <filename>runqemu</filename> to start QEMU, and the
+ <filename>distccd</filename> application is present on the host
+ system, any BitBake cross-compiling toolchain available from the
+ build system is automatically used from within QEMU simply by
+ calling <filename>distcc</filename>.
+ You can accomplish this by defining the cross-compiler variable
+ (e.g. <filename>export CC="distcc"</filename>).
+ Alternatively, if you are using a suitable SDK image or the
+ appropriate stand-alone toolchain is present, the toolchain is
+ also automatically used.
+ </para>
+
+ <note>
+ Several mechanisms exist that let you connect to the system
+ running on the QEMU emulator:
+ <itemizedlist>
+ <listitem><para>
+ QEMU provides a framebuffer interface that makes standard
+ consoles available.
+ </para></listitem>
+ <listitem><para>
+ Generally, headless embedded devices have a serial port.
+ If so, you can configure the operating system of the
+ running image to use that port to run a console.
+ The connection uses standard IP networking.
+ </para></listitem>
+ <listitem><para>
+ SSH servers exist in some QEMU images.
+ The <filename>core-image-sato</filename> QEMU image has a
+ Dropbear secure shell (SSH) server that runs with the root
+ password disabled.
+ The <filename>core-image-full-cmdline</filename> and
+ <filename>core-image-lsb</filename> QEMU images
+ have OpenSSH instead of Dropbear.
+ Including these SSH servers allow you to use standard
+ <filename>ssh</filename> and <filename>scp</filename>
+ commands.
+ The <filename>core-image-minimal</filename> QEMU image,
+ however, contains no SSH server.
+ </para></listitem>
+ <listitem><para>
+ You can use a provided, user-space NFS server to boot
+ the QEMU session using a local copy of the root
+ filesystem on the host.
+ In order to make this connection, you must extract a
+ root filesystem tarball by using the
+ <filename>runqemu-extract-sdk</filename> command.
+ After running the command, you must then point the
+ <filename>runqemu</filename>
+ script to the extracted directory instead of a root
+ filesystem image file.
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#qemu-running-under-a-network-file-system-nfs-server'>Running Under a Network File System (NFS) Server</ulink>"
+ section in the Yocto Project Development Tasks Manual for
+ more information.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </section>
+
+ <section id='qemu-command-line-syntax'>
+ <title>QEMU Command-Line Syntax</title>
+
+ <para>
+ The basic <filename>runqemu</filename> command syntax is as
+ follows:
+ <literallayout class='monospaced'>
+ $ runqemu [<replaceable>option</replaceable> ] [...]
+ </literallayout>
+ Based on what you provide on the command line,
+ <filename>runqemu</filename> does a good job of figuring out what
+ you are trying to do.
+ For example, by default, QEMU looks for the most recently built
+ image according to the timestamp when it needs to look for an
+ image.
+ Minimally, through the use of options, you must provide either
+ a machine name, a virtual machine image
+ (<filename>*wic.vmdk</filename>), or a kernel image
+ (<filename>*.bin</filename>).
+ </para>
+
+ <para>
+ Following is the command-line help output for the
+ <filename>runqemu</filename> command:
+ <literallayout class='monospaced'>
+ $ runqemu --help
+
+ Usage: you can run this script with any valid combination
+ of the following environment variables (in any order):
+ KERNEL - the kernel image file to use
+ ROOTFS - the rootfs image file or nfsroot directory to use
+ MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
+ Simplified QEMU command-line options can be passed with:
+ nographic - disable video console
+ serial - enable a serial console on /dev/ttyS0
+ slirp - enable user networking, no root privileges is required
+ kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
+ kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
+ publicvnc - enable a VNC server open to all hosts
+ audio - enable audio
+ [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
+ tcpserial=&lt;port&gt; - specify tcp serial port number
+ biosdir=&lt;dir&gt; - specify custom bios dir
+ biosfilename=&lt;filename&gt; - specify bios filename
+ qemuparams=&lt;xyz&gt; - specify custom parameters to QEMU
+ bootparams=&lt;xyz&gt; - specify custom kernel parameters during boot
+ help, -h, --help: print this text
+
+ Examples:
+ runqemu
+ runqemu qemuarm
+ runqemu tmp/deploy/images/qemuarm
+ runqemu tmp/deploy/images/qemux86/&lt;qemuboot.conf&gt;
+ runqemu qemux86-64 core-image-sato ext4
+ runqemu qemux86-64 wic-image-minimal wic
+ runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
+ runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz...
+ runqemu qemux86 qemuparams="-m 256"
+ runqemu qemux86 bootparams="psplash=false"
+ runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic
+ runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic.vmdk
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='runqemu-command-line-options'>
+ <title><filename>runqemu</filename> Command-Line Options</title>
+
+ <para>
+ Following is a description of <filename>runqemu</filename>
+ options you can provide on the command line:
+ <note><title>Tip</title>
+ If you do provide some "illegal" option combination or perhaps
+ you do not provide enough in the way of options,
+ <filename>runqemu</filename> provides appropriate error
+ messaging to help you correct the problem.
+ </note>
+ <itemizedlist>
+ <listitem><para>
+ <replaceable>QEMUARCH</replaceable>:
+ The QEMU machine architecture, which must be "qemuarm",
+ "qemuarm64", "qemumips", "qemumips64", "qemuppc",
+ "qemux86", or "qemux86-64".
+ </para></listitem>
+ <listitem><para>
+ <filename><replaceable>VM</replaceable></filename>:
+ The virtual machine image, which must be a
+ <filename>.wic.vmdk</filename> file.
+ Use this option when you want to boot a
+ <filename>.wic.vmdk</filename> image.
+ The image filename you provide must contain one of the
+ following strings: "qemux86-64", "qemux86", "qemuarm",
+ "qemumips64", "qemumips", "qemuppc", or "qemush4".
+ </para></listitem>
+ <listitem><para>
+ <replaceable>ROOTFS</replaceable>:
+ A root filesystem that has one of the following
+ filetype extensions: "ext2", "ext3", "ext4", "jffs2",
+ "nfs", or "btrfs".
+ If the filename you provide for this option uses “nfs”, it
+ must provide an explicit root filesystem path.
+ </para></listitem>
+ <listitem><para>
+ <replaceable>KERNEL</replaceable>:
+ A kernel image, which is a <filename>.bin</filename> file.
+ When you provide a <filename>.bin</filename> file,
+ <filename>runqemu</filename> detects it and assumes the
+ file is a kernel image.
+ </para></listitem>
+ <listitem><para>
+ <replaceable>MACHINE</replaceable>:
+ The architecture of the QEMU machine, which must be one
+ of the following: "qemux86", "qemux86-64", "qemuarm",
+ "qemuarm64", "qemumips", “qemumips64", or "qemuppc".
+ The <replaceable>MACHINE</replaceable> and
+ <replaceable>QEMUARCH</replaceable> options are basically
+ identical.
+ If you do not provide a <replaceable>MACHINE</replaceable>
+ option, <filename>runqemu</filename> tries to determine
+ it based on other options.
+ </para></listitem>
+ <listitem><para>
+ <filename>ramfs</filename>:
+ Indicates you are booting an initial RAM disk (initramfs)
+ image, which means the <filename>FSTYPE</filename> is
+ <filename>cpio.gz</filename>.
+ </para></listitem>
+ <listitem><para>
+ <filename>iso</filename>:
+ Indicates you are booting an ISO image, which means the
+ <filename>FSTYPE</filename> is
+ <filename>.iso</filename>.
+ </para></listitem>
+ <listitem><para>
+ <filename>nographic</filename>:
+ Disables the video console, which sets the console to
+ "ttys0".
+ </para></listitem>
+ <listitem><para>
+ <filename>serial</filename>:
+ Enables a serial console on
+ <filename>/dev/ttyS0</filename>.
+ </para></listitem>
+ <listitem><para>
+ <filename>biosdir</filename>:
+ Establishes a custom directory for BIOS, VGA BIOS and
+ keymaps.
+ </para></listitem>
+ <listitem><para>
+ <filename>biosfilename</filename>:
+ Establishes a custom BIOS name.
+ </para></listitem>
+ <listitem><para>
+ <filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
+ Specifies custom QEMU parameters.
+ Use this option to pass options other than the simple
+ "kvm" and "serial" options.
+ </para></listitem>
+ <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
+ Specifies custom boot parameters for the kernel.
+ </para></listitem>
+ <listitem><para>
+ <filename>audio</filename>:
+ Enables audio in QEMU.
+ The <replaceable>MACHINE</replaceable> option must be
+ either "qemux86" or "qemux86-64" in order for audio to be
+ enabled.
+ Additionally, the <filename>snd_intel8x0</filename>
+ or <filename>snd_ens1370</filename> driver must be
+ installed in linux guest.
+ </para></listitem>
+ <listitem><para>
+ <filename>slirp</filename>:
+ Enables "slirp" networking, which is a different way
+ of networking that does not need root access
+ but also is not as easy to use or comprehensive
+ as the default.
+ </para></listitem>
+ <listitem><para id='kvm-cond'>
+ <filename>kvm</filename>:
+ Enables KVM when running "qemux86" or "qemux86-64"
+ QEMU architectures.
+ For KVM to work, all the following conditions must be met:
+ <itemizedlist>
+ <listitem><para>
+ Your <replaceable>MACHINE</replaceable> must be either
+qemux86" or "qemux86-64".
+ </para></listitem>
+ <listitem><para>
+ Your build host has to have the KVM modules
+ installed, which are
+ <filename>/dev/kvm</filename>.
+ </para></listitem>
+ <listitem><para>
+ The build host <filename>/dev/kvm</filename>
+ directory has to be both writable and readable.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <filename>kvm-vhost</filename>:
+ Enables KVM with VHOST support when running "qemux86"
+ or "qemux86-64" QEMU architectures.
+ For KVM with VHOST to work, the following conditions must
+ be met:
+ <itemizedlist>
+ <listitem><para>
+ <link linkend='kvm-cond'>kvm</link> option
+ conditions must be met.
+ </para></listitem>
+ <listitem><para>
+ Your build host has to have virtio net device, which
+ are <filename>/dev/vhost-net</filename>.
+ </para></listitem>
+ <listitem><para>
+ The build host <filename>/dev/vhost-net</filename>
+ directory has to be either readable or writable
+ and “slirp-enabled”.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <filename>publicvnc</filename>:
+ Enables a VNC server open to all hosts.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</section>
+
<section id='maintaining-build-output-quality'>
<title>Maintaining Build Output Quality</title>
@@ -1099,15 +1473,15 @@
<link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
variable to "1" at the end of your
<filename>conf/local.conf</filename> file found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
+ <link linkend='build-directory'>Build Directory</link>:
<literallayout class='monospaced'>
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
</literallayout>
- Enabling build history as previously described
- causes the build process to collect build
- output information and commit it to a local
- <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> repository.
+ Enabling build history as previously described causes the
+ OpenEmbedded build system to collect build output information and
+ commit it as a single commit to a local
+ <link linkend='git'>Git</link> repository.
<note>
Enabling build history increases your build times slightly,
particularly for images, and increases the amount of disk
@@ -1357,7 +1731,7 @@
you can enable writing only image information without
any history by adding the following to your
<filename>conf/local.conf</filename> file found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
+ <link linkend='build-directory'>Build Directory</link>:
<literallayout class='monospaced'>
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "0"
@@ -1643,7 +2017,7 @@
<filename>sync()</filename> calls into the
file system on the principle that if there was a significant
failure, the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <link linkend='build-directory'>Build Directory</link>
contents could easily be rebuilt.
</para></listitem>
<listitem><para>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-title.png b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-title.png
index e9d5b346bb..e69e03935a 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-title.png
+++ b/import-layers/yocto-poky/documentation/sdk-manual/figures/sdk-title.png
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
index 965cccc2ca..587526f65f 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
@@ -148,9 +148,7 @@
<listitem><para>
If your OpenEmbedded build system setup uses a different
environment setup script other than
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
- or
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>,
then you must set
<ulink url='&YOCTO_DOCS_REF_URL;#var-OE_INIT_ENV_SCRIPT'><filename>OE_INIT_ENV_SCRIPT</filename></ulink>
to point to the environment setup script you use.
@@ -289,7 +287,7 @@
for the SDK alone, create a
<filename>conf/sdk-extra.conf</filename> either in
your
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
or within any layer and put your
<filename>SSTATE_MIRRORS</filename> setting within
that file.
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml
index 9957057e99..2d80f644db 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-mars.xml
@@ -14,8 +14,8 @@
from start to finish.
For general information on using the Eclipse IDE and the Yocto
Project Eclipse Plug-In, see the
- "<link linkend='sdk-developing-applications-using-eclipse'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
- section.
+ "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
+ Chapter.
</para>
<section id='mars-setting-up-the-eclipse-ide'>
@@ -392,7 +392,7 @@
<filename>Build System Derived Toolchain:</filename></emphasis>
Select this type if you built the
toolchain as part of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
When you select
<filename>Build system derived toolchain</filename>,
you are using the toolchain built and
@@ -418,7 +418,7 @@
toolchain, the path you provide for the
<filename>Toolchain Root Location</filename>
field is the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
from which you run the
<filename>bitbake</filename> command (e.g
<filename>/home/scottrif/poky/build</filename>).</para>
@@ -431,14 +431,22 @@
the target hardware resides.
</para>
<para>This location depends on where you
- separately extracted and installed the target
- filesystem.
+ separately extracted and installed the
+ target filesystem when you either built
+ it or downloaded it.
+ <note>
+ If you downloaded the root filesystem
+ for the target hardware rather than
+ built it, you must download the
+ <filename>sato-sdk</filename> image
+ in order to build any c/c++ projects.
+ </note>
As an example, suppose you prepared an image
using the steps in the
<ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
If so, the <filename>MY_QEMU_ROOTFS</filename>
directory is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
and you would browse to and select that directory
(e.g. <filename>/home/scottrif/build/MY_QEMU_ROOTFS</filename>).
</para>
@@ -487,7 +495,7 @@
<filename>Build system derived toolchain</filename>,
the target kernel you built will be located in
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
in
<filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
directory.
@@ -692,7 +700,7 @@
<note>
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
- chapter in the Yocto Project Development Manual
+ chapter in the Yocto Project Development Tasks Manual
for more information on using QEMU.
</note>
<orderedlist>
@@ -804,7 +812,7 @@
by clicking on "new".</para></listitem>
<listitem><para>Select <filename>SSH</filename>, which means
Secure Socket Shell.
- Optionally, you can select an TCF connection instead.
+ Optionally, you can select a TCF connection instead.
</para></listitem>
<listitem><para>Click "Next".
</para></listitem>
@@ -848,11 +856,30 @@
launch.
Eclipse is helpful in that it auto fills your application
name for you assuming you browsed to a directory.
- <note>
- If you are prompted to provide a username and to
- optionally set a password, be sure you provide
- "root" as the username and you leave the password
- field blank.
+ <note><title>Tips</title>
+ <itemizedlist>
+ <listitem><para>
+ If you are prompted to provide a username
+ and to optionally set a password, be sure
+ you provide "root" as the username and you
+ leave the password field blank.
+ </para></listitem>
+ <listitem><para>
+ If browsing to a directory fails or times
+ out, but you can
+ <filename>ssh</filename> into your QEMU
+ or target from the command line and you
+ have proxies set up, it is likely that
+ Eclipse is sending the SSH traffic to a
+ proxy.
+ In this case, either use TCF , or click on
+ "Configure proxy settings" in the
+ connection dialog and add the target IP
+ address to the "bypass proxy" section.
+ You might also need to change
+ "Active Provider" from Native to Manual.
+ </para></listitem>
+ </itemizedlist>
</note>
</para></listitem>
<listitem><para>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
index d0cbf9c85e..ab9055e628 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
@@ -18,37 +18,78 @@
</para>
<para>
- You can find SDK installers here:
- <itemizedlist>
- <listitem><para><emphasis>Standard SDK Installers:</emphasis>
+ Follow these steps to locate and hand-install the toolchain:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Go to the Installers Directory:</emphasis>
Go to <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>
- and find the folder that matches your host development system
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Open the Folder for Your Development System:</emphasis>
+ Open the folder that matches your host development system
(i.e. <filename>i686</filename> for 32-bit machines or
- <filename>x86_64</filename> for 64-bit machines).</para>
+ <filename>x86_64</filename> for 64-bit machines).
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Locate and Download the SDK Installer:</emphasis>
+ You need to find and download the installer appropriate for
+ your development system, target hardware, and image type.
+ </para>
+
+ <para>The installer files (<filename>*.sh</filename>) follow
+ this naming convention:
+ <literallayout class='monospaced'>
+ poky-eglibc-<replaceable>host_system</replaceable>-core-image-<replaceable>type</replaceable>-<replaceable>arch</replaceable>-toolchain-ext-<replaceable>release</replaceable>.sh
+
+ Where:
+ <replaceable>host_system</replaceable> is a string representing your development system:
+ i686 or x86_64.
+
+ <replaceable>type</replaceable> is a string representing either a "sato" or "minimal"
+ image.
+
+ <replaceable>arch</replaceable> is a string representing the target architecture:
+ aarch64, armv5e, core2-64, coretexa8hf-neon, i586, mips3242,
+ mips64, or ppc7400.
- <para>Go into that folder and download the SDK installer
- whose name includes the appropriate target architecture.
+ <replaceable>release</replaceable> is the version of Yocto Project.
+
+ NOTE:
+ The standard SDK installer does not have the "-ext" string as
+ part of the filename.
+
+ </literallayout>
The toolchains provided by the Yocto Project are based off of
- the <filename>core-image-sato</filename> image and contain
- libraries appropriate for developing against that image.
- For example, if your host development system is a 64-bit x86
- system and you are going to use your cross-toolchain for a
- 32-bit x86 target, go into the <filename>x86_64</filename>
+ the <filename>core-image-sato</filename> and
+ <filename>core-image-minimal</filename> images and contain
+ libraries appropriate for developing against those images.
+ </para>
+
+ <para>For example, if your host development system is a
+ 64-bit x86 system and you are need an extended SDK for a
+ 64-bit core2 target, go into the <filename>x86_64</filename>
folder and download the following installer:
<literallayout class='monospaced'>
- poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
+ poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
</literallayout>
</para></listitem>
- <listitem><para><emphasis>Extensible SDK Installers:</emphasis>
- Installers for the extensible SDK are also located in
- <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
- These installers have the string
- <filename>ext</filename> as part of their names:
+ <listitem><para>
+ <emphasis>Run the Installer:</emphasis>
+ Be sure you have execution privileges and run the installer.
+ Following is an example from the <filename>Downloads</filename>
+ directory:
<literallayout class='monospaced'>
- poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
+ $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
</literallayout>
+ During execution of the script, you choose the root location
+ for the toolchain.
+ See the
+ "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
+ section and the
+ "<link linkend='sdk-installed-extensible-sdk-directory-structure'>Installed Extensible SDK Directory Structure</link>"
+ section for more information.
</para></listitem>
- </itemizedlist>
+ </orderedlist>
</para>
</section>
@@ -57,65 +98,135 @@
<para>
As an alternative to locating and downloading a SDK installer,
- you can build the SDK installer assuming you have first sourced
- the environment setup script.
- See the
- "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
- section in the Yocto Project Quick Start for steps that show you
- how to set up the Yocto Project environment.
- In particular, you need to be sure the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- variable matches the architecture for which you are building and that
- the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
- variable is correctly set if you are building a toolchain designed to
- run on an architecture that differs from your current development host
- machine (i.e. the build machine).
- </para>
-
- <para>
- To build the SDK installer for a standard SDK and populate
- the SDK image, use the following command:
- <literallayout class='monospaced'>
+ you can build the SDK installer.
+ Follow these steps:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Set Up the Build Environment:</emphasis>
+ Be sure you are set up to use BitBake in a shell.
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up the Development Host to Use the Yocto Project</ulink>"
+ section in the Yocto Project Development Tasks Manual for
+ information on how to get a build host ready that is either a
+ native Linux machine or a machine that uses CROPS.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Clone the <filename>poky</filename> Repository:</emphasis>
+ You need to have a local copy of the Yocto Project
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
+ (i.e. a local <filename>poky</filename> repository).
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
+ and possibly the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
+ and
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
+ sections all in the Yocto Project Development Tasks Manual for
+ information on how to clone the <filename>poky</filename>
+ repository and check out the appropriate branch for your work.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Initialize the Build Environment:</emphasis>
+ While in the root directory of the Source Directory (i.e.
+ <filename>poky</filename>), run the
+ <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+ environment setup script to define the OpenEmbedded
+ build environment on your build host.
+ <literallayout class='monospaced'>
+ $ source &OE_INIT_FILE;
+ </literallayout>
+ Among other things, the script creates the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
+ which is <filename>build</filename> in this case
+ and is located in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
+ After the script runs, your current working directory
+ is set to the <filename>build</filename> directory.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Make Sure You Are Building an Installer for the Correct Machine:</emphasis>
+ Check to be sure that your
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+ variable in the <filename>local.conf</filename> file in your
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ matches the architecture for which you are building.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Make Sure Your SDK Machine is Correctly Set:</emphasis>
+ If you are building a toolchain designed to run on an
+ architecture that differs from your current development host
+ machine (i.e. the build machine), be sure that the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
+ variable in the <filename>local.conf</filename> file in your
+ Build Directory is correctly set.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Build the SDK Installer:</emphasis>
+ To build the SDK installer for a standard SDK and populate
+ the SDK image, use the following command form.
+ Be sure to replace <replaceable>image</replaceable> with
+ an image (e.g. "core-image-sato"):
+ <literallayout class='monospaced'>
$ bitbake <replaceable>image</replaceable> -c populate_sdk
- </literallayout>
- You can do the same for the extensible SDK using this command:
- <literallayout class='monospaced'>
+ </literallayout>
+ You can do the same for the extensible SDK using this command
+ form:
+ <literallayout class='monospaced'>
$ bitbake <replaceable>image</replaceable> -c populate_sdk_ext
- </literallayout>
- These commands result in a SDK installer that contains the sysroot
- that matches your target root filesystem.
- </para>
+ </literallayout>
+ These commands result in a SDK installer that contains the
+ sysroot that matches your target root filesystem.</para>
- <para>
- When the <filename>bitbake</filename> command completes, the SDK
- installer will be in
- <filename>tmp/deploy/sdk</filename> in the Build Directory.
- <note><title>Notes</title>
- <itemizedlist>
- <listitem><para>
- By default, this toolchain does not build static binaries.
- If you want to use the toolchain to build these types of
- libraries, you need to be sure your SDK has the
- appropriate static development libraries.
- Use the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></ulink>
- variable inside your <filename>local.conf</filename> file
- to install the appropriate library packages in the SDK.
- Following is an example using <filename>libc</filename>
- static development libraries:
- <literallayout class='monospaced'>
+ <para>When the <filename>bitbake</filename> command completes,
+ the SDK installer will be in
+ <filename>tmp/deploy/sdk</filename> in the Build Directory.
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ By default, this toolchain does not build static
+ binaries.
+ If you want to use the toolchain to build these
+ types of libraries, you need to be sure your SDK
+ has the appropriate static development libraries.
+ Use the
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></ulink>
+ variable inside your <filename>local.conf</filename>
+ file to install the appropriate library packages
+ in the SDK.
+ Following is an example using
+ <filename>libc</filename> static development
+ libraries:
+ <literallayout class='monospaced'>
TOOLCHAIN_TARGET_TASK_append = " libc-staticdev"
- </literallayout>
- </para></listitem>
- <listitem><para>
- For additional information on building the installer,
- see the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
- wiki page.
- </para></listitem>
- </itemizedlist>
- </note>
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ For additional information on building the
+ installer, see the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+ wiki page.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Run the Installer:</emphasis>
+ You can now run the SDK installer from
+ <filename>tmp/deploy/sdk</filename> in the Build Directory.
+ Following is an example:
+ <literallayout class='monospaced'>
+ $ cd ~/poky/build/tmp/deploy/sdk
+ $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
+ </literallayout>
+ During execution of the script, you choose the root location
+ for the toolchain.
+ See the
+ "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
+ section and the
+ "<link linkend='sdk-installed-extensible-sdk-directory-structure'>Installed Extensible SDK Directory Structure</link>"
+ section for more information.
+ </para></listitem>
+ </orderedlist>
</para>
</section>
@@ -126,55 +237,106 @@
After installing the toolchain, for some use cases you
might need to separately extract a root filesystem:
<itemizedlist>
- <listitem><para>You want to boot the image using NFS.
+ <listitem><para>
+ You want to boot the image using NFS.
</para></listitem>
- <listitem><para>You want to use the root filesystem as the
+ <listitem><para>
+ You want to use the root filesystem as the
target sysroot.
For example, the Eclipse IDE environment with the Eclipse
Yocto Plug-in installed allows you to use QEMU to boot
- under NFS.</para></listitem>
- <listitem><para>You want to develop your target application
+ under NFS.
+ </para></listitem>
+ <listitem><para>
+ You want to develop your target application
using the root filesystem as the target sysroot.
</para></listitem>
</itemizedlist>
</para>
<para>
- To extract the root filesystem, first <filename>source</filename>
- the cross-development environment setup script to establish
- necessary environment variables.
- If you built the toolchain in the Build Directory, you will find
- the toolchain environment script in the
- <filename>tmp</filename> directory.
- If you installed the toolchain by hand, the environment setup
- script is located in <filename>/opt/poky/&DISTRO;</filename>.
- </para>
+ Follow these steps to extract the root filesystem:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Locate and Download the Tarball for the Pre-Built
+ Root Filesystem Image File:</emphasis>
+ You need to find and download the root filesystem image
+ file that is appropriate for your target system.
+ These files are kept in the
+ <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/machines/'>Index of Releases</ulink>
+ in the "machines" directory.</para>
- <para>
- After sourcing the environment script, use the
- <filename>runqemu-extract-sdk</filename> command and provide the
- filesystem image.
- </para>
+ <para>The "machines" directory contains tarballs
+ (<filename>*.tar.bz2</filename>) for supported machines.
+ The directory also contains flattened root filesystem
+ image files (<filename>*.ext4</filename>), which you can use
+ with QEMU directly.</para>
- <para>
- Following is an example.
- The second command sets up the environment.
- In this case, the setup script is located in the
- <filename>/opt/poky/&DISTRO;</filename> directory.
- The third command extracts the root filesystem from a previously
- built filesystem that is located in the
- <filename>~/Downloads</filename> directory.
- Furthermore, this command extracts the root filesystem into the
- <filename>qemux86-sato</filename> directory:
- <literallayout class='monospaced'>
- $ cd ~
- $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
- $ runqemu-extract-sdk \
- ~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \
- $HOME/qemux86-sato
- </literallayout>
- You could now point to the target sysroot at
- <filename>qemux86-sato</filename>.
+ <para>The pre-built root filesystem image files
+ follow these naming conventions:
+ <literallayout class='monospaced'>
+ core-image-<replaceable>profile</replaceable>-<replaceable>arch</replaceable>.tar.bz2
+
+ Where:
+ <replaceable>profile</replaceable> is the filesystem image's profile:
+ lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato,
+ sato-dev, sato-sdk, minimal-initramfs, or sdk-ptest. For
+ information on these types of image profiles, see the
+ "Images" chapter in the Yocto Project Reference Manual.
+
+ <replaceable>arch</replaceable> is a string representing the target architecture:
+ beaglebone, edgerouter, genericx86, genericx86-64, mpc8315e-rdb,
+ qemuarm, qemuarm64, qemumips, qemumips64, qemuppc, qemux86, or
+ qemux86-64.
+
+ </literallayout>
+ The root filesystems provided by the Yocto Project are based
+ off of the <filename>core-image-sato</filename> and
+ <filename>core-image-minimal</filename> images.
+ </para>
+
+ <para>For example, if your target hardware system is a
+ BeagleBone board and your image is a
+ <filename>core-image-minimal</filename> image, you need
+ to download the following root filesystem image file:
+ <literallayout class='monospaced'>
+ core-image-minimal-beaglebone.tar.bz2
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Initialize the Cross-Development Environment:</emphasis>
+ You must <filename>source</filename>
+ the cross-development environment setup script to establish
+ necessary environment variables.</para>
+
+ <para>This script is located in the top-level directory in
+ which you installed the toolchain (e.g.
+ <filename>poky_sdk</filename>).</para>
+
+ <para>Following is an example for the Core2 64-bit
+ architecture:
+ <literallayout class='monospaced'>
+ $ source ~/poky_sdk/environment-setup-core2-64-poky-linux
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Extract the Root Filesystem:</emphasis>
+ Use the <filename>runqemu-extract-sdk</filename> command
+ and provide the root filesystem image.</para>
+
+ <para>Following is an example command that extracts the root
+ filesystem from a previously built root filesystem image that
+ was downloaded from the
+ <ulink url='&YOCTO_DOCS_REF_URL;#index-downloads'>Index of Releases</ulink>.
+ This command extracts the root filesystem into the
+ <filename>core2-64-sato</filename> directory:
+ <literallayout class='monospaced'>
+ $ runqemu-extract-sdk ~/Downloads/core-image-sato-core2-64.tar.bz2 ~/core2-64-sato
+ </literallayout>
+ You could now point to the target sysroot at
+ <filename>core2-64-sato</filename>.
+ </para></listitem>
+ </orderedlist>
</para>
</section>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml
new file mode 100644
index 0000000000..bdb8344cb3
--- /dev/null
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-eclipse-project.xml
@@ -0,0 +1,1211 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='sdk-eclipse-project'>
+
+ <title>Developing Applications Using <trademark class='trade'>Eclipse</trademark></title>
+
+ <para>
+ If you are familiar with the popular Eclipse IDE, you can use an
+ Eclipse Yocto Plug-in to allow you to develop, deploy, and test your
+ application all from within Eclipse.
+ This chapter describes general workflow using the SDK and Eclipse
+ and how to configure and set up Eclipse.
+ </para>
+
+ <section id='workflow-using-eclipse'>
+ <title>Workflow Using <trademark class='trade'>Eclipse</trademark></title>
+
+ <para>
+ The following figure and supporting list summarize the
+ application development general workflow that employs both the
+ SDK Eclipse.
+ </para>
+
+ <para>
+ <imagedata fileref="figures/sdk-eclipse-dev-flow.png"
+ width="7in" depth="7in" align="center" scale="100" />
+ </para>
+
+ <para>
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Prepare the host system for the Yocto
+ Project</emphasis>:
+ See
+ "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+ and
+ "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
+ sections both in the Yocto Project Reference Manual for
+ requirements.
+ In particular, be sure your host system has the
+ <filename>xterm</filename> package installed.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Secure the Yocto Project kernel target
+ image</emphasis>:
+ You must have a target kernel image that has been built
+ using the OpenEmbedded build system.</para>
+ <para>Depending on whether the Yocto Project has a
+ pre-built image that matches your target architecture
+ and where you are going to run the image while you
+ develop your application (QEMU or real hardware), the
+ area from which you get the image differs.
+ <itemizedlist>
+ <listitem><para>
+ Download the image from
+ <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
+ if your target architecture is supported and
+ you are going to develop and test your
+ application on actual hardware.
+ </para></listitem>
+ <listitem><para>
+ Download the image from
+ <ulink url='&YOCTO_QEMU_DL_URL;'>
+ <filename>machines/qemu</filename></ulink> if
+ your target architecture is supported and you
+ are going to develop and test your application
+ using the QEMU emulator.
+ </para></listitem>
+ <listitem><para>
+ Build your image if you cannot find a pre-built
+ image that matches your target architecture.
+ If your target architecture is similar to a
+ supported architecture, you can modify the
+ kernel image before you build it.
+ See the
+ "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</ulink>"
+ section in the Yocto Project Linux Kernel
+ Development Manual for an example.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem>
+ <para><emphasis>Install the SDK</emphasis>:
+ The SDK provides a target-specific cross-development
+ toolchain, the root filesystem, the QEMU emulator, and
+ other tools that can help you develop your application.
+ For information on how to install the SDK, see the
+ "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Secure the target root filesystem
+ and the Cross-development toolchain</emphasis>:
+ You need to find and download the appropriate root
+ filesystem and the cross-development toolchain.</para>
+ <para>You can find the tarballs for the root filesystem
+ in the same area used for the kernel image.
+ Depending on the type of image you are running, the
+ root filesystem you need differs.
+ For example, if you are developing an application that
+ runs on an image that supports Sato, you need to get a
+ root filesystem that supports Sato.</para>
+ <para>You can find the cross-development toolchains at
+ <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
+ Be sure to get the correct toolchain for your
+ development host and your target architecture.
+ See the "<link linkend='sdk-locating-pre-built-sdk-installers'>Locating Pre-Built SDK Installers</link>"
+ section for information and the
+ "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+ section for installation information.
+ <note>
+ As an alternative to downloading an SDK, you can
+ build the SDK installer.
+ For information on building the installer, see the
+ "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+ section.
+ Another helpful resource for building an installer
+ is the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+ wiki page.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Create and build your application</emphasis>:
+ At this point, you need to have source files for your
+ application.
+ Once you have the files, you can use the Eclipse IDE
+ to import them and build the project.
+ If you are not using Eclipse, you need to use the
+ cross-development tools you have installed to create
+ the image.</para></listitem>
+ <listitem><para>
+ <emphasis>Deploy the image with the
+ application</emphasis>:
+ Using the Eclipse IDE, you can deploy your image to the
+ hardware or to QEMU through the project's preferences.
+ You can also use Eclipse to load and test your image
+ under QEMU.
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+ chapter in the Yocto Project Development Tasks Manual
+ for information on using QEMU.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Test and debug the application</emphasis>:
+ Once your application is deployed, you need to test it.
+ Within the Eclipse IDE, you can use the debugging
+ environment along with supported performance enhancing
+ <ulink url='http://www.eclipse.org/linuxtools/'>Linux Tools</ulink>.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='adt-eclipse'>
+ <title>Working Within Eclipse</title>
+
+ <para>
+ The Eclipse IDE is a popular development environment and it
+ fully supports development using the Yocto Project.
+ </para>
+
+ <para>
+ When you install and configure the Eclipse Yocto Project
+ Plug-in into the Eclipse IDE, you maximize your Yocto
+ Project experience.
+ Installing and configuring the Plug-in results in an
+ environment that has extensions specifically designed to let
+ you more easily develop software.
+ These extensions allow for cross-compilation, deployment, and
+ execution of your output into a QEMU emulation session as well
+ as actual target hardware.
+ You can also perform cross-debugging and profiling.
+ The environment also supports performance enhancing
+ <ulink url='http://www.eclipse.org/linuxtools/'>tools</ulink>
+ that allow you to perform remote profiling, tracing,
+ collection of power data, collection of latency data, and
+ collection of performance data.
+ <note>
+ This release of the Yocto Project supports both the Neon
+ and Mars versions of the Eclipse IDE.
+ This section provides information on how to use the Neon
+ release with the Yocto Project.
+ For information on how to use the Mars version of Eclipse
+ with the Yocto Project, see
+ "<link linkend='sdk-appendix-latest-yp-eclipse-plug-in'>Appendix C</link>.
+ </note>
+ </para>
+
+ <section id='neon-setting-up-the-eclipse-ide'>
+ <title>Setting Up the Neon Version of the Eclipse IDE</title>
+
+ <para>
+ To develop within the Eclipse IDE, you need to do the
+ following:
+ <orderedlist>
+ <listitem><para>
+ Install the Neon version of the Eclipse IDE.
+ </para></listitem>
+ <listitem><para>
+ Configure the Eclipse IDE.
+ </para></listitem>
+ <listitem><para>
+ Install the Eclipse Yocto Plug-in.
+ </para></listitem>
+ <listitem><para>
+ Configure the Eclipse Yocto Plug-in.
+ </para></listitem>
+ </orderedlist>
+ <note>
+ Do not install Eclipse from your distribution's package
+ repository.
+ Be sure to install Eclipse from the official Eclipse
+ download site as directed in the next section.
+ </note>
+ </para>
+
+ <section id='neon-installing-eclipse-ide'>
+ <title>Installing the Neon Eclipse IDE</title>
+
+ <para>
+ Follow these steps to locate, install, and configure
+ Neon Eclipse:
+ <orderedlist>
+ <listitem><para>
+ <emphasis>Locate the Neon Download:</emphasis>
+ Open a browser and go to
+ <ulink url='http://www.eclipse.org/neon/'>http://www.eclipse.org/neon/</ulink>.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Download the Tarball:</emphasis>
+ Click through the "Download" buttons to
+ download the file.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Unpack the Tarball:</emphasis>
+ Move to a clean directory and unpack the
+ tarball.
+ Here is an example:
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ tar -xzvf ~/Downloads/eclipse-inst-linux64.tar.gz
+ </literallayout>
+ Everything unpacks into a folder named
+ "eclipse-installer".
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Launch the Installer:</emphasis>
+ Use the following commands to launch the
+ installer:
+ <literallayout class='monospaced'>
+ $ cd ~/eclipse-installer
+ $ ./eclipse-inst
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Select Your IDE:</emphasis>
+ From the list, select the "Eclipse IDE for
+ C/C++ Developers".
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Install the Software:</emphasis>
+ Accept the default "cpp-neon" directory and
+ click "Install".
+ Accept any license agreements and approve any
+ certificates.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Launch Neon:</emphasis>
+ Click the "Launch" button and accept the
+ default "workspace".
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-configuring-the-mars-eclipse-ide'>
+ <title>Configuring the Neon Eclipse IDE</title>
+
+ <para>
+ Follow these steps to configure the Neon Eclipse IDE.
+ <note>
+ Depending on how you installed Eclipse and what
+ you have already done, some of the options will
+ not appear.
+ If you cannot find an option as directed by the
+ manual, it has already been installed.
+ </note>
+ <orderedlist>
+ <listitem><para>
+ Be sure Eclipse is running and you are in your
+ workbench.
+ </para></listitem>
+ <listitem><para>
+ Select "Install New Software" from the "Help"
+ pull-down menu.
+ </para></listitem>
+ <listitem><para>
+ Select
+ "Neon - http://download.eclipse.org/releases/neon"
+ from the "Work with:" pull-down menu.
+ </para></listitem>
+ <listitem><para>
+ Expand the box next to "Linux Tools" and select
+ the following:
+ <literallayout class='monospaced'>
+ C/C++ Remote (Over TCF/TE) Run/Debug Launcher
+ TM Terminal
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Expand the box next to "Mobile and Device
+ Development" and select the following
+ boxes:
+ <literallayout class='monospaced'>
+ C/C++ Remote (Over TCF/TE) Run/Debug Launcher
+ Remote System Explorer User Actions
+ TM Terminal
+ TCF Remote System Explorer add-in
+ TCF Target Explorer
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Expand the box next to "Programming Languages"
+ and select the following box:
+ <literallayout class='monospaced'>
+ C/C++ Development Tools SDK
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Complete the installation by clicking through
+ appropriate "Next" and "Finish" buttons.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-installing-the-eclipse-yocto-plug-in'>
+ <title>Installing or Accessing the Neon Eclipse Yocto Plug-in</title>
+
+ <para>
+ You can install the Eclipse Yocto Plug-in into the
+ Eclipse IDE one of two ways: use the Yocto Project's
+ Eclipse Update site to install the pre-built plug-in
+ or build and install the plug-in from the latest
+ source code.
+ </para>
+
+ <section id='neon-new-software'>
+ <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
+
+ <para>
+ To install the Neon Eclipse Yocto Plug-in from the
+ update site, follow these steps:
+ <orderedlist>
+ <listitem><para>
+ Start up the Eclipse IDE.
+ </para></listitem>
+ <listitem><para>
+ In Eclipse, select "Install New
+ Software" from the "Help" menu.
+ </para></listitem>
+ <listitem><para>
+ Click "Add..." in the "Work with:" area.
+ </para></listitem>
+ <listitem><para>
+ Enter
+ <filename>&ECLIPSE_DL_PLUGIN_URL;/neon</filename>
+ in the URL field and provide a meaningful
+ name in the "Name" field.
+ </para></listitem>
+ <listitem><para>
+ Click "OK" to have the entry added
+ to the "Work with:" drop-down list.
+ </para></listitem>
+ <listitem><para>
+ Select the entry for the plug-in
+ from the "Work with:" drop-down list.
+ </para></listitem>
+ <listitem><para>
+ Check the boxes next to the following:
+ <literallayout class='monospaced'>
+ Yocto Project SDK Plug-in
+ Yocto Project Documentation plug-in
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Complete the remaining software
+ installation steps and then restart the
+ Eclipse IDE to finish the installation of
+ the plug-in.
+ <note>
+ You can click "OK" when prompted about
+ installing software that contains
+ unsigned content.
+ </note>
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-zip-file-method'>
+ <title>Installing the Plug-in Using the Latest Source Code</title>
+
+ <para>
+ To install the Neon Eclipse Yocto Plug-in from the
+ latest source code, follow these steps:
+ <orderedlist>
+ <listitem><para>
+ Be sure your development system
+ has JDK 1.8+
+ </para></listitem>
+ <listitem><para>
+ Install X11-related packages:
+ <literallayout class='monospaced'>
+ $ sudo apt-get install xauth
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ In a new terminal shell, create a
+ Git repository with:
+ <literallayout class='monospaced'>
+ $ cd ~
+ $ git clone git://git.yoctoproject.org/eclipse-poky
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Use Git to create the correct tag:
+ <literallayout class='monospaced'>
+ $ cd ~/eclipse-poky
+ $ git checkout neon/yocto-&DISTRO;
+ </literallayout>
+ This creates a local tag named
+ <filename>neon/yocto-&DISTRO;</filename>
+ based on the branch
+ <filename>origin/neon-master</filename>.
+ You are put into a detached HEAD state,
+ which is fine since you are only going to
+ be building and not developing.
+ </para></listitem>
+ <listitem><para>
+ Change to the <filename>scripts</filename>
+ directory within the Git repository:
+ <literallayout class='monospaced'>
+ $ cd scripts
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Set up the local build environment
+ by running the setup script:
+ <literallayout class='monospaced'>
+ $ ./setup.sh
+ </literallayout>
+ When the script finishes execution,
+ it prompts you with instructions on how to
+ run the <filename>build.sh</filename>
+ script, which is also in the
+ <filename>scripts</filename> directory of
+ the Git repository created earlier.
+ </para></listitem>
+ <listitem><para>
+ Run the <filename>build.sh</filename>
+ script as directed.
+ Be sure to provide the tag name,
+ documentation branch, and a release name.
+ </para>
+ <para>
+ Following is an example:
+ <literallayout class='monospaced'>
+ $ ECLIPSE_HOME=/home/scottrif/eclipse-poky/scripts/eclipse ./build.sh -l neon/yocto-&DISTRO; master yocto-&DISTRO; 2>&amp;1 | tee build.log
+ </literallayout>
+ The previous example command adds the tag
+ you need for
+ <filename>mars/yocto-&DISTRO;</filename>
+ to <filename>HEAD</filename>, then tells
+ the build script to use the local (-l) Git
+ checkout for the build.
+ After running the script, the file
+ <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
+ is in the current directory.
+ </para></listitem>
+ <listitem><para>
+ If necessary, start the Eclipse IDE
+ and be sure you are in the Workbench.
+ </para></listitem>
+ <listitem><para>
+ Select "Install New Software" from
+ the "Help" pull-down menu.
+ </para></listitem>
+ <listitem><para>
+ Click "Add".
+ </para></listitem>
+ <listitem><para>
+ Provide anything you want in the
+ "Name" field.
+ </para></listitem>
+ <listitem><para>
+ Click "Archive" and browse to the
+ ZIP file you built earlier.
+ This ZIP file should not be "unzipped", and
+ must be the
+ <filename>*archive.zip</filename> file
+ created by running the
+ <filename>build.sh</filename> script.
+ </para></listitem>
+ <listitem><para>
+ Click the "OK" button.
+ </para></listitem>
+ <listitem><para>
+ Check the boxes that appear in
+ the installation window to install the
+ following:
+ <literallayout class='monospaced'>
+ Yocto Project SDK Plug-in
+ Yocto Project Documentation plug-in
+ </literallayout>
+ </para></listitem>
+ <listitem><para>
+ Finish the installation by clicking
+ through the appropriate buttons.
+ You can click "OK" when prompted about
+ installing software that contains unsigned
+ content.
+ </para></listitem>
+ <listitem><para>
+ Restart the Eclipse IDE if necessary.
+ </para></listitem>
+ </orderedlist>
+ </para>
+
+ <para>
+ At this point you should be able to configure the
+ Eclipse Yocto Plug-in as described in the
+ "<link linkend='mars-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
+ section.
+ </para>
+ </section>
+ </section>
+
+ <section id='neon-configuring-the-eclipse-yocto-plug-in'>
+ <title>Configuring the Neon Eclipse Yocto Plug-in</title>
+
+ <para>
+ Configuring the Neon Eclipse Yocto Plug-in involves
+ setting the Cross Compiler options and the Target
+ options.
+ The configurations you choose become the default
+ settings for all projects.
+ You do have opportunities to change them later when
+ you configure the project (see the following section).
+ </para>
+
+ <para>
+ To start, you need to do the following from within the
+ Eclipse IDE:
+ <itemizedlist>
+ <listitem><para>
+ Choose "Preferences" from the "Window" menu to
+ display the Preferences Dialog.
+ </para></listitem>
+ <listitem><para>
+ Click "Yocto Project SDK" to display
+ the configuration screen.
+ </para></listitem>
+ </itemizedlist>
+ The following sub-sections describe how to configure
+ the plug-in.
+ <note>
+ Throughout the descriptions, a start-to-finish
+ example for preparing a QEMU image for use with
+ Eclipse is referenced as the "wiki" and is linked
+ to the example on the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
+ wiki page.
+ </note>
+ </para>
+
+ <section id='neon-configuring-the-cross-compiler-options'>
+ <title>Configuring the Cross-Compiler Options</title>
+
+ <para>
+ Cross Compiler options enable Eclipse to use your
+ specific cross compiler toolchain.
+ To configure these options, you must select
+ the type of toolchain, point to the toolchain,
+ specify the sysroot location, and select the target
+ architecture.
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>Selecting the Toolchain
+ Type:</emphasis>
+ Choose between
+ <filename>Standalone pre-built toolchain</filename>
+ and
+ <filename>Build system derived toolchain</filename>
+ for Cross Compiler Options.
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>
+ <filename>Standalone Pre-built Toolchain:</filename>
+ </emphasis>
+ Select this type when you are using
+ a stand-alone cross-toolchain.
+ For example, suppose you are an
+ application developer and do not
+ need to build a target image.
+ Instead, you just want to use an
+ architecture-specific toolchain on
+ an existing kernel and target root
+ filesystem.
+ In other words, you have downloaded
+ and installed a pre-built toolchain
+ for an existing image.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>
+ <filename>Build System Derived Toolchain:</filename>
+ </emphasis>
+ Select this type if you built the
+ toolchain as part of the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
+ When you select
+ <filename>Build system derived toolchain</filename>,
+ you are using the toolchain built
+ and bundled inside the Build
+ Directory.
+ For example, suppose you created a
+ suitable image using the steps in the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+ In this situation, you would select
+ the
+ <filename>Build system derived toolchain</filename>.
+ </para></listitem>
+ </itemizedlist>
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Specify the Toolchain Root
+ Location:</emphasis>
+ If you are using a stand-alone pre-built
+ toolchain, you should be pointing to where
+ it is installed (e.g.
+ <filename>/opt/poky/&DISTRO;</filename>).
+ See the
+ "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+ section for information about how the SDK is
+ installed.</para>
+ <para>If you are using a build system
+ derived toolchain, the path you provide for
+ the
+ <filename>Toolchain Root Location</filename>
+ field is the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ from which you run the
+ <filename>bitbake</filename> command (e.g
+ <filename>/home/scottrif/poky/build</filename>).
+ </para>
+ <para>For more information, see the
+ "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Specify Sysroot Location:
+ </emphasis>
+ This location is where the root filesystem
+ for the target hardware resides.
+ </para>
+ <para>This location depends on where you
+ separately extracted and installed the
+ target filesystem when you either built
+ it or downloaded it.
+ <note>
+ If you downloaded the root filesystem
+ for the target hardware rather than
+ built it, you must download the
+ <filename>sato-sdk</filename> image
+ in order to build any c/c++ projects.
+ </note>
+ As an example, suppose you prepared an
+ image using the steps in the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+ If so, the
+ <filename>MY_QEMU_ROOTFS</filename>
+ directory is found in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ and you would browse to and select that
+ directory (e.g.
+ <filename>/home/scottrif/poky/build/MY_QEMU_ROOTFS</filename>).
+ </para>
+ <para>For more information on how to
+ install the toolchain and on how to extract
+ and install the sysroot filesystem, see the
+ "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+ section.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Select the Target Architecture:
+ </emphasis>
+ The target architecture is the type of
+ hardware you are going to use or emulate.
+ Use the pull-down
+ <filename>Target Architecture</filename>
+ menu to make your selection.
+ The pull-down menu should have the
+ supported architectures.
+ If the architecture you need is not listed
+ in the menu, you will need to build the
+ image.
+ See the
+ "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
+ section of the Yocto Project Quick Start
+ for more information.
+ You can also see the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section id='neon-configuring-the-target-options'>
+ <title>Configuring the Target Options</title>
+
+ <para>
+ You can choose to emulate hardware using the QEMU
+ emulator, or you can choose to run your image on
+ actual hardware.
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>QEMU:</emphasis>
+ Select this option if you will be using the
+ QEMU emulator.
+ If you are using the emulator, you also
+ need to locate the kernel and specify any
+ custom options.</para>
+ <para>If you selected the
+ <filename>Build system derived toolchain</filename>,
+ the target kernel you built will be located
+ in the
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
+ in
+ <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
+ directory.
+ As an example, suppose you performed the
+ steps in the
+ <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
+ In this case, you specify your Build
+ Directory path followed by the image (e.g.
+ <filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
+ </para>
+ <para>If you selected the standalone
+ pre-built toolchain, the pre-built image
+ you downloaded is located in the directory
+ you specified when you downloaded the
+ image.</para>
+ <para>Most custom options are for advanced
+ QEMU users to further customize their QEMU
+ instance.
+ These options are specified between paired
+ angled brackets.
+ Some options must be specified outside the
+ brackets.
+ In particular, the options
+ <filename>serial</filename>,
+ <filename>nographic</filename>, and
+ <filename>kvm</filename> must all be
+ outside the brackets.
+ Use the <filename>man qemu</filename>
+ command to get help on all the options and
+ their use.
+ The following is an example:
+ <literallayout class='monospaced'>
+ serial ‘&lt;-m 256 -full-screen&gt;’
+ </literallayout></para>
+ <para>
+ Regardless of the mode, Sysroot is already
+ defined as part of the Cross-Compiler
+ Options configuration in the
+ <filename>Sysroot Location:</filename>
+ field.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>External HW:</emphasis>
+ Select this option if you will be using
+ actual hardware.</para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Click the "Apply" and "OK" to save your plug-in
+ configurations.
+ </para>
+ </section>
+ </section>
+ </section>
+
+ <section id='neon-creating-the-project'>
+ <title>Creating the Project</title>
+
+ <para>
+ You can create two types of projects: Autotools-based, or
+ Makefile-based.
+ This section describes how to create Autotools-based
+ projects from within the Eclipse IDE.
+ For information on creating Makefile-based projects in a
+ terminal window, see the
+ "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
+ section.
+ <note>
+ Do not use special characters in project names
+ (e.g. spaces, underscores, etc.). Doing so can
+ cause configuration to fail.
+ </note>
+ </para>
+
+ <para>
+ To create a project based on a Yocto template and then
+ display the source code, follow these steps:
+ <orderedlist>
+ <listitem><para>
+ Select "C Project" from the "File -> New" menu.
+ </para></listitem>
+ <listitem><para>
+ Expand
+ <filename>Yocto Project SDK Autotools Project</filename>.
+ </para></listitem>
+ <listitem><para>
+ Select <filename>Hello World ANSI C Autotools Projects</filename>.
+ This is an Autotools-based project based on a Yocto
+ template.
+ </para></listitem>
+ <listitem><para>
+ Put a name in the
+ <filename>Project name:</filename> field.
+ Do not use hyphens as part of the name
+ (e.g. <filename>hello</filename>).
+ </para></listitem>
+ <listitem><para>
+ Click "Next".
+ </para></listitem>
+ <listitem><para>
+ Add appropriate information in the various fields.
+ </para></listitem>
+ <listitem><para>
+ Click "Finish".
+ </para></listitem>
+ <listitem><para>
+ If the "open perspective" prompt appears,
+ click "Yes" so that you in the C/C++ perspective.
+ </para></listitem>
+ <listitem><para>The left-hand navigation pane shows
+ your project.
+ You can display your source by double clicking the
+ project's source file.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-configuring-the-cross-toolchains'>
+ <title>Configuring the Cross-Toolchains</title>
+
+ <para>
+ The earlier section,
+ "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>",
+ sets up the default project configurations.
+ You can override these settings for a given project by
+ following these steps:
+ <orderedlist>
+ <listitem><para>
+ Select "Yocto Project Settings" from
+ the "Project -> Properties" menu.
+ This selection brings up the Yocto Project Settings
+ Dialog and allows you to make changes specific to
+ an individual project.</para>
+ <para>By default, the Cross Compiler Options and
+ Target Options for a project are inherited from
+ settings you provided using the Preferences Dialog
+ as described earlier in the
+ "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
+ section.
+ The Yocto Project Settings Dialog allows you to
+ override those default settings for a given
+ project.
+ </para></listitem>
+ <listitem><para>
+ Make or verify your configurations for the
+ project and click "OK".
+ </para></listitem>
+ <listitem><para>
+ Right-click in the navigation pane and
+ select "Reconfigure Project" from the pop-up menu.
+ This selection reconfigures the project by running
+ <filename>autogen.sh</filename> in the workspace
+ for your project.
+ The script also runs
+ <filename>libtoolize</filename>,
+ <filename>aclocal</filename>,
+ <filename>autoconf</filename>,
+ <filename>autoheader</filename>,
+ <filename>automake --a</filename>, and
+ <filename>./configure</filename>.
+ Click on the "Console" tab beneath your source code
+ to see the results of reconfiguring your project.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-building-the-project'>
+ <title>Building the Project</title>
+ <para>
+ To build the project select "Build All" from the
+ "Project" menu.
+ The console should update and you can note the
+ cross-compiler you are using.
+ <note>
+ When building "Yocto Project SDK Autotools" projects,
+ the Eclipse IDE might display error messages for
+ Functions/Symbols/Types that cannot be "resolved",
+ even when the related include file is listed at the
+ project navigator and when the project is able to
+ build.
+ For these cases only, it is recommended to add a new
+ linked folder to the appropriate sysroot.
+ Use these steps to add the linked folder:
+ <orderedlist>
+ <listitem><para>
+ Select the project.
+ </para></listitem>
+ <listitem><para>
+ Select "Folder" from the
+ <filename>File > New</filename> menu.
+ </para></listitem>
+ <listitem><para>
+ In the "New Folder" Dialog, select "Link to
+ alternate location (linked folder)".
+ </para></listitem>
+ <listitem><para>
+ Click "Browse" to navigate to the include
+ folder inside the same sysroot location
+ selected in the Yocto Project
+ configuration preferences.
+ </para></listitem>
+ <listitem><para>
+ Click "OK".
+ </para></listitem>
+ <listitem><para>
+ Click "Finish" to save the linked folder.
+ </para></listitem>
+ </orderedlist>
+ </note>
+ </para>
+ </section>
+
+ <section id='neon-starting-qemu-in-user-space-nfs-mode'>
+ <title>Starting QEMU in User-Space NFS Mode</title>
+
+ <para>
+ To start the QEMU emulator from within Eclipse, follow
+ these steps:
+ <note>
+ See the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+ chapter in the Yocto Project Development Tasks Manual
+ for more information on using QEMU.
+ </note>
+ <orderedlist>
+ <listitem><para>Expose and select "External Tools
+ Configurations ..." from the "Run -> External
+ Tools" menu.
+ </para></listitem>
+ <listitem><para>
+ Locate and select your image in the navigation
+ panel to the left
+ (e.g. <filename>qemu_i586-poky-linux</filename>).
+ </para></listitem>
+ <listitem><para>
+ Click "Run" to launch QEMU.
+ <note>
+ The host on which you are running QEMU must
+ have the <filename>rpcbind</filename> utility
+ running to be able to make RPC calls on a
+ server on that machine.
+ If QEMU does not invoke and you receive error
+ messages involving
+ <filename>rpcbind</filename>, follow the
+ suggestions to get the service running.
+ As an example, on a new Ubuntu 16.04 LTS
+ installation, you must do the following in
+ order to get QEMU to launch:
+ <literallayout class='monospaced'>
+ $ sudo apt-get install rpcbind
+ </literallayout>
+ After installing <filename>rpcbind</filename>,
+ you need to edit the
+ <filename>/etc/init.d/rpcbind</filename> file
+ to include the following line:
+ <literallayout class='monospaced'>
+ OPTIONS="-i -w"
+ </literallayout>
+ After modifying the file, you need to start the
+ service:
+ <literallayout class='monospaced'>
+ $ sudo service portmap restart
+ </literallayout>
+ </note>
+ </para></listitem>
+ <listitem><para>
+ If needed, enter your host root password in
+ the shell window at the prompt.
+ This sets up a <filename>Tap 0</filename>
+ connection needed for running in user-space NFS
+ mode.
+ </para></listitem>
+ <listitem><para>
+ Wait for QEMU to launch.
+ </para></listitem>
+ <listitem><para>
+ Once QEMU launches, you can begin operating
+ within that environment.
+ One useful task at this point would be to determine
+ the IP Address for the user-space NFS by using the
+ <filename>ifconfig</filename> command.
+ The IP address of the QEMU machine appears in the
+ xterm window.
+ You can use this address to help you see which
+ particular
+ IP address the instance of QEMU is using.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-deploying-and-debugging-the-application'>
+ <title>Deploying and Debugging the Application</title>
+
+ <para>
+ Once the QEMU emulator is running the image, you can deploy
+ your application using the Eclipse IDE and then use
+ the emulator to perform debugging.
+ Follow these steps to deploy the application.
+ <note>
+ Currently, Eclipse does not support SSH port
+ forwarding.
+ Consequently, if you need to run or debug a remote
+ application using the host display, you must create a
+ tunneling connection from outside Eclipse and keep
+ that connection alive during your work.
+ For example, in a new terminal, run the following:
+ <literallayout class='monospaced'>
+ $ ssh -XY <replaceable>user_name</replaceable>@<replaceable>remote_host_ip</replaceable>
+ </literallayout>
+ Using the above form, here is an example:
+ <literallayout class='monospaced'>
+ $ ssh -XY root@192.168.7.2
+ </literallayout>
+ After running the command, add the command to be
+ executed in Eclipse's run configuration before the
+ application as follows:
+ <literallayout class='monospaced'>
+ export DISPLAY=:10.0
+ </literallayout>
+ Be sure to not destroy the connection during your QEMU
+ session (i.e. do not
+ exit out of or close that shell).
+ </note>
+ <orderedlist>
+ <listitem><para>
+ Select "Debug Configurations..." from the
+ "Run" menu.
+ </para></listitem>
+ <listitem><para>
+ In the left area, expand
+ <filename>C/C++Remote Application</filename>.
+ </para></listitem>
+ <listitem><para>
+ Locate your project and select it to bring
+ up a new tabbed view in the Debug Configurations
+ Dialog.
+ </para></listitem>
+ <listitem><para>
+ Click on the "Debugger" tab to see the
+ cross-tool debugger you are using.
+ Be sure to change to the debugger perspective in
+ Eclipse.
+ </para></listitem>
+ <listitem><para>
+ Click on the "Main" tab.
+ </para></listitem>
+ <listitem><para>
+ Create a new connection to the QEMU instance
+ by clicking on "new".</para></listitem>
+ <listitem><para>Select <filename>SSH</filename>, which
+ means Secure Socket Shell and then click "OK".
+ Optionally, you can select a TCF connection
+ instead.
+ </para></listitem>
+ <listitem><para>
+ Clear out the "Connection name" field and
+ enter any name you want for the connection.
+ </para></listitem>
+ <listitem><para>
+ Put the IP address for the connection in
+ the "Host" field.
+ For QEMU, the default is
+ <filename>192.168.7.2</filename>.
+ However, if a previous QEMU session did not exit
+ cleanly, the IP address increments (e.g.
+ <filename>192.168.7.3</filename>).
+ <note>
+ You can find the IP address for the current
+ QEMU session by looking in the xterm that
+ opens when you launch QEMU.
+ </note>
+ </para></listitem>
+ <listitem><para>
+ Enter <filename>root</filename>, which
+ is the default for QEMU, for the "User" field.
+ Be sure to leave the password field empty.
+ </para></listitem>
+ <listitem><para>
+ Click "Finish" to close the New Connections Dialog.
+ </para></listitem>
+ <listitem><para>
+ If necessary, use the drop-down menu now in the
+ "Connection" field and pick the IP Address you
+ entered.
+ </para></listitem>
+ <listitem><para>
+ Assuming you are connecting as the root
+ user, which is the default for QEMU x86-64 SDK
+ images provided by the Yocto Project, in the
+ "Remote Absolute File Path for C/C++ Application"
+ field, browse to
+ <filename>/home/root/</filename><replaceable>ProjectName</replaceable>
+ (e.g. <filename>/home/root/hello</filename>).
+ You could also browse to any other path you have
+ write access to on the target such as
+ <filename>/usr/bin</filename>.
+ This location is where your application will be
+ located on the QEMU system.
+ If you fail to browse to and specify an appropriate
+ location, QEMU will not understand what to remotely
+ launch.
+ Eclipse is helpful in that it auto fills your
+ application name for you assuming you browsed to a
+ directory.
+ <note><title>Tips</title>
+ <itemizedlist>
+ <listitem><para>
+ If you are prompted to provide a username
+ and to optionally set a password, be sure
+ you provide "root" as the username and you
+ leave the password field blank.
+ </para></listitem>
+ <listitem><para>
+ If browsing to a directory fails or times
+ out, but you can
+ <filename>ssh</filename> into your QEMU
+ or target from the command line and you
+ have proxies set up, it is likely that
+ Eclipse is sending the SSH traffic to a
+ proxy.
+ In this case, either use TCF , or click on
+ "Configure proxy settings" in the
+ connection dialog and add the target IP
+ address to the "bypass proxy" section.
+ You might also need to change
+ "Active Provider" from Native to Manual.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para></listitem>
+ <listitem><para>
+ Be sure you change to the "Debug" perspective in
+ Eclipse.
+ </para></listitem>
+ <listitem><para>
+ Click "Debug"
+ </para></listitem>
+ <listitem><para>
+ Accept the debug perspective.
+ </para></listitem>
+ </orderedlist>
+ </para>
+ </section>
+
+ <section id='neon-using-Linuxtools'>
+ <title>Using Linuxtools</title>
+
+ <para>
+ As mentioned earlier in the manual, performance tools exist
+ (Linuxtools) that enhance your development experience.
+ These tools are aids in developing and debugging
+ applications and images.
+ You can run these tools from within the Eclipse IDE through
+ the "Linuxtools" menu.
+ </para>
+
+ <para>
+ For information on how to configure and use these tools,
+ see
+ <ulink url='http://www.eclipse.org/linuxtools/'>http://www.eclipse.org/linuxtools/</ulink>.
+ </para>
+ </section>
+ </section>
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
index 1496476be9..444d816a71 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
@@ -15,7 +15,7 @@
to an image, modify the source for an existing component, test
changes on the target hardware, and ease integration into the rest of
the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-system-term'>OpenEmbedded build system</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
<note>
For a side-by-side comparison of main features supported for an
extensible SDK as compared to a standard SDK, see the
@@ -235,15 +235,28 @@
you build, test and package software within the extensible SDK, and
optionally integrate it into an image built by the OpenEmbedded
build system.
+ <note><title>Tip</title>
+ The use of <filename>devtool</filename> is not limited to
+ the extensible SDK.
+ You can use <filename>devtool</filename> to help you easily
+ develop any project whose build output must be part of an
+ image built using the OpenEmbedded build system.
+ </note>
</para>
<para>
The <filename>devtool</filename> command line is organized
similarly to
- <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> in that it has a
+ <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink> in that it has a
number of sub-commands for each function.
You can run <filename>devtool --help</filename> to see all the
commands.
+ <note>
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool</filename>&nbsp;Quick Reference</ulink>"
+ in the Yocto Project Reference Manual for a
+ <filename>devtool</filename> quick reference.
+ </note>
</para>
<para>
@@ -293,7 +306,7 @@
The <filename>devtool add</filename> command generates
a new recipe based on existing source code.
This command takes advantage of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>
layer that many <filename>devtool</filename> commands
use.
The command is flexible enough to allow you to extract source
@@ -612,7 +625,7 @@
extracts them.
Providing the <replaceable>srctree</replaceable>
argument instructs <filename>devtool</filename> where
- place the extracted source.</para>
+ to place the extracted source.</para>
<para>Within workspace, <filename>devtool</filename>
creates an append file for the recipe.
@@ -1262,7 +1275,7 @@
<title>Working With Recipes</title>
<para>
- When building a recipe with <filename>devtool build</filename> the
+ When building a recipe with <filename>devtool build</filename>, the
typical build progression is as follows:
<orderedlist>
<listitem><para>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml
index 68401690de..b6925fa266 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-intro.xml
@@ -9,8 +9,8 @@
<title>Introduction</title>
<para>
- Welcome to the Yocto Project Software Development Kit (SDK)
- Developer's Guide.
+ Welcome to the Yocto Project Application Development and the
+ Extensible Software Development Kit (eSDK) manual.
This manual provides information that explains how to use both the
Yocto Project extensible and standard SDKs to develop
applications and images.
@@ -52,7 +52,7 @@
new applications and libraries to an image, modify the source of an
existing component, test changes on the target hardware, and easily
integrate an application into the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-system-term'>OpenEmbedded build system</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
</para>
<para>
@@ -93,7 +93,7 @@
matching sysroots (target and native) all built by the
OpenEmbedded build system (e.g. the SDK).
The toolchain and sysroots are based on a
- <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
configuration and extensions,
which allows you to cross-develop on the host machine for the
target hardware.
@@ -207,7 +207,7 @@
<para>
The
- <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>Cross-Development Toolchain</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain'>Cross-Development Toolchain</ulink>
consists of a cross-compiler, cross-linker, and cross-debugger
that are used to develop user-space applications for targeted
hardware.
@@ -215,7 +215,7 @@
built-in <filename>devtool</filename> functionality.
This toolchain is created by running a SDK installer script
or through a
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
that is based on your Metadata configuration or extension for
your targeted device.
The cross-toolchain works with a matching target sysroot.
@@ -245,16 +245,15 @@
<listitem><para>
If you have cloned the <filename>poky</filename> Git
repository to create a
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
and you have sourced the environment setup script, QEMU is
installed and automatically available.
</para></listitem>
<listitem><para>
If you have downloaded a Yocto Project release and unpacked
- it to create a
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
- and you have sourced the environment setup script, QEMU is
- installed and automatically available.
+ it to create a Source Directory and you have sourced the
+ environment setup script, QEMU is installed and
+ automatically available.
</para></listitem>
<listitem><para>
If you have installed the cross-toolchain tarball and you
@@ -295,8 +294,8 @@
For information about the application development workflow that
uses the Eclipse IDE and for a detailed example of how to install
and configure the Eclipse Yocto Project Plug-in, see the
- "<link linkend='sdk-developing-applications-using-eclipse'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
- section.
+ "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
+ Chapter.
</para>
</section>
@@ -385,7 +384,7 @@
to download and learn about the emulator.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
- chapter in the Yocto Project Development Manual
+ chapter in the Yocto Project Development Tasks Manual
for information on using QEMU within the Yocto
Project.</para></listitem>
</orderedlist>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml
index 5c28e34eb0..7fc0472cd7 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-manual.xml
@@ -17,14 +17,14 @@
</mediaobject>
<title>
- Yocto Project Software Development Kit (SDK) Developer's Guide
+ Yocto Project Application Development and the Extensible Software Development Kit (eSDK)
</title>
<authorgroup>
<author>
<firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Scotty's Documentation Services, LLC</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
<email>srifenbark@gmail.com</email>
</author>
@@ -47,24 +47,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -81,28 +76,29 @@
<note><title>Manual Notes</title>
<itemizedlist>
<listitem><para>
- For the latest version of the Yocto Project Software
- Development Kit (SDK) Developer's Guide associated with
- this Yocto Project release (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Software Development Kit (SDK)
- Developer's Guide from the
+ This version of the
+ <emphasis>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</emphasis>
+ manual is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
</para></listitem>
<listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
+ For manuals associated with other releases of the Yocto
+ Project, go to the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
+ and choose the manual associated with the desired
+ Yocto Project.
</para></listitem>
<listitem><para>
- For an in-development version of the Yocto Project
- Software Development Kit (SDK) Developer's Guide, see
- <ulink url='&YOCTO_DOCS_URL;/latest/sdk-manual/sdk-manual.html'></ulink>.
- </para></listitem>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
+ </para></listitem>
</itemizedlist>
</note>
@@ -118,6 +114,8 @@
<xi:include href="sdk-working-projects.xml"/>
+ <xi:include href="sdk-eclipse-project.xml"/>
+
<xi:include href="sdk-appendix-obtain.xml"/>
<xi:include href="sdk-appendix-customizing.xml"/>
diff --git a/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml b/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml
index 54bc4d739d..6965e3f285 100644
--- a/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml
+++ b/import-layers/yocto-poky/documentation/sdk-manual/sdk-working-projects.xml
@@ -10,8 +10,9 @@
You can use the SDK toolchain directly with Makefile,
Autotools, and <trademark class='trade'>Eclipse</trademark> based
projects.
- This chapter covers information specific to each of these types of
- projects.
+ This chapter covers the first two, while the
+ "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
+ Chapter covers the latter.
</para>
<section id='autotools-based-projects'>
@@ -276,1184 +277,6 @@
</note>
</para>
</section>
-
- <section id='sdk-developing-applications-using-eclipse'>
- <title>Developing Applications Using <trademark class='trade'>Eclipse</trademark></title>
-
- <para>
- If you are familiar with the popular Eclipse IDE, you can use an
- Eclipse Yocto Plug-in to allow you to develop, deploy, and test your
- application all from within Eclipse.
- This section describes general workflow using the SDK and Eclipse
- and how to configure and set up Eclipse.
- </para>
-
- <section id='workflow-using-eclipse'>
- <title>Workflow Using <trademark class='trade'>Eclipse</trademark></title>
-
- <para>
- The following figure and supporting list summarize the
- application development general workflow that employs both the
- SDK Eclipse.
- </para>
-
- <para>
- <imagedata fileref="figures/sdk-eclipse-dev-flow.png"
- width="7in" depth="7in" align="center" scale="100" />
- </para>
-
- <para>
- <orderedlist>
- <listitem><para>
- <emphasis>Prepare the host system for the Yocto
- Project</emphasis>:
- See
- "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
- and
- "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
- sections both in the Yocto Project Reference Manual for
- requirements.
- In particular, be sure your host system has the
- <filename>xterm</filename> package installed.
- </para></listitem>
- <listitem><para>
- <emphasis>Secure the Yocto Project kernel target
- image</emphasis>:
- You must have a target kernel image that has been built
- using the OpenEmbedded build system.</para>
- <para>Depending on whether the Yocto Project has a
- pre-built image that matches your target architecture
- and where you are going to run the image while you
- develop your application (QEMU or real hardware), the
- area from which you get the image differs.
- <itemizedlist>
- <listitem><para>
- Download the image from
- <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
- if your target architecture is supported and
- you are going to develop and test your
- application on actual hardware.
- </para></listitem>
- <listitem><para>
- Download the image from
- <ulink url='&YOCTO_QEMU_DL_URL;'>
- <filename>machines/qemu</filename></ulink> if
- your target architecture is supported and you
- are going to develop and test your application
- using the QEMU emulator.
- </para></listitem>
- <listitem><para>
- Build your image if you cannot find a pre-built
- image that matches your target architecture.
- If your target architecture is similar to a
- supported architecture, you can modify the
- kernel image before you build it.
- See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"
- section in the Yocto Project Development
- manual for an example.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- <listitem>
- <para><emphasis>Install the SDK</emphasis>:
- The SDK provides a target-specific cross-development
- toolchain, the root filesystem, the QEMU emulator, and
- other tools that can help you develop your application.
- For information on how to install the SDK, see the
- "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
- section.
- </para></listitem>
- <listitem><para>
- <emphasis>Secure the target root filesystem
- and the Cross-development toolchain</emphasis>:
- You need to find and download the appropriate root
- filesystem and the cross-development toolchain.</para>
- <para>You can find the tarballs for the root filesystem
- in the same area used for the kernel image.
- Depending on the type of image you are running, the
- root filesystem you need differs.
- For example, if you are developing an application that
- runs on an image that supports Sato, you need to get a
- root filesystem that supports Sato.</para>
- <para>You can find the cross-development toolchains at
- <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
- Be sure to get the correct toolchain for your
- development host and your target architecture.
- See the "<link linkend='sdk-locating-pre-built-sdk-installers'>Locating Pre-Built SDK Installers</link>"
- section for information and the
- "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
- section for installation information.
- <note>
- As an alternative to downloading an SDK, you can
- build the SDK installer.
- For information on building the installer, see the
- "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
- section.
- Another helpful resource for building an installer
- is the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
- wiki page.
- </note>
- </para></listitem>
- <listitem><para>
- <emphasis>Create and build your application</emphasis>:
- At this point, you need to have source files for your
- application.
- Once you have the files, you can use the Eclipse IDE
- to import them and build the project.
- If you are not using Eclipse, you need to use the
- cross-development tools you have installed to create
- the image.</para></listitem>
- <listitem><para>
- <emphasis>Deploy the image with the
- application</emphasis>:
- Using the Eclipse IDE, you can deploy your image to the
- hardware or to QEMU through the project's preferences.
- You can also use Eclipse to load and test your image
- under QEMU.
- See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
- chapter in the Yocto Project Development Manual
- for information on using QEMU.
- </para></listitem>
- <listitem><para>
- <emphasis>Test and debug the application</emphasis>:
- Once your application is deployed, you need to test it.
- Within the Eclipse IDE, you can use the debugging
- environment along with supported performance enhancing
- <ulink url='http://www.eclipse.org/linuxtools/'>Linux Tools</ulink>.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='adt-eclipse'>
- <title>Working Within Eclipse</title>
-
- <para>
- The Eclipse IDE is a popular development environment and it
- fully supports development using the Yocto Project.
- </para>
-
- <para>
- When you install and configure the Eclipse Yocto Project
- Plug-in into the Eclipse IDE, you maximize your Yocto
- Project experience.
- Installing and configuring the Plug-in results in an
- environment that has extensions specifically designed to let
- you more easily develop software.
- These extensions allow for cross-compilation, deployment, and
- execution of your output into a QEMU emulation session as well
- as actual target hardware.
- You can also perform cross-debugging and profiling.
- The environment also supports performance enhancing
- <ulink url='http://www.eclipse.org/linuxtools/'>tools</ulink>
- that allow you to perform remote profiling, tracing,
- collection of power data, collection of latency data, and
- collection of performance data.
- <note>
- This release of the Yocto Project supports both the Neon
- and Mars versions of the Eclipse IDE.
- This section provides information on how to use the Neon
- release with the Yocto Project.
- For information on how to use the Mars version of Eclipse
- with the Yocto Project, see
- "<link linkend='sdk-appendix-latest-yp-eclipse-plug-in'>Appendix C</link>.
- </note>
- </para>
-
- <section id='neon-setting-up-the-eclipse-ide'>
- <title>Setting Up the Neon Version of the Eclipse IDE</title>
-
- <para>
- To develop within the Eclipse IDE, you need to do the
- following:
- <orderedlist>
- <listitem><para>
- Install the Neon version of the Eclipse IDE.
- </para></listitem>
- <listitem><para>
- Configure the Eclipse IDE.
- </para></listitem>
- <listitem><para>
- Install the Eclipse Yocto Plug-in.
- </para></listitem>
- <listitem><para>
- Configure the Eclipse Yocto Plug-in.
- </para></listitem>
- </orderedlist>
- <note>
- Do not install Eclipse from your distribution's package
- repository.
- Be sure to install Eclipse from the official Eclipse
- download site as directed in the next section.
- </note>
- </para>
-
- <section id='neon-installing-eclipse-ide'>
- <title>Installing the Neon Eclipse IDE</title>
-
- <para>
- Follow these steps to locate, install, and configure
- Neon Eclipse:
- <orderedlist>
- <listitem><para>
- <emphasis>Locate the Neon Download:</emphasis>
- Open a browser and go to
- <ulink url='http://www.eclipse.org/neon/'>http://www.eclipse.org/neon/</ulink>.
- </para></listitem>
- <listitem><para>
- <emphasis>Download the Tarball:</emphasis>
- Click through the "Download" buttons to
- download the file.
- </para></listitem>
- <listitem><para>
- <emphasis>Unpack the Tarball:</emphasis>
- Move to a clean directory and unpack the
- tarball.
- Here is an example:
- <literallayout class='monospaced'>
- $ cd ~
- $ tar -xzvf ~/Downloads/eclipse-inst-linux64.tar.gz
- </literallayout>
- Everything unpacks into a folder named
- "eclipse-installer".
- </para></listitem>
- <listitem><para>
- <emphasis>Launch the Installer:</emphasis>
- Use the following commands to launch the
- installer:
- <literallayout class='monospaced'>
- $ cd ~/eclipse-installer
- $ ./eclipse-inst
- </literallayout>
- </para></listitem>
- <listitem><para>
- <emphasis>Select Your IDE:</emphasis>
- From the list, select the "Eclipse IDE for
- C/C++ Developers".
- </para></listitem>
- <listitem><para>
- <emphasis>Install the Software:</emphasis>
- Accept the default "cpp-neon" directory and
- click "Install".
- Accept any license agreements and approve any
- certificates.
- </para></listitem>
- <listitem><para>
- <emphasis>Launch Neon:</emphasis>
- Click the "Launch" button and accept the
- default "workspace".
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-configuring-the-mars-eclipse-ide'>
- <title>Configuring the Neon Eclipse IDE</title>
-
- <para>
- Follow these steps to configure the Neon Eclipse IDE.
- <note>
- Depending on how you installed Eclipse and what
- you have already done, some of the options will
- not appear.
- If you cannot find an option as directed by the
- manual, it has already been installed.
- </note>
- <orderedlist>
- <listitem><para>
- Be sure Eclipse is running and you are in your
- workbench.
- </para></listitem>
- <listitem><para>
- Select "Install New Software" from the "Help"
- pull-down menu.
- </para></listitem>
- <listitem><para>
- Select
- "Neon - http://download.eclipse.org/releases/neon"
- from the "Work with:" pull-down menu.
- </para></listitem>
- <listitem><para>
- Expand the box next to "Linux Tools" and select
- the following:
- <literallayout class='monospaced'>
- C/C++ Remote (Over TCF/TE) Run/Debug Launcher
- TM Terminal
- </literallayout>
- </para></listitem>
- <listitem><para>
- Expand the box next to "Mobile and Device
- Development" and select the following
- boxes:
- <literallayout class='monospaced'>
- C/C++ Remote (Over TCF/TE) Run/Debug Launcher
- Remote System Explorer User Actions
- TM Terminal
- TCF Remote System Explorer add-in
- TCF Target Explorer
- </literallayout>
- </para></listitem>
- <listitem><para>
- Expand the box next to "Programming Languages"
- and select the following box:
- <literallayout class='monospaced'>
- C/C++ Development Tools SDK
- </literallayout>
- </para></listitem>
- <listitem><para>
- Complete the installation by clicking through
- appropriate "Next" and "Finish" buttons.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-installing-the-eclipse-yocto-plug-in'>
- <title>Installing or Accessing the Neon Eclipse Yocto Plug-in</title>
-
- <para>
- You can install the Eclipse Yocto Plug-in into the
- Eclipse IDE one of two ways: use the Yocto Project's
- Eclipse Update site to install the pre-built plug-in
- or build and install the plug-in from the latest
- source code.
- </para>
-
- <section id='neon-new-software'>
- <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
-
- <para>
- To install the Neon Eclipse Yocto Plug-in from the
- update site, follow these steps:
- <orderedlist>
- <listitem><para>
- Start up the Eclipse IDE.
- </para></listitem>
- <listitem><para>
- In Eclipse, select "Install New
- Software" from the "Help" menu.
- </para></listitem>
- <listitem><para>
- Click "Add..." in the "Work with:" area.
- </para></listitem>
- <listitem><para>
- Enter
- <filename>&ECLIPSE_DL_PLUGIN_URL;/neon</filename>
- in the URL field and provide a meaningful
- name in the "Name" field.
- </para></listitem>
- <listitem><para>
- Click "OK" to have the entry added
- to the "Work with:" drop-down list.
- </para></listitem>
- <listitem><para>
- Select the entry for the plug-in
- from the "Work with:" drop-down list.
- </para></listitem>
- <listitem><para>
- Check the boxes next to the following:
- <literallayout class='monospaced'>
- Yocto Project SDK Plug-in
- Yocto Project Documentation plug-in
- </literallayout>
- </para></listitem>
- <listitem><para>
- Complete the remaining software
- installation steps and then restart the
- Eclipse IDE to finish the installation of
- the plug-in.
- <note>
- You can click "OK" when prompted about
- installing software that contains
- unsigned content.
- </note>
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-zip-file-method'>
- <title>Installing the Plug-in Using the Latest Source Code</title>
-
- <para>
- To install the Neon Eclipse Yocto Plug-in from the
- latest source code, follow these steps:
- <orderedlist>
- <listitem><para>
- Be sure your development system
- has JDK 1.8+
- </para></listitem>
- <listitem><para>
- Install X11-related packages:
- <literallayout class='monospaced'>
- $ sudo apt-get install xauth
- </literallayout>
- </para></listitem>
- <listitem><para>
- In a new terminal shell, create a
- Git repository with:
- <literallayout class='monospaced'>
- $ cd ~
- $ git clone git://git.yoctoproject.org/eclipse-poky
- </literallayout>
- </para></listitem>
- <listitem><para>
- Use Git to create the correct tag:
- <literallayout class='monospaced'>
- $ cd ~/eclipse-poky
- $ git checkout neon/yocto-&DISTRO;
- </literallayout>
- This creates a local tag named
- <filename>neon/yocto-&DISTRO;</filename>
- based on the branch
- <filename>origin/neon-master</filename>.
- You are put into a detached HEAD state,
- which is fine since you are only going to
- be building and not developing.
- </para></listitem>
- <listitem><para>
- Change to the <filename>scripts</filename>
- directory within the Git repository:
- <literallayout class='monospaced'>
- $ cd scripts
- </literallayout>
- </para></listitem>
- <listitem><para>
- Set up the local build environment
- by running the setup script:
- <literallayout class='monospaced'>
- $ ./setup.sh
- </literallayout>
- When the script finishes execution,
- it prompts you with instructions on how to
- run the <filename>build.sh</filename>
- script, which is also in the
- <filename>scripts</filename> directory of
- the Git repository created earlier.
- </para></listitem>
- <listitem><para>
- Run the <filename>build.sh</filename>
- script as directed.
- Be sure to provide the tag name,
- documentation branch, and a release name.
- </para>
- <para>
- Following is an example:
- <literallayout class='monospaced'>
- $ ECLIPSE_HOME=/home/scottrif/eclipse-poky/scripts/eclipse ./build.sh -l neon/yocto-&DISTRO; master yocto-&DISTRO; 2>&amp;1 | tee build.log
- </literallayout>
- The previous example command adds the tag
- you need for
- <filename>mars/yocto-&DISTRO;</filename>
- to <filename>HEAD</filename>, then tells
- the build script to use the local (-l) Git
- checkout for the build.
- After running the script, the file
- <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
- is in the current directory.
- </para></listitem>
- <listitem><para>
- If necessary, start the Eclipse IDE
- and be sure you are in the Workbench.
- </para></listitem>
- <listitem><para>
- Select "Install New Software" from
- the "Help" pull-down menu.
- </para></listitem>
- <listitem><para>
- Click "Add".
- </para></listitem>
- <listitem><para>
- Provide anything you want in the
- "Name" field.
- </para></listitem>
- <listitem><para>
- Click "Archive" and browse to the
- ZIP file you built earlier.
- This ZIP file should not be "unzipped", and
- must be the
- <filename>*archive.zip</filename> file
- created by running the
- <filename>build.sh</filename> script.
- </para></listitem>
- <listitem><para>
- Click the "OK" button.
- </para></listitem>
- <listitem><para>
- Check the boxes that appear in
- the installation window to install the
- following:
- <literallayout class='monospaced'>
- Yocto Project SDK Plug-in
- Yocto Project Documentation plug-in
- </literallayout>
- </para></listitem>
- <listitem><para>
- Finish the installation by clicking
- through the appropriate buttons.
- You can click "OK" when prompted about
- installing software that contains unsigned
- content.
- </para></listitem>
- <listitem><para>
- Restart the Eclipse IDE if necessary.
- </para></listitem>
- </orderedlist>
- </para>
-
- <para>
- At this point you should be able to configure the
- Eclipse Yocto Plug-in as described in the
- "<link linkend='mars-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
- section.
- </para>
- </section>
- </section>
-
- <section id='neon-configuring-the-eclipse-yocto-plug-in'>
- <title>Configuring the Neon Eclipse Yocto Plug-in</title>
-
- <para>
- Configuring the Neon Eclipse Yocto Plug-in involves
- setting the Cross Compiler options and the Target
- options.
- The configurations you choose become the default
- settings for all projects.
- You do have opportunities to change them later when
- you configure the project (see the following section).
- </para>
-
- <para>
- To start, you need to do the following from within the
- Eclipse IDE:
- <itemizedlist>
- <listitem><para>
- Choose "Preferences" from the "Window" menu to
- display the Preferences Dialog.
- </para></listitem>
- <listitem><para>
- Click "Yocto Project SDK" to display
- the configuration screen.
- </para></listitem>
- </itemizedlist>
- The following sub-sections describe how to configure
- the plug-in.
- <note>
- Throughout the descriptions, a start-to-finish
- example for preparing a QEMU image for use with
- Eclipse is referenced as the "wiki" and is linked
- to the example on the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
- wiki page.
- </note>
- </para>
-
- <section id='neon-configuring-the-cross-compiler-options'>
- <title>Configuring the Cross-Compiler Options</title>
-
- <para>
- Cross Compiler options enable Eclipse to use your
- specific cross compiler toolchain.
- To configure these options, you must select
- the type of toolchain, point to the toolchain,
- specify the sysroot location, and select the target
- architecture.
- <itemizedlist>
- <listitem><para>
- <emphasis>Selecting the Toolchain
- Type:</emphasis>
- Choose between
- <filename>Standalone pre-built toolchain</filename>
- and
- <filename>Build system derived toolchain</filename>
- for Cross Compiler Options.
- <itemizedlist>
- <listitem><para>
- <emphasis>
- <filename>Standalone Pre-built Toolchain:</filename>
- </emphasis>
- Select this type when you are using
- a stand-alone cross-toolchain.
- For example, suppose you are an
- application developer and do not
- need to build a target image.
- Instead, you just want to use an
- architecture-specific toolchain on
- an existing kernel and target root
- filesystem.
- In other words, you have downloaded
- and installed a pre-built toolchain
- for an existing image.
- </para></listitem>
- <listitem><para>
- <emphasis>
- <filename>Build System Derived Toolchain:</filename>
- </emphasis>
- Select this type if you built the
- toolchain as part of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
- When you select
- <filename>Build system derived toolchain</filename>,
- you are using the toolchain built
- and bundled inside the Build
- Directory.
- For example, suppose you created a
- suitable image using the steps in the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
- In this situation, you would select
- the
- <filename>Build system derived toolchain</filename>.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- <listitem><para>
- <emphasis>Specify the Toolchain Root
- Location:</emphasis>
- If you are using a stand-alone pre-built
- toolchain, you should be pointing to where
- it is installed (e.g.
- <filename>/opt/poky/&DISTRO;</filename>).
- See the
- "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
- section for information about how the SDK is
- installed.</para>
- <para>If you are using a build system
- derived toolchain, the path you provide for
- the
- <filename>Toolchain Root Location</filename>
- field is the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- from which you run the
- <filename>bitbake</filename> command (e.g
- <filename>/home/scottrif/poky/build</filename>).
- </para>
- <para>For more information, see the
- "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
- section.
- </para></listitem>
- <listitem><para>
- <emphasis>Specify Sysroot Location:
- </emphasis>
- This location is where the root filesystem
- for the target hardware resides.
- </para>
- <para>This location depends on where you
- separately extracted and installed the
- target filesystem.
- As an example, suppose you prepared an
- image using the steps in the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
- If so, the
- <filename>MY_QEMU_ROOTFS</filename>
- directory is found in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- and you would browse to and select that
- directory (e.g.
- <filename>/home/scottrif/poky/build/MY_QEMU_ROOTFS</filename>).
- </para>
- <para>For more information on how to
- install the toolchain and on how to extract
- and install the sysroot filesystem, see the
- "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
- section.
- </para></listitem>
- <listitem><para>
- <emphasis>Select the Target Architecture:
- </emphasis>
- The target architecture is the type of
- hardware you are going to use or emulate.
- Use the pull-down
- <filename>Target Architecture</filename>
- menu to make your selection.
- The pull-down menu should have the
- supported architectures.
- If the architecture you need is not listed
- in the menu, you will need to build the
- image.
- See the
- "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
- section of the Yocto Project Quick Start
- for more information.
- You can also see the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section id='neon-configuring-the-target-options'>
- <title>Configuring the Target Options</title>
-
- <para>
- You can choose to emulate hardware using the QEMU
- emulator, or you can choose to run your image on
- actual hardware.
- <itemizedlist>
- <listitem><para>
- <emphasis>QEMU:</emphasis>
- Select this option if you will be using the
- QEMU emulator.
- If you are using the emulator, you also
- need to locate the kernel and specify any
- custom options.</para>
- <para>If you selected the
- <filename>Build system derived toolchain</filename>,
- the target kernel you built will be located
- in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
- in
- <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
- directory.
- As an example, suppose you performed the
- steps in the
- <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
- In this case, you specify your Build
- Directory path followed by the image (e.g.
- <filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
- </para>
- <para>If you selected the standalone
- pre-built toolchain, the pre-built image
- you downloaded is located in the directory
- you specified when you downloaded the
- image.</para>
- <para>Most custom options are for advanced
- QEMU users to further customize their QEMU
- instance.
- These options are specified between paired
- angled brackets.
- Some options must be specified outside the
- brackets.
- In particular, the options
- <filename>serial</filename>,
- <filename>nographic</filename>, and
- <filename>kvm</filename> must all be
- outside the brackets.
- Use the <filename>man qemu</filename>
- command to get help on all the options and
- their use.
- The following is an example:
- <literallayout class='monospaced'>
- serial ‘&lt;-m 256 -full-screen&gt;’
- </literallayout></para>
- <para>
- Regardless of the mode, Sysroot is already
- defined as part of the Cross-Compiler
- Options configuration in the
- <filename>Sysroot Location:</filename>
- field.
- </para></listitem>
- <listitem><para>
- <emphasis>External HW:</emphasis>
- Select this option if you will be using
- actual hardware.</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Click the "Apply" and "OK" to save your plug-in
- configurations.
- </para>
- </section>
- </section>
- </section>
-
- <section id='neon-creating-the-project'>
- <title>Creating the Project</title>
-
- <para>
- You can create two types of projects: Autotools-based, or
- Makefile-based.
- This section describes how to create Autotools-based
- projects from within the Eclipse IDE.
- For information on creating Makefile-based projects in a
- terminal window, see the
- "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
- section.
- <note>
- Do not use special characters in project names
- (e.g. spaces, underscores, etc.). Doing so can
- cause configuration to fail.
- </note>
- </para>
-
- <para>
- To create a project based on a Yocto template and then
- display the source code, follow these steps:
- <orderedlist>
- <listitem><para>
- Select "C Project" from the "File -> New" menu.
- </para></listitem>
- <listitem><para>
- Expand
- <filename>Yocto Project SDK Autotools Project</filename>.
- </para></listitem>
- <listitem><para>
- Select <filename>Hello World ANSI C Autotools Projects</filename>.
- This is an Autotools-based project based on a Yocto
- template.
- </para></listitem>
- <listitem><para>
- Put a name in the
- <filename>Project name:</filename> field.
- Do not use hyphens as part of the name
- (e.g. <filename>hello</filename>).
- </para></listitem>
- <listitem><para>
- Click "Next".
- </para></listitem>
- <listitem><para>
- Add appropriate information in the various fields.
- </para></listitem>
- <listitem><para>
- Click "Finish".
- </para></listitem>
- <listitem><para>
- If the "open perspective" prompt appears,
- click "Yes" so that you in the C/C++ perspective.
- </para></listitem>
- <listitem><para>The left-hand navigation pane shows
- your project.
- You can display your source by double clicking the
- project's source file.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-configuring-the-cross-toolchains'>
- <title>Configuring the Cross-Toolchains</title>
-
- <para>
- The earlier section,
- "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>",
- sets up the default project configurations.
- You can override these settings for a given project by
- following these steps:
- <orderedlist>
- <listitem><para>
- Select "Yocto Project Settings" from
- the "Project -> Properties" menu.
- This selection brings up the Yocto Project Settings
- Dialog and allows you to make changes specific to
- an individual project.</para>
- <para>By default, the Cross Compiler Options and
- Target Options for a project are inherited from
- settings you provided using the Preferences Dialog
- as described earlier in the
- "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
- section.
- The Yocto Project Settings Dialog allows you to
- override those default settings for a given
- project.
- </para></listitem>
- <listitem><para>
- Make or verify your configurations for the
- project and click "OK".
- </para></listitem>
- <listitem><para>
- Right-click in the navigation pane and
- select "Reconfigure Project" from the pop-up menu.
- This selection reconfigures the project by running
- <filename>autogen.sh</filename> in the workspace
- for your project.
- The script also runs
- <filename>libtoolize</filename>,
- <filename>aclocal</filename>,
- <filename>autoconf</filename>,
- <filename>autoheader</filename>,
- <filename>automake --a</filename>, and
- <filename>./configure</filename>.
- Click on the "Console" tab beneath your source code
- to see the results of reconfiguring your project.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-building-the-project'>
- <title>Building the Project</title>
-
- <para>
- To build the project select "Build All" from the
- "Project" menu.
- The console should update and you can note the
- cross-compiler you are using.
- <note>
- When building "Yocto Project SDK Autotools" projects,
- the Eclipse IDE might display error messages for
- Functions/Symbols/Types that cannot be "resolved",
- even when the related include file is listed at the
- project navigator and when the project is able to
- build.
- For these cases only, it is recommended to add a new
- linked folder to the appropriate sysroot.
- Use these steps to add the linked folder:
- <orderedlist>
- <listitem><para>
- Select the project.
- </para></listitem>
- <listitem><para>
- Select "Folder" from the
- <filename>File > New</filename> menu.
- </para></listitem>
- <listitem><para>
- In the "New Folder" Dialog, select "Link to
- alternate location (linked folder)".
- </para></listitem>
- <listitem><para>
- Click "Browse" to navigate to the include
- folder inside the same sysroot location
- selected in the Yocto Project
- configuration preferences.
- </para></listitem>
- <listitem><para>
- Click "OK".
- </para></listitem>
- <listitem><para>
- Click "Finish" to save the linked folder.
- </para></listitem>
- </orderedlist>
- </note>
- </para>
- </section>
-
- <section id='neon-starting-qemu-in-user-space-nfs-mode'>
- <title>Starting QEMU in User-Space NFS Mode</title>
-
- <para>
- To start the QEMU emulator from within Eclipse, follow
- these steps:
- <note>
- See the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
- chapter in the Yocto Project Development Manual
- for more information on using QEMU.
- </note>
- <orderedlist>
- <listitem><para>Expose and select "External Tools
- Configurations ..." from the "Run -> External
- Tools" menu.
- </para></listitem>
- <listitem><para>
- Locate and select your image in the navigation
- panel to the left
- (e.g. <filename>qemu_i586-poky-linux</filename>).
- </para></listitem>
- <listitem><para>
- Click "Run" to launch QEMU.
- <note>
- The host on which you are running QEMU must
- have the <filename>rpcbind</filename> utility
- running to be able to make RPC calls on a
- server on that machine.
- If QEMU does not invoke and you receive error
- messages involving
- <filename>rpcbind</filename>, follow the
- suggestions to get the service running.
- As an example, on a new Ubuntu 16.04 LTS
- installation, you must do the following in
- order to get QEMU to launch:
- <literallayout class='monospaced'>
- $ sudo apt-get install rpcbind
- </literallayout>
- After installing <filename>rpcbind</filename>,
- you need to edit the
- <filename>/etc/init.d/rpcbind</filename> file
- to include the following line:
- <literallayout class='monospaced'>
- OPTIONS="-i -w"
- </literallayout>
- After modifying the file, you need to start the
- service:
- <literallayout class='monospaced'>
- $ sudo service portmap restart
- </literallayout>
- </note>
- </para></listitem>
- <listitem><para>
- If needed, enter your host root password in
- the shell window at the prompt.
- This sets up a <filename>Tap 0</filename>
- connection needed for running in user-space NFS
- mode.
- </para></listitem>
- <listitem><para>
- Wait for QEMU to launch.
- </para></listitem>
- <listitem><para>
- Once QEMU launches, you can begin operating
- within that environment.
- One useful task at this point would be to determine
- the IP Address for the user-space NFS by using the
- <filename>ifconfig</filename> command.
- The IP address of the QEMU machine appears in the
- xterm window.
- You can use this address to help you see which
- particular
- IP address the instance of QEMU is using.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-deploying-and-debugging-the-application'>
- <title>Deploying and Debugging the Application</title>
-
- <para>
- Once the QEMU emulator is running the image, you can deploy
- your application using the Eclipse IDE and then use
- the emulator to perform debugging.
- Follow these steps to deploy the application.
- <note>
- Currently, Eclipse does not support SSH port
- forwarding.
- Consequently, if you need to run or debug a remote
- application using the host display, you must create a
- tunneling connection from outside Eclipse and keep
- that connection alive during your work.
- For example, in a new terminal, run the following:
- <literallayout class='monospaced'>
- $ ssh -XY <replaceable>user_name</replaceable>@<replaceable>remote_host_ip</replaceable>
- </literallayout>
- Using the above form, here is an example:
- <literallayout class='monospaced'>
- $ ssh -XY root@192.168.7.2
- </literallayout>
- After running the command, add the command to be
- executed in Eclipse's run configuration before the
- application as follows:
- <literallayout class='monospaced'>
- export DISPLAY=:10.0
- </literallayout>
- Be sure to not destroy the connection during your QEMU
- session (i.e. do not
- exit out of or close that shell).
- </note>
- <orderedlist>
- <listitem><para>
- Select "Debug Configurations..." from the
- "Run" menu.
- </para></listitem>
- <listitem><para>
- In the left area, expand
- <filename>C/C++Remote Application</filename>.
- </para></listitem>
- <listitem><para>
- Locate your project and select it to bring
- up a new tabbed view in the Debug Configurations
- Dialog.
- </para></listitem>
- <listitem><para>
- Click on the "Debugger" tab to see the
- cross-tool debugger you are using.
- Be sure to change to the debugger perspective in
- Eclipse.
- </para></listitem>
- <listitem><para>
- Click on the "Main" tab.
- </para></listitem>
- <listitem><para>
- Create a new connection to the QEMU instance
- by clicking on "new".</para></listitem>
- <listitem><para>Select <filename>SSH</filename>, which
- means Secure Socket Shell and then click "OK".
- Optionally, you can select an TCF connection
- instead.
- </para></listitem>
- <listitem><para>
- Clear out the "Connection name" field and
- enter any name you want for the connection.
- </para></listitem>
- <listitem><para>
- Put the IP address for the connection in
- the "Host" field.
- For QEMU, the default is
- <filename>192.168.7.2</filename>.
- However, if a previous QEMU session did not exit
- cleanly, the IP address increments (e.g.
- <filename>192.168.7.3</filename>).
- <note>
- You can find the IP address for the current
- QEMU session by looking in the xterm that
- opens when you launch QEMU.
- </note>
- </para></listitem>
- <listitem><para>
- Enter <filename>root</filename>, which
- is the default for QEMU, for the "User" field.
- Be sure to leave the password field empty.
- </para></listitem>
- <listitem><para>
- Click "Finish" to close the New Connections Dialog.
- </para></listitem>
- <listitem><para>
- If necessary, use the drop-down menu now in the
- "Connection" field and pick the IP Address you
- entered.
- </para></listitem>
- <listitem><para>
- Assuming you are connecting as the root
- user, which is the default for QEMU x86-64 SDK
- images provided by the Yocto Project, in the
- "Remote Absolute File Path for C/C++ Application"
- field, browse to
- <filename>/home/root/</filename><replaceable>ProjectName</replaceable>
- (e.g. <filename>/home/root/hello</filename>).
- You could also browse to any other path you have
- write access to on the target such as
- <filename>/usr/bin</filename>.
- This location is where your application will be
- located on the QEMU system.
- If you fail to browse to and specify an appropriate
- location, QEMU will not understand what to remotely
- launch.
- Eclipse is helpful in that it auto fills your
- application name for you assuming you browsed to a
- directory.
- <note>
- If you are prompted to provide a username and
- to optionally set a password, be sure you
- provide "root" as the username and you leave
- the password field blank.
- </note>
- </para></listitem>
- <listitem><para>
- Be sure you change to the "Debug" perspective in
- Eclipse.
- </para></listitem>
- <listitem><para>
- Click "Debug"
- </para></listitem>
- <listitem><para>
- Accept the debug perspective.
- </para></listitem>
- </orderedlist>
- </para>
- </section>
-
- <section id='neon-using-Linuxtools'>
- <title>Using Linuxtools</title>
-
- <para>
- As mentioned earlier in the manual, performance tools exist
- (Linuxtools) that enhance your development experience.
- These tools are aids in developing and debugging
- applications and images.
- You can run these tools from within the Eclipse IDE through
- the "Linuxtools" menu.
- </para>
-
- <para>
- For information on how to configure and use these tools,
- see
- <ulink url='http://www.eclipse.org/linuxtools/'>http://www.eclipse.org/linuxtools/</ulink>.
- </para>
- </section>
- </section>
- </section>
</chapter>
<!--
vim: expandtab tw=80 ts=4
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
index a408024d89..4e59e00780 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
@@ -7,7 +7,7 @@
<para>
Toaster is a web interface to the Yocto Project's
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-system-term'>OpenEmbedded build system</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
The interface enables you to configure and run your builds.
Information about builds is collected and stored in a database.
You can use Toaster to configure and start builds on multiple
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
index 3a46b61b73..e984391fdf 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
@@ -148,177 +148,46 @@
</para>
</section>
- <section id='select-the-toasterconf-json-file'>
- <title>Use the <filename>toasterconf.json</filename> File</title>
+ <section id='use-the-fixture-feature'>
+ <title>Use the Fixture Feature</title>
<para>
- If you do not want to use the Administration
- Interface, you can edit the
- <link linkend='toaster-json-files'><filename>toasterconf.json</filename></link>
- file and reload it to Toaster.
- </para>
-
- <para>
- The Toaster startup script in
- <filename>/bitbake/bin/toaster</filename> specifies
- the location of a Toaster configuration file
- <filename>toasterconf.json</filename> as the value of
- the <filename>TOASTER_CONF</filename> variable.
- This configuration file is used to set up the initial
- configuration values within the Toaster database
- including the layer sources.
- Two versions of the configuration file exist:
- <itemizedlist>
- <listitem><para>
- The first version of the file is found in the
- <filename>conf</filename> directory of the
- <filename>meta-poky</filename> layer
- (i.e.
- <filename>meta-poky/conf/toasterconf.json</filename>).
- This version contains the default Yocto Project
- configuration for Toaster.
- </para></listitem>
- <listitem><para>
- The second version of the file is in the
- <filename>conf</filename> directory of the
- <filename>openembedded-core</filename> layer
- (i.e. <filename>meta/conf/toasterconf.json</filename>).
- This version contains the default OpenEmbedded
- configuration for Toaster.
- </para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section id='edit-the-configuration-file'>
- <title>Edit the Configuration File</title>
-
- <para>
- Edit the version of the
- <filename>toasterconf.json</filename> file you
- used to set up your Toaster instance.
- In the file, you will find a section for layer sources
- such as the following:
+ The Django fixture feature overrides the default layer
+ server when you use it to specify a custom URL. To use
+ the fixture feature, create (or edit) the file
+ <filename>bitbake/lib/toaster.orm/fixtures/custom.xml</filename>,
+ and then set the following Toaster setting to your
+ custom URL:
<literallayout class='monospaced'>
- "layersources": [
- {
- "name": "Local Yocto Project",
- "sourcetype": "local",
- "apiurl": "../../",
- "branches": ["HEAD" ],
- "layers": [
- {
- "name": "openembedded-core",
- "local_path": "meta",
- "vcs_url": "remote:origin",
- "dirpath": "meta"
- },
- {
- "name": "meta-poky",
- "local_path": "meta-poky",
- "vcs_url": "remote:origin",
- "dirpath": "meta-poky"
- },
- {
- "name": "meta-yocto-bsp",
- "local_path": "meta-yocto-bsp",
- "vcs_url": "remote:origin",
- "dirpath": "meta-yocto-bsp"
- }
-
- ]
- },
- {
- "name": "OpenEmbedded",
- "sourcetype": "layerindex",
- "apiurl": "http://layers.openembedded.org/layerindex/api/",
- "branches": ["master", "jethro" ,"fido"]
- },
- {
- "name": "Imported layers",
- "sourcetype": "imported",
- "apiurl": "",
- "branches": ["master", "jethro","fido", "HEAD"]
-
- }
- ],
+ &lt;?xml version="1.0" ?&gt;
+ &lt;django-objects version="1.0"&gt;
+ &lt;object model="orm.toastersetting" pk="100"&gt;
+ &lt;field name="name" type="CharField"&gt;CUSTOM_LAYERINDEX_SERVER&lt;/field&gt;
+ &lt;field name="value" type="CharField"&gt;https://layers.my_organization.org/layerindex/branch/master/layers/&lt;/field&gt;
+ &lt;/object&gt;
+ &lt;django-objects&gt;
</literallayout>
- You should add your own layer source to this section by
- following the same format used for the "OpenEmbedded"
- layer source shown above.
+ When you start Toaster for the first time, or if you
+ delete the file <filename>toaster.sqlite</filename> and restart,
+ the database will populate cleanly from this layer index server.
</para>
<para>
- Give your layer source a name, provide the URL of your
- layer source API, use the source type "layerindex", and
- indicate which branches from your layer source you want
- to make available through Toaster.
- For example, the OpenEmbedded layer source makes
- available only its "master", "fido", and "jethro"
- branches.
- </para>
-
- <para>
- The branches must match the branch you
- set when configuring your releases.
- For example, if you configure one release in Toaster
- by setting its branch to "branch-one" and you configure
- another release in Toaster by setting its branch to
- "branch-two", the branches in your layer source should
- be "branch-one" and "branch-two" as well.
- Doing so creates a connection between the releases
- and the layer information from your layer source.
- Thus, when users create a project with a given
- release, they will see the appropriate layers from
- your layer source.
- This connection ensures that only layers that are
- compatible with the selected project release can be
- selected for building.
- </para>
-
- <para>
- Once you have added this information to the
- <filename>toasterconf.json</filename> file, save your
- changes.
+ Once the information has been updated, verify the new layer
+ information is available by using the Toaster web interface.
+ To do that, visit the "All compatible layers" page inside a
+ Toaster project. The layers from your layer source should be
+ listed there.
</para>
<para>
- In a terminal window, navigate to the directory that
- contains the Toaster database, which by default is the
- root of the Yocto Project
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
- Once you are located in that directory, run the
- "<filename>loadconf</filename>" command, which takes as
- an argument the full path to the
- <filename>toasterconf.json</filename> file you just edited.
- For example, if you cloned the
- <filename>poky</filename> repository and you edited the
- <filename>meta-poky/conf/toasterconf.json</filename> file,
- you would type something like the following:
- <literallayout class='monospaced'>
- $ bitbake/lib/toaster/manage.py loadconf /home/scottrif/poky/meta-poky/conf/toasterconf.json
- </literallayout>
- After entering this command, you need to update the
- Toaster database with the information coming from your
- new layer source.
- To do that, you should run the
- "<filename>lsupdates</filename>" command from the directory
- that contains the Toaster database.
- Here is an example:
+ If you change the information in your layer index server,
+ refresh the Toaster database by running the following command:
<literallayout class='monospaced'>
$ bitbake/lib/toaster/manage.py lsupdates
</literallayout>
If Toaster can reach the API URL, you should see a message
- telling you that Toaster is updating the layer source
- information.
- </para>
-
- <para>
- Once the information has been updated, verify the new layer
- information is available by using the Toaster web interface.
- To do that, visit the "All compatible layers" page inside a
- Toaster project.
- The layers from your layer source should be listed there.
+ telling you that Toaster is updating the layer source information.
</para>
</section>
</section>
@@ -359,19 +228,12 @@
As shipped, Toaster is configured to work with the following
releases:
<itemizedlist>
- <listitem><para><emphasis>Yocto Project 2.0 "Jethro" or OpenEmbedded "Jethro":</emphasis>
- This release causes your Toaster projects to
- build against the head of the jethro branch at
- <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/log/?h=jethro'></ulink>
- or
- <ulink url='http://git.openembedded.org/openembedded-core/commit/?h=jethro'></ulink>.
- </para></listitem>
- <listitem><para><emphasis>Yocto Project 1.8 "Fido" or OpenEmbedded "Fido":</emphasis>
- This release causes your Toaster projects to
- build against the head of the fido branch at
- <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/log/?h=fido'></ulink>
- or
- <ulink url='http://git.openembedded.org/openembedded-core/commit/?h=fido'></ulink>.
+ <listitem><para><emphasis>
+ Yocto Project &DISTRO; "&DISTRO_NAME;" or OpenEmbedded "&DISTRO_NAME;":</emphasis>
+ This release causes your Toaster projects to build
+ against the head of the &DISTRO_NAME_NO_CAP; branch at
+ <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/log/?h=rocko'></ulink>
+ or <ulink url='http://git.openembedded.org/openembedded-core/commit/?h=rocko'></ulink>.
</para></listitem>
<listitem><para><emphasis>Yocto Project "Master" or OpenEmbedded "Master":</emphasis>
This release causes your Toaster Projects to
@@ -390,471 +252,416 @@
</itemizedlist>
</para>
</section>
+ </section>
+
+ <section id='configuring-toaster'>
+ <title>Configuring Toaster</title>
+
+ <para>
+ In order to use Toaster, you must configure the database with the
+ default content. The following subsections describe various aspects
+ of Toaster configuration.
+ </para>
- <section id='toaster-releases-comprised-of'>
- <title>What Makes Up a Release?</title>
+ <section id='configuring-the-workflow'>
+ <title>Configuring the Workflow</title>
<para>
- A release consists of the following:
- <itemizedlist>
- <listitem><para><emphasis>Name:</emphasis>
- The name of the release (<filename>name</filename>).
- This release name never appears in the the Toaster
- web interface.
- Consequently, a user never sees the release name.
- </para></listitem>
- <listitem><para><emphasis>Description:</emphasis>
- The textual description of the release
- (<filename>description</filename>).
- This description is what users encounter when creating
- projects with the Toaster web interface.
- When you configure your release, be sure to use
- a description that sufficiently describes and is
- understandable.
- If Toaster has more than one release configured, the
- release descriptions appear listed in a drop down menu
- when a user creates a new project.
- If Toaster has only one release configured, all
- projects created using the web interface take that
- release and the drop down menu does not display in the
- Toaster web interface.
- </para></listitem>
- <listitem><para><emphasis>BitBake:</emphasis>
- The Bitbake version (<filename>bitbake</filename>)
- used to build layers set in the current release.
- This version is described by a name, a Git URL, a
- branch in the Git URL, and a directory path in the
- Git repository.
- As an example, consider the following snippet from
- a Toaster JSON configuration file.
- This BitBake version uses the master branch from the
- OpenEmbedded repository:
- <literallayout class='monospaced'>
- "bitbake" : [
- {
- "name": "master",
- "giturl": "git://git.openembedded.org/bitbake",
- "branch": "master",
- "dirpath": ""
- }
- ]
- </literallayout>
- Here is more detail on each of the items that comprise
- the BitBake version:
- <itemizedlist>
- <listitem><para><emphasis>Name:</emphasis>
- A string
- (<filename>name</filename>) used to refer to
- the version of BitBake you are using with
- Toaster.
- This name is never exposed through Toaster.
- </para></listitem>
- <listitem><para><emphasis>Git URL:</emphasis>
- The URL (<filename>giturl</filename>)
- for the BitBake Git repository cloned
- for Toaster projects.
- </para></listitem>
- <listitem><para><emphasis>Branch:</emphasis>
- The Git branch, or revision,
- (<filename>branch</filename>) of the BitBake
- repository used with Toaster.
- </para></listitem>
- <listitem><para><emphasis>Directory Path:</emphasis>
- The sub-directory of the BitBake repository
- (<filename>dirpath</filename>).
- If the Git URL includes more than one
- repository, you need to set this directory.
- If the URL does not include more than a single
- repository, you can set
- <filename>dirpath</filename> to a null string
- (i.e. "").
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- <listitem><para><emphasis>Branch:</emphasis>
- The branch for the layer source
- (<filename>branch</filename>) used with the release.
- For example, for the OpenEmbedded layer source, the
- "master", "fido", and "jethro" branches are available.
+ The
+ <filename>bldcontrol/management/commands/checksettings.py</filename>
+ file controls workflow configuration.
+ The following steps outline the process to initially populate
+ this database.
+ <orderedlist>
+ <listitem><para>
+ The default project settings are set from
+ <filename>orm/fixtures/settings.xml</filename>.
</para></listitem>
- <listitem><para><emphasis>Default Layers:</emphasis>
- The set of default layers
- (<filename>defaultlayers</filename>) automatically
- added to the project configuration when a project is
- created.
+ <listitem><para>
+ The default project distro and layers are added
+ from <filename>orm/fixtures/poky.xml</filename> if poky
+ is installed.
+ If poky is not installed, they are added
+ from <filename>orm/fixtures/oe-core.xml</filename>.
</para></listitem>
- <listitem><para><emphasis>Layer Source Priorities</emphasis>
- A specification of
- <link linkend='layer-source'>layer source</link>
- priorities (<filename>layersourcepriority</filename>).
- In order for Toaster to work as intended, the
- "Imported layers" layer source should have the highest
- priority, which means that layers manually imported by
- users with the "Import layer" functionality will
- always be visible and available for selection.
+ <listitem><para>
+ If the <filename>orm/fixtures/custom.xml</filename> file
+ exists, then its values are added.
</para></listitem>
- <listitem><para><emphasis>Help Text:</emphasis>
- Help text (<filename>helptext</filename>) that explains
- what the release does when selected.
- This help text appears below the release drop-down
- menu when you create a Toaster project.
- The help text should assist users in making the correct
- decision regarding the release to use for a given
- project.
+ <listitem><para>
+ The layer index is then scanned and added to the database.
</para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- To summarize what comprises a release, consider the following
- example from a Toaster JSON file.
- The configuration names the release "master" and uses the
- "master" branch provided by the layer source of type
- "layerindex", which is called "OpenEmbedded", and sets
- the <filename>openembedded-core</filename> layer as the one
- to be added by default to any projects created in Toaster.
- The BitBake version used would be defined as shown earlier
- in the previous list:
- <literallayout class='monospaced'>
- "releases": [
- {
- "name": "master",
- "description": "OpenEmbedded master",
- "bitbake": "master",
- "branch": "master",
- "defaultlayers": [ "openembedded-core" ],
- "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds using the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/\"&gt;Yocto Project master branch&lt;/a&gt;, where active development takes place. This is not a stable branch, so your builds might not work as expected."
- }
- ]
- </literallayout>
+ </orderedlist>
+ Once these steps complete, Toaster is set up and ready to use.
</para>
</section>
- </section>
-
- <section id='toaster-json-files'>
- <title>JSON Files</title>
- <para>
- You must configure Toaster before using it.
- Configuration customizes layer source settings and Toaster defaults
- for all users and is performed by the person responsible for
- Toaster Configuration (i.e the Toaster Administrator).
- The Toaster Administrator performs this configuration through the
- Django administration interface.
- </para>
+ <section id='customizing-pre-set-data'>
+ <title>Customizing Pre-Set Data</title>
- <para>
- To make it easier to initially start Toaster, you can import a
- pre-defined configuration file using the
- <link linkend='toaster-command-loadconf'><filename>loadconf</filename></link>
- command.
- <note>
- The configuration file is a JSON-formatted text file with
- specific fields that Toaster recognizes.
- It is not a data dump from the database, so it cannot be
- loaded directly in the database.
- </note>
- </para>
+ <para>
+ The pre-set data for Toaster is easily customizable. You can
+ create the <filename>orm/fixtures/custom.xml</filename> file
+ to customize the values that go into to the database.
+ Customization is additive,
+ and can either extend or completely replace the existing values.
+ </para>
- <para>
- By convention, the supplied configuration files are named
- <filename>toasterconf.json</filename>.
- The Toaster Administrator can customize the file prior to loading
- it into Toaster.
- The <filename>TOASTER_CONF</filename> variable in the
- Toaster startup script at <filename>bitbake/bin/toaster</filename>
- specifies the location of the <filename>toasterconf.json</filename> file.
- </para>
+ <para>
+ You use the <filename>orm/fixtures/custom.xml</filename> file
+ to change the default project settings for the machine, distro,
+ file images, and layers.
+ When creating a new project, you can use the file to define
+ the offered alternate project release selections.
+ For example, you can add one or more additional selections that
+ present custom layer sets or distros, and any other local or proprietary
+ content.
+ </para>
- <section id='json-file-choices'>
- <title>Configuration File Choices</title>
+ <para>
+ Additionally, you can completely disable the content from the
+ <filename>oe-core.xml</filename> and <filename>poky.xml</filename>
+ files by defining the section shown below in the
+ <filename>settings.xml</filename> file.
+ For example, this option is particularly useful if your custom
+ configuration defines fewer releases or layers than the default
+ fixture files.
+ </para>
<para>
- Two versions of the configuration file exist:
- <itemizedlist>
- <listitem><para>
- The
- <filename>meta-poky/conf/toasterconf.json</filename>
- in the <filename>conf</filename> directory of the
- Yocto Project's <filename>meta-poky</filename> layer.
- This version contains the default Yocto Project
- configuration for Toaster.
- You are prompted to select this file during the Toaster
- set up process if you cloned the
- <filename>poky</filename> repository (i.e.
- <filename>&YOCTO_GIT_URL;/poky</filename>).
- </para></listitem>
- <listitem><para>
- The <filename>meta/conf/toasterconf.json</filename>
- in the <filename>conf</filename> directory of the
- OpenEmbedded's <filename>openembedded-core</filename>
- layer.
- This version contains the default OpenEmbedded
- configuration for Toaster.
- You are prompted to select this file during the Toaster
- set up process if you had cloned the
- <filename>openembedded-core</filename> repository (i.e.
- <filename>git://git.openembedded.org/openembedded-core</filename>).
- </para></listitem>
- </itemizedlist>
+ The following example sets "name" to "CUSTOM_XML_ONLY" and its value
+ to "True".
+ <literallayout class='monospaced'>
+ &lt;object model="orm.toastersetting" pk="99"&gt;
+ &lt;field type="CharField" name="name"&gt;CUSTOM_XML_ONLY&lt;/field&gt;
+ &lt;field type="CharField" name="value"&gt;True&lt;/field&gt;
+ &lt;/object&gt;
+ </literallayout>
</para>
</section>
- <section id='json-structure'>
- <title>File Structure</title>
+ <section id='understanding-fixture-file-format'>
+ <title>Understanding Fixture File Format</title>
<para>
- The <filename>toasterconf.json</filename> file consists of
- easily readable areas: configuration, layer sources, BitBake,
- default release, and releases.
+ The following is an overview of the file format used by the
+ <filename>oe-core.xml</filename>, <filename>poky.xml</filename>,
+ and <filename>custom.xml</filename> files.
</para>
- <section id='json-config-area'>
- <title>Configuration Area</title>
+ <para>
+ The following subsections describe each of the sections in the
+ fixture files, and outline an example section of the XML code.
+ you can use to help understand this information and create a local
+ <filename>custom.xml</filename> file.
+ </para>
- <para>
- This area of the JSON file sets which variables are exposed
- to users through the Toaster web interface.
- Users can easily edit these variables.
- </para>
+ <section id='defining-the-default-distro-and-other-values'>
+ <title>Defining the Default Distro and Other Values</title>
<para>
- The variables you set here are displayed in the
- "Configuration variables" page in Toaster.
- Minimally, you should set the
- <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
- variable, which appears to users as part of the project
- page in Toaster.
- </para>
-
- <para>
- Here is the default <filename>config</filename> area:
+ This section defines the default distro value for new projects.
+ By default, it reserves the first Toaster Setting record "1".
+ The following demonstrates how to set the project default value
+ for
+ <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>:
<literallayout class='monospaced'>
- "config": {
- "MACHINE" : "qemux86",
- "DISTRO" : "poky",
- "IMAGE_FSTYPES": "ext3 jffs2 tar.bz2",
- "IMAGE_INSTALL_append": "",
- "PACKAGE_CLASSES": "package_rpm",
- },
+ &lt;!-- Set the project default value for DISTRO --&gt;
+ &lt;object model="orm.toastersetting" pk="1"&gt;
+ &lt;field type="CharField" name="name"&gt;DEFCONF_DISTRO&lt;/field&gt;
+ &lt;field type="CharField" name="value"&gt;poky&lt;/field&gt;
+ &lt;/object&gt;
</literallayout>
+ You can override other default project values by adding
+ additional Toaster Setting sections such as any of the
+ settings coming from the <filename>settings.xml</filename>
+ file.
+ Also, you can add custom values that are included in the
+ BitBake environment.
+ The "pk" values must be unique.
+ By convention, values that set default project values have a
+ "DEFCONF" prefix.
</para>
</section>
- <section id='json-layersources-area'>
- <title>Layer Sources Area</title>
-
- <para>
- This area of the JSON file defines the
- <link linkend='layer-source'>layer sources</link>
- Toaster uses.
- Toaster reads layer information from layer sources.
- Three types of layer sources exist that Toaster
- recognizes: Local, LayerIndex, and Imported.
- </para>
-
- <para>
- The Local layer source reads layers from Git clones
- available on your local drive.
- Using a local layer source enables you to easily test
- Toaster.
- <note>
- If you are setting up a hosted version of Toaster,
- it does not make sense to have a local layer source.
- </note>
- </para>
-
- <para>
- The LayerIndex layer source uses a REST API exposed by
- instances of the Layer Index application (e.g the public
- <ulink url='http://layers.openembedded.org/'></ulink>)
- to read layer data.
- </para>
-
- <para>
- The Imported layer source is reserved for layer data
- manually introduced by the user or Toaster Administrator
- through the GUI.
- This layer source lets users import their own layers
- and build them with Toaster.
- You should not remove the imported layer source.
- </para>
+ <section id='defining-bitbake-version'>
+ <title>Defining BitBake Version</title>
<para>
- Here is the default <filename>layersources</filename> area:
+ The following defines which version of BitBake is used
+ for the following release selection:
<literallayout class='monospaced'>
- "layersources": [
- {
- "name": "Local Yocto Project",
- "sourcetype": "local",
- "apiurl": "../../",
- "branches": ["HEAD" ],
- "layers": [
- {
- "name": "openembedded-core",
- "local_path": "meta",
- "vcs_url": "remote:origin",
- "dirpath": "meta"
- },
- {
- "name": "meta-poky",
- "local_path": "meta-poky",
- "vcs_url": "remote:origin",
- "dirpath": "meta-poky"
- },
- {
- "name": "meta-yocto-bsp",
- "local_path": "meta-yocto-bsp",
- "vcs_url": "remote:origin",
- "dirpath": "meta-yocto-bsp"
- }
-
- ]
- },
- {
- "name": "OpenEmbedded",
- "sourcetype": "layerindex",
- "apiurl": "http://layers.openembedded.org/layerindex/api/",
- "branches": ["master", "jethro" ,"fido"]
- },
- {
- "name": "Imported layers",
- "sourcetype": "imported",
- "apiurl": "",
- "branches": ["master", "jethro","fido", "HEAD"]
-
- }
- ],
+ &lt;!-- Bitbake versions which correspond to the metadata release --&gt;
+ &lt;object model="orm.bitbakeversion" pk="1"&gt;
+ &lt;field type="CharField" name="name"&gt;rocko&lt;/field&gt;
+ &lt;field type="CharField" name="giturl"&gt;git://git.yoctoproject.org/poky&lt;/field&gt;
+ &lt;field type="CharField" name="branch"&gt;rocko&lt;/field&gt;
+ &lt;field type="CharField" name="dirpath"&gt;bitbake&lt;/field&gt;
+ &lt;/object&gt;
</literallayout>
</para>
</section>
- <section id='json-bitbake-area'>
- <title>BitBake Area</title>
+ <section id='defining-releases'>
+ <title>Defining Release</title>
<para>
- This area of the JSON file defines the version of
- BitBake Toaster uses.
- As shipped, Toaster is configured to recognize four
- versions of BitBake: master, fido, jethro, and HEAD.
- <note>
- HEAD is a special option that builds whatever is
- available on disk, without checking out any remote
- Git repositories.
- </note>
- </para>
-
- <para>
- Here is the default <filename>bitbake</filename> area:
+ The following defines the releases when you create a new
+ project.
<literallayout class='monospaced'>
- "bitbake" : [
- {
- "name": "master",
- "giturl": "remote:origin",
- "branch": "master",
- "dirpath": "bitbake"
- },
- {
- "name": "jethro",
- "giturl": "remote:origin",
- "branch": "jethro",
- "dirpath": "bitbake"
- },
- {
- "name": "fido",
- "giturl": "remote:origin",
- "branch": "fido",
- "dirpath": "bitbake"
- },
- {
- "name": "HEAD",
- "giturl": "remote:origin",
- "branch": "HEAD",
- "dirpath": "bitbake"
- }
- ],
+ &lt;!-- Releases available --&gt;
+ &lt;object model="orm.release" pk="1"&gt;
+ &lt;field type="CharField" name="name"&gt;rocko&lt;/field&gt;
+ &lt;field type="CharField" name="description"&gt;Yocto Project 2.4 "Rocko"&lt;/field&gt;
+ &lt;field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version"&gt;1&lt;/field&gt;
+ &lt;field type="CharField" name="branch_name"&gt;rocko&lt;/field&gt;
+ &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;
+ &lt;/object&gt;
</literallayout>
+ The "pk" value must match the above respective BitBake
+ version record.
</para>
</section>
- <section id='json-default-area'>
- <title>Default Area</title>
-
- <para>
- This area of the JSON file establishes a default
- release used by Toaster.
- As shipped, Toaster uses the "master" release.
- </para>
+ <section id='defining-the-release-default-layer-names'>
+ <title>Defining the Release Default Layer Names</title>
<para>
- Here is the statement in the JSON file that establishes
- the default release:
+ The following defines the default layers for each release:
<literallayout class='monospaced'>
- "defaultrelease": "master",
+ &lt;!-- Default project layers for each release --&gt;
+ &lt;object model="orm.releasedefaultlayer" pk="1"&gt;
+ &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;1&lt;/field&gt;
+ &lt;field type="CharField" name="layer_name"&gt;openembedded-core&lt;/field&gt;
+ &lt;/object&gt;
</literallayout>
+ The 'pk' values in the example above should start at "1" and increment
+ uniquely.
+ You can use the same layer name in multiple releases.
</para>
</section>
- <section id='json-releases-area'>
- <title>Releases Area</title>
-
- <para>
- This area of the JSON file defines the versions of the
- OpenEmbedded build system Toaster recognizes.
- As shipped, Toaster is configured to work with the four
- releases described in the
- "<link linkend='toaster-releases-supported'>Pre-Configured Releases</link>"
- section.
- </para>
+ <section id='defining-layer-definitions'>
+ <title>Defining Layer Definitions</title>
<para>
- Here is the default <filename>releases</filename> area:
+ Layer definitions are the most complex.
+ The following defines each of the layers, and then defines the exact layer
+ version of the layer used for each respective release.
+ You must have one <filename>orm.layer</filename>
+ entry for each layer.
+ Then, with each entry you need a set of
+ <filename>orm.layer_version</filename> entries that connects
+ the layer with each release that includes the layer.
+ In general all releases include the layer.
<literallayout class='monospaced'>
- "releases": [
- {
- "name": "master",
- "description": "Yocto Project master",
- "bitbake": "master",
- "branch": "master",
- "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
- "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds using the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/\"&gt;Yocto Project master branch&lt;/a&gt;, where active development takes place. This is not a stable branch, so your builds might not work as expected."
- },
- {
- "name": "jethro",
- "description": "Yocto Project 2.0 Jethro",
- "bitbake": "jethro",
- "branch": "jethro",
- "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
- "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds with the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=jethro\"&gt;Yocto Project 2.0 \"Jethro\"&lt;/a&gt; branch."
- },
- {
- "name": "fido",
- "description": "Yocto Project 1.8 Fido",
- "bitbake": "fido",
- "branch": "fido",
- "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
- "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds with the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=fido\"&gt;Yocto Project 1.8 \"Fido\"&lt;/a&gt; branch."
- },
- {
- "name": "local",
- "description": "Local Yocto Project",
- "bitbake": "HEAD",
- "branch": "HEAD",
- "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
- "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds with the version of the Yocto Project you have cloned or downloaded to your computer."
- }
- ]
+ &lt;object model="orm.layer" pk="1"&gt;
+ &lt;field type="CharField" name="name"&gt;openembedded-core&lt;/field&gt;
+ &lt;field type="CharField" name="layer_index_url"&gt;&lt;/field&gt;
+ &lt;field type="CharField" name="vcs_url"&gt;git://git.yoctoproject.org/poky&lt;/field&gt;
+ &lt;field type="CharField" name="vcs_web_url"&gt;http://git.yoctoproject.org/cgit/cgit.cgi/poky&lt;/field&gt;
+ &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;
+ &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;
+ &lt;/object&gt;
+ &lt;object model="orm.layer_version" pk="1"&gt;
+ &lt;field rel="ManyToOneRel" to="orm.layer" name="layer"&gt;1&lt;/field&gt;
+ &lt;field type="IntegerField" name="layer_source"&gt;0&lt;/field&gt;
+ &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;1&lt;/field&gt;
+ &lt;field type="CharField" name="branch"&gt;rocko&lt;/field&gt;
+ &lt;field type="CharField" name="dirpath"&gt;meta&lt;/field&gt;
+ &lt;/object&gt;
+ &lt;object model="orm.layer_version" pk="2"&gt;
+ &lt;field rel="ManyToOneRel" to="orm.layer" name="layer"&gt;1&lt;/field&gt;
+ &lt;field type="IntegerField" name="layer_source"&gt;0&lt;/field&gt;
+ &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;2&lt;/field&gt;
+ &lt;field type="CharField" name="branch"&gt;HEAD&lt;/field&gt;
+ &lt;field type="CharField" name="commit"&gt;HEAD&lt;/field&gt;
+ &lt;field type="CharField" name="dirpath"&gt;meta&lt;/field&gt;
+ &lt;/object&gt;
+ &lt;object model="orm.layer_version" pk="3"&gt;
+ &lt;field rel="ManyToOneRel" to="orm.layer" name="layer"&gt;1&lt;/field&gt;
+ &lt;field type="IntegerField" name="layer_source"&gt;0&lt;/field&gt;
+ &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;3&lt;/field&gt;
+
+ &lt;field type="CharField" name="branch"&gt;master&lt;/field&gt;
+ &lt;field type="CharField" name="dirpath"&gt;meta&lt;/field&gt;
+ &lt;/object&gt;
</literallayout>
+ The layer "pk" values above must be unique, and typically start at "1".
+ The layer version "pk" values must also be unique across all layers,
+ and typically start at "1".
</para>
</section>
</section>
</section>
+ <section id='remote-toaster-monitoring'>
+ <title>Remote Toaster Monitoring</title>
+
+ <para>
+ Toaster has an API that allows remote management applications to
+ directly query the state of the Toaster server and its builds
+ in a machine-to-machine manner.
+ This API uses the
+ <ulink url='http://en.wikipedia.org/wiki/Representational_state_transfer'>REST</ulink>
+ interface and the transfer of JSON files.
+ For example, you might
+ monitor a build inside a container through well supported
+ known HTTP ports in order to easily access a Toaster server
+ inside the container.
+ In this example, when you use this direct JSON API, you avoid
+ having web page parsing against the display the user sees.
+ </para>
+
+ <section id='checking-health'>
+ <title>Checking Health</title>
+
+ <para>
+ Before you use remote Toaster monitoring, you should do
+ a health check.
+ To do this, ping the Toaster server using the following call
+ to see if it is still alive:
+ <literallayout class='monospaced'>
+ http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/health
+ </literallayout>
+ Be sure to provide values for <replaceable>host</replaceable>
+ and <replaceable>port</replaceable>.
+ If the server is alive, you will get the response HTML:
+ <literallayout class='monospaced'>
+ &lt;!DOCTYPE html&gt;
+ &lt;html lang="en"&gt;
+ &lt;head&gt;&lt;title&gt;Toaster Health&lt;/title&gt;&lt;/head&gt;
+ &lt;body&gt;Ok&lt;/body&gt;
+ &lt;/html&gt;
+ </literallayout>
+ </para>
+ </section>
+
+ <section id='determining-status-of-builds-in-progress'>
+ <title>Determining Status of Builds in Progress</title>
+
+ <para>
+ Sometimes it is useful to determine the status of a build
+ in progress.
+ To get the status of pending builds, use the following call:
+ <literallayout class='monospaced'>
+ http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/toastergui/api/building
+ </literallayout>
+ Be sure to provide values for <replaceable>host</replaceable>
+ and <replaceable>port</replaceable>.
+ The output is a JSON file that itemizes all builds in
+ progress.
+ This file includes the time in seconds since each
+ respective build started as well as the progress of the
+ cloning, parsing, and task execution.
+ The following is sample output for a build in progress:
+ <literallayout class='monospaced'>
+ {"count": 1,
+ "building": [
+ {"machine": "beaglebone",
+ "seconds": "463.869",
+ "task": "927:2384",
+ "distro": "poky",
+ "clone": "1:1",
+ "id": 2,
+ "start": "2017-09-22T09:31:44.887Z",
+ "name": "20170922093200",
+ "parse": "818:818",
+ "project": "my_rocko",
+ "target": "core-image-minimal"
+ }]
+ }
+ </literallayout>
+ The JSON data for this query is returned in a single line.
+ In the previous example the line has been artificially split for readability.
+ </para>
+ </section>
+
+ <section id='checking-status-of-builds-completed'>
+ <title>Checking Status of Builds Completed</title>
+
+ <para>
+ Once a build is completed, you get the status when you use
+ the following call:
+ <literallayout class='monospaced'>
+ http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/toastergui/api/builds
+ </literallayout>
+ Be sure to provide values for <replaceable>host</replaceable>
+ and <replaceable>port</replaceable>.
+ The output is a JSON file that itemizes all complete builds,
+ and includes build summary information.
+ The following is sample output for a completed build:
+ <literallayout class='monospaced'>
+ {"count": 1,
+ "builds": [
+ {"distro": "poky",
+ "errors": 0,
+ "machine":
+ "beaglebone",
+ "project": "my_rocko",
+ "stop": "2017-09-22T09:26:36.017Z",
+ "target": "quilt-native",
+ "seconds": "78.193",
+ "outcome": "Succeeded",
+ "id": 1,
+ "start": "2017-09-22T09:25:17.824Z",
+ "warnings": 1,
+ "name": "20170922092618"
+ }]
+ }
+ </literallayout>
+ The JSON data for this query is returned in a single line.
+ In the previous example the line has been artificially split for readability.
+ </para>
+ </section>
+
+ <section id='determining-status-of-a-specific-build'>
+ <title>Determining Status of a Specific Build</title>
+
+ <para>
+ Sometimes it is useful to determine the status of a specific
+ build.
+ To get the status of a specific build, use the following
+ call:
+ <literallayout class='monospaced'>
+ http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/toastergui/api/build/<replaceable>ID</replaceable>
+ </literallayout>
+ Be sure to provide values for <replaceable>host</replaceable>,
+ <replaceable>port</replaceable>, and <replaceable>ID</replaceable>.
+ You can find the value for <replaceable>ID</replaceable> from the
+ Builds Completed query. See the
+ "<link linkend='checking-status-of-builds-completed'>Checking Status of Builds Completed</link>"
+ section for more information.
+ </para>
+
+ <para>
+ The output is a JSON file that itemizes the specific build
+ and includes build summary information.
+ The following is sample output for a specific build:
+ <literallayout class='monospaced'>
+ {"build":
+ {"distro": "poky",
+ "errors": 0,
+ "machine": "beaglebone",
+ "project": "my_rocko",
+ "stop": "2017-09-22T09:26:36.017Z",
+ "target": "quilt-native",
+ "seconds": "78.193",
+ "outcome": "Succeeded",
+ "id": 1,
+ "start": "2017-09-22T09:25:17.824Z",
+ "warnings": 1,
+ "name": "20170922092618",
+ "cooker_log": "/opt/user/poky/build-toaster-2/tmp/log/cooker/beaglebone/build_20170922_022607.991.log"
+ }
+ }
+ </literallayout>
+ The JSON data for this query is returned in a single line.
+ In the previous example the line has been artificially split for readability.
+ </para>
+ </section>
+ </section>
+
<section id='toaster-useful-commands'>
<title>Useful Commands</title>
@@ -870,7 +677,7 @@
created that are specific to Toaster and are used to control
configuration and back-end tasks.
You can locate these commands in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky</filename>) at
<filename>bitbake/lib/manage.py</filename>.
This section documents those commands.
@@ -879,7 +686,7 @@
When using <filename>manage.py</filename> commands given
a default configuration, you must be sure that your
working directory is set to the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
Using <filename>manage.py</filename> commands from the
Build Directory allows Toaster to find the
<filename>toaster.sqlite</filename> file, which is located
@@ -1005,30 +812,6 @@
</para>
</section>
- <section id='toaster-command-loadconf'>
- <title><filename>loadconf</filename></title>
-
- <para>
- The <filename>loadconf</filename> command loads an
- existing Toaster configuration file (JSON file).
- You must run this on a new database that does not have any
- data.
- Running this command on an existing database that has data
- results in errors.
- Access the command as follows:
- <literallayout class='monospaced'>
- $ bitbake/lib/toaster/manage.py loadconf <replaceable>filepath</replaceable>
- </literallayout>
- The <filename>loadconf</filename> command configures a database
- based on the supplied existing
- <filename>toasterconf.json</filename> file.
- For information on the <filename>toasterconf.json</filename>,
- see the
- "<link linkend='toaster-json-files'>JSON Files</link>"
- section.
- </para>
- </section>
-
<section id='toaster-command-runbuilds'>
<title><filename>runbuilds</filename></title>
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
index 966c35d4d3..c26a32a3d5 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
@@ -18,7 +18,7 @@
<para>
Navigate to the root of your
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky</filename>):
<literallayout class='monospaced'>
$ cd poky
@@ -61,19 +61,32 @@
</para>
</section>
- <section id='setting-a-different-address'>
- <title>Setting a Different Address</title>
+ <section id='setting-up-external-access'>
+ <title>Setting up External Access</title>
<para>
By default, Toaster binds to the loop back address
- (i.e. localhost).
- You can use the <filename>WEBPORT</filename> parameter to
- set a different host.
- For example, the following command sets the host and port
- to "0.0.0.0:8400":
+ (i.e. localhost), which does not allow access from
+ external hosts. To allow external access, use the
+ <filename>WEBPORT</filename> parameter to open an
+ address that connects to the network, specifically the
+ IP address that your NIC uses to connect to the network.
+ You can also bind to all IP addresses the computer
+ supports by using the shortcut
+ "0.0.0.0:<replaceable>port</replaceable>".
+ </para>
+
+ <para>
+ The following example binds to all IP addresses on the
+ host:
<literallayout class='monospaced'>
$ source toaster start webport=0.0.0.0:8400
</literallayout>
+ This example binds to a specific IP address on the host's
+ NIC:
+ <literallayout class='monospaced'>
+ $ source toaster start webport=192.168.1.1:8400
+ </literallayout>
</para>
</section>
@@ -145,7 +158,7 @@
<listitem><para>
From the directory containing the Toaster database,
which by default is the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
invoke the <filename>createsuperuser</filename> command
from <filename>manage.py</filename>:
<literallayout class='monospaced'>
@@ -369,16 +382,16 @@
<filename>TOASTER_CONF</filename>, which is
relative to the Toaster root directory
<filename>TOASTER_DIR</filename>.
- For more information on the Toaster configuration file
- <filename>TOASTER_CONF</filename>, see the
- <link linkend='toaster-json-files'>JSON Files</link>
- section of this manual.
+ For more information on the Toaster configuration file,
+ see the
+ <link linkend='configuring-toaster'>Configuring Toaster</link>
+ chapter.
</para>
<para>
This line also runs the <filename>checksettings</filename>
command, which configures the location of the Toaster
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build directory</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build directory</ulink>.
The Toaster root directory <filename>TOASTER_DIR</filename>
determines where the Toaster build directory
is created on the file system.
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml
index c5c6795f65..65e057a83e 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual-start.xml
@@ -41,7 +41,7 @@
The requirements file is located in the
<filename>bitbake</filename> directory, which is located in the
root directory of the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky/bitbake/toaster-requirements.txt</filename>).
The dependencies appear in a <filename>pip</filename>,
install-compatible format.
@@ -54,7 +54,7 @@
You need to install the packages that Toaster requires.
Use this command:
<literallayout class='monospaced'>
- $ $ pip3 install --user -r bitbake/toaster-requirements.txt
+ $ pip3 install --user -r bitbake/toaster-requirements.txt
</literallayout>
The previous command installs the necessary Toaster modules
into a local python 3 cache in your
diff --git a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml
index c7a7fcd787..5a1b60e58c 100644
--- a/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml
+++ b/import-layers/yocto-poky/documentation/toaster-manual/toaster-manual.xml
@@ -22,11 +22,11 @@
<authorgroup>
<author>
- <firstname>Scott</firstname> <surname>Rifenbark</surname>
+ <firstname>Kristi</firstname> <surname>Rifenbark</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Scotty's Documentation Services, INC</orgname>
</affiliation>
- <email>srifenbark@gmail.com</email>
+ <email>kristi@buzzcollectivemarketing.com</email>
</author>
</authorgroup>
@@ -57,24 +57,19 @@
<revremark>Released with the Yocto Project 2.3 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.1</revnumber>
- <date>June 2017</date>
- <revremark>Released with the Yocto Project 2.3.1 Release.</revremark>
+ <revnumber>2.4</revnumber>
+ <date>October 2017</date>
+ <revremark>Released with the Yocto Project 2.4 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.2</revnumber>
- <date>September 2017</date>
- <revremark>Released with the Yocto Project 2.3.2 Release.</revremark>
- </revision>
- <revision>
- <revnumber>2.3.3</revnumber>
+ <revnumber>2.4.1</revnumber>
<date>January 2018</date>
- <revremark>Released with the Yocto Project 2.3.3 Release.</revremark>
+ <revremark>Released with the Yocto Project 2.4.1 Release.</revremark>
</revision>
<revision>
- <revnumber>2.3.4</revnumber>
- <date>April 2018</date>
- <revremark>Released with the Yocto Project 2.3.4 Release.</revremark>
+ <revnumber>2.4.2</revnumber>
+ <date>March 2018</date>
+ <revremark>Released with the Yocto Project 2.4.2 Release.</revremark>
</revision>
</revhistory>
@@ -91,27 +86,29 @@
<note><title>Manual Notes</title>
<itemizedlist>
<listitem><para>
- For the latest version of the Yocto Project Toaster
- User Manual associated with this Yocto Project release
- (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Toaster User Manual from the
+ This version of the
+ <emphasis>Toaster User Manual</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
</para></listitem>
<listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
+ For manuals associated with other releases of the Yocto
+ Project, go to the
<ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
+ and choose the manual associated with the desired
+ Yocto Project.
</para></listitem>
<listitem><para>
- For an in-development version of the Yocto Project
- Toaster User Manual, see
- <ulink url='&YOCTO_DOCS_URL;/latest/toaster-manual/toaster-manual.html'></ulink>.
- </para></listitem>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
+ </para></listitem>
</itemizedlist>
</note>
diff --git a/import-layers/yocto-poky/documentation/tools/mega-manual.sed b/import-layers/yocto-poky/documentation/tools/mega-manual.sed
index 936b1095cb..ae2800c2b7 100644
--- a/import-layers/yocto-poky/documentation/tools/mega-manual.sed
+++ b/import-layers/yocto-poky/documentation/tools/mega-manual.sed
@@ -2,32 +2,32 @@
# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
# in the mega-manual.
-# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
+# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
# it is not included in the mega-manual.
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
# This was the one-liner that worked before we introduced the BitBake User Manual, which is
# not in the mega-manual.
-# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/sdk-manual\/sdk-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/sdk-manual\/sdk-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
# Process cases where just an external manual is referenced without an id anchor
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/sdk-manual\/sdk-manual.html\" target=\"_top\">Yocto Project Software Development Kit (SDK) Developer's Guide<\/a>/Yocto Project Software Development Kit (SDK) Developer's Guide/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/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
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.3.4\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Tasks Manual<\/a>/Yocto Project Development Tasks Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/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
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/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
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.4.2\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/figures/yocto-environment.png b/import-layers/yocto-poky/documentation/yocto-project-qs/figures/yocto-environment.png
deleted file mode 100644
index 35969038c9..0000000000
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/figures/yocto-environment.png
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css b/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css
index 235c85a1ba..948f1bed3f 100644
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css
+++ b/import-layers/yocto-poky/documentation/yocto-project-qs/qs-style.css
@@ -730,6 +730,11 @@ div.navfooter {
}
+.writernotes {
+ color: red;
+}
+
+
/*********** /
/ graphics /
/ ***********/
diff --git a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml b/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
index b4b3f4bd0e..e6dae7ffe3 100644
--- a/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/import-layers/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -16,35 +16,36 @@
Permission is granted to copy, distribute and/or modify this document under
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para>
- <note><title>Manual Notes</title>
- <itemizedlist>
- <listitem><para>
- For the latest version of the Yocto Project Quick
- Start associated with this Yocto Project release
- (version &YOCTO_DOC_VERSION;),
- see the Yocto Project Quick Start from the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
- </para></listitem>
- <listitem><para>
- This version of the manual is version
- &YOCTO_DOC_VERSION;.
- For later releases of the Yocto Project (if they exist),
- go to the
- <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
- and use the drop-down "Active Releases" button
- and choose the Yocto Project version for which you want
- the manual.
+ <note><title>Manual Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ This version of the
+ <emphasis>Yocto Project Quick Start</emphasis>
+ is for the &YOCTO_DOC_VERSION; release of the
+ Yocto Project.
+ To be sure you have the latest version of the manual
+ for this release, use the manual from the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>.
+ </para></listitem>
+ <listitem><para>
+ For manuals associated with other releases of the Yocto
+ Project, go to the
+ <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
+ and use the drop-down "Active Releases" button
+ and choose the manual associated with the desired
+ Yocto Project.
+ </para></listitem>
+ <listitem><para>
+ To report any inaccuracies or problems with this
+ manual, send an email to the Yocto Project
+ discussion group at
+ <filename>yocto@yoctoproject.com</filename> or log into
+ the freenode <filename>#yocto</filename> channel.
</para></listitem>
- <listitem><para>
- For an in-development version of the Yocto Project
- Quick Start, see
- <ulink url='&YOCTO_DOCS_URL;/latest/yocto-project-qs/yocto-project-qs.html'></ulink>.
- </para></listitem>
- </itemizedlist>
- </note>
+ </itemizedlist>
+ </note>
</legalnotice>
-
<abstract>
<imagedata fileref="figures/yocto-project-transp.png"
width="6in" depth="1in"
@@ -60,24 +61,12 @@
focus is developers of embedded Linux systems.
Among other things, the Yocto Project uses a build host based
on the OpenEmbedded (OE) project, which uses the
- <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
tool, to construct complete Linux images.
- The BitBake and OE components are combined together to form
+ The BitBake and OE components combine together to form
a reference build host, historically known as
- <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>
- (<emphasis>Pah</emphasis>-key).
- </para>
-
- <para>
- If you do not have a system that runs Linux and you want to give
- the Yocto Project a test run, you might consider using the Yocto
- Project Build Appliance.
- The Build Appliance allows you to build and boot a custom embedded
- Linux image with the Yocto Project using a non-Linux development
- system.
- See the
- <ulink url='https://www.yoctoproject.org/tools-resources/projects/build-appliance'>Yocto Project Build Appliance</ulink>
- for more information.
+ <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
+ (<emphasis>Pah</emphasis>-kee).
</para>
<para>
@@ -86,30 +75,74 @@
Linux images.
Rather than go into great detail about the Yocto Project and its
many capabilities, this quick start provides the minimal
- information you need to try out the Yocto Project using a
- supported Linux build host.
+ information you need to try out the Yocto Project using either a
+ supported Linux build host or a build host set up to use
+ <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
+ which leverages
+ <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
+ </para>
+
+ <para>
Reading and using the quick start should result in you having a
basic understanding of what the Yocto Project is and how to use
some of its core components.
You will also have worked through steps to produce two images:
- one that is suitable for emulation and one that boots on actual
- hardware.
+ one that runs on the emulator (QEMU) and one that boots on actual
+ hardware (i.e. MinnowBoard Turbot).
The examples highlight the ease with which you can use the
Yocto Project to create images for multiple types of hardware.
</para>
<para>
+ The following list directs you to key sections of this
+ quick start:
+ <itemizedlist>
+ <listitem><para>
+ <ulink url='http://www.yoctoproject.org/docs/2.4/yocto-project-qs/yocto-project-qs.html#yp-resources'>Setting Up to Use the Yocto Project</ulink>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='http://www.yoctoproject.org/docs/2.4/yocto-project-qs/yocto-project-qs.html#building-an-image-for-emulation'>Building an Image for Emulation</ulink>
+ </para></listitem>
+ <listitem><para>
+ <ulink url='http://www.yoctoproject.org/docs/2.4/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware'>Building an Image for Hardware</ulink>
+ </para></listitem>
+ </itemizedlist>
+<!--
+ <note>
+ If you do not have a system that runs Linux and you want to give
+ the Yocto Project a test run, you might consider using the Yocto
+ Project Build Appliance.
+ The Build Appliance allows you to build and boot a custom
+ embedded Linux image with the Yocto Project using a non-Linux
+ development system.
+ See the
+ <ulink url='https://www.yoctoproject.org/tools-resources/projects/build-appliance'>Yocto Project Build Appliance</ulink>
+ for more information.
+ </note>
+-->
+ </para>
+
+ <para>
For more detailed information on the Yocto Project, you can
reference these resources:
<itemizedlist>
- <listitem><para><emphasis>Website:</emphasis>
+ <listitem><para>
+ <emphasis>Website:</emphasis>
The
<ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
- provides the latest builds, breaking news, full development
- documentation, and access to a rich Yocto Project
- Development Community into which you can tap.
+ provides background information, the latest builds, breaking
+ news, full development documentation, and access to a rich
+ Yocto Project Development Community into which you can tap.
</para></listitem>
- <listitem><para><emphasis>FAQs:</emphasis>
+ <listitem><para>
+ <emphasis>Yocto Project Development Environment Overview:</emphasis>
+ The
+ "<ulink url='&YOCTO_DOCS_REF_URL;#yp-intro'>Introducing the Yocto Project Development Environment</ulink>"
+ section presents an overview of the Yocto Project
+ development environment.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>FAQs:</emphasis>
Lists commonly asked Yocto Project questions and answers.
You can find two FAQs:
<ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>Yocto Project FAQ</ulink>
@@ -117,7 +150,8 @@
"<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink>"
chapter in the Yocto Project Reference Manual.
</para></listitem>
- <listitem><para><emphasis>Developer Screencast:</emphasis>
+ <listitem><para>
+ <emphasis>Developer Screencast:</emphasis>
The
<ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New Developer Screencast Tutorial</ulink>
provides a 30-minute video created for users unfamiliar
@@ -126,238 +160,240 @@
While this screencast is somewhat dated, the introductory
and fundamental concepts are useful for the beginner.
</para></listitem>
+ <listitem><para>
+ <emphasis>Comprehensive List of Links and Other Documentation:</emphasis>
+ The
+ "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
+ section in the Yocto Project Reference Manual provides a
+ comprehensive list of related links and documentation.
+ </para></listitem>
</itemizedlist>
</para>
</section>
- <section id='yp-intro'>
- <title>Introducing the Yocto Project Development Environment</title>
-
- <para>
- The Yocto Project through the OpenEmbedded build system provides an
- open source development environment targeting the ARM, MIPS,
- PowerPC, and x86 architectures for a variety of platforms
- including x86-64 and emulated ones.
- You can use components from the Yocto Project to design, develop,
- build, debug, simulate, and test the complete software stack using
- Linux, the X Window System, GTK+ frameworks, and Qt frameworks.
- </para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/yocto-environment.png"
- format="PNG" align='center' width="8in"/>
- </imageobject>
- </mediaobject>
-
- <para>
- Here are some highlights for the Yocto Project:
- </para>
-
- <itemizedlist>
- <listitem><para>
- Provides a recent Linux kernel along with a set of system
- commands and libraries suitable for the embedded
- environment.
- </para></listitem>
- <listitem><para>
- Makes available system components such as X11, GTK+, Qt,
- Clutter, and SDL (among others) so you can create a rich user
- experience on devices that have display hardware.
- For devices that do not have a display or where you wish to
- use alternative UI frameworks, these components need not be
- installed.
- </para></listitem>
- <listitem><para>
- Creates a focused and stable core compatible with the
- OpenEmbedded project with which you can easily and reliably
- build and develop.
- </para></listitem>
- <listitem><para>
- Fully supports a wide range of hardware and device emulation
- through the Quick EMUlator (QEMU).
- </para></listitem>
- <listitem><para>
- Provides a layer mechanism that allows you to easily extend
- the system, make customizations, and keep them organized.
- </para></listitem>
- </itemizedlist>
-
- <para>
- You can use the Yocto Project to generate images for many kinds
- of devices.
- As mentioned earlier, the Yocto Project supports creation of
- reference images that you can boot within and emulate using QEMU.
- The standard example machines target QEMU full-system
- emulation for 32-bit and 64-bit variants of x86, ARM, MIPS, and
- PowerPC architectures.
- Beyond emulation, you can use the layer mechanism to extend
- support to just about any platform that Linux can run on and that
- a toolchain can target.
- </para>
+ <section id='yp-resources'>
+ <title>Setting Up to Use the Yocto Project</title>
<para>
- Another Yocto Project feature is the Sato reference User
- Interface.
- This optional UI that is based on GTK+ is intended for devices with
- restricted screen sizes and is included as part of the
- OpenEmbedded Core layer so that developers can test parts of the
- software stack.
+ Setting up to use the Yocto Project involves getting your build
+ host ready.
+ If you have a native Linux machine that runs a Yocto Project
+ supported distribution as described by the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+ section in the Yocto Project Reference Manual, you can prepare
+ that machine as your build host.
+ See the
+ "<link linkend='qs-native-linux-build-host'>Using a Native Linux Machine</link>"
+ section for more information.
</para>
- </section>
-
- <section id='yp-resources'>
- <title>Setting Up to Use the Yocto Project</title>
<para>
- The following list shows what you need in order to use a
- Linux-based build host to use the Yocto Project to build images:
+ If you do not want to use the Yocto Project on a native Linux
+ machine, you can prepare your build host to use
+ <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
+ which leverages
+ <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
+ You can set up a build host for Windows, Mac, and Linux
+ machines.
+ See the
+ "<link linkend='qs-crops-build-host'>Using CROPS and Containers</link>"
+ section for more information.
</para>
- <itemizedlist>
- <listitem><para><emphasis>Build Host</emphasis>
- A build host with a minimum of 50 Gbytes of free disk
- space that is running a supported Linux distribution (i.e.
- recent releases of Fedora, openSUSE, CentOS, Debian, or
- Ubuntu).
- </para></listitem>
- <listitem><para><emphasis>Build Host Packages</emphasis>
- Appropriate packages installed on the build host.
- </para></listitem>
- <listitem><para><emphasis>The Yocto Project</emphasis>
- A release of the Yocto Project.
- </para></listitem>
- </itemizedlist>
-
- <section id='the-linux-distro'>
- <title>The Linux Distribution</title>
+ <section id='qs-crops-build-host'>
+ <title>Using CROPS and Containers</title>
<para>
- The Yocto Project team verifies each release against recent
- versions of the most popular Linux distributions that
- provide stable releases.
- In general, if you have the current release minus one of the
- following distributions, you should have no problems.
- <itemizedlist>
- <listitem><para>
- Ubuntu
- </para></listitem>
- <listitem><para>
- Fedora
- </para></listitem>
- <listitem><para>
- openSUSE
- </para></listitem>
+ Follow these steps to get your build host set up with a
+ Poky container that you can use to complete the build
+ examples further down in the Quick Start:
+ <orderedlist>
<listitem><para>
- CentOS
+ <emphasis>Set Up to use CROss PlatformS (CROPS):</emphasis>
+ Work through the first six steps of the procedure
+ in the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
+ section of the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para>
- Debian
- </para></listitem>
- </itemizedlist>
- For a more detailed list of distributions that support the
- Yocto Project, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
- section in the Yocto Project Reference Manual.
- </para>
+ <emphasis>Set Up the Poky Container to Use the Yocto Project:</emphasis>
+ Go to
+ <ulink url='https://github.com/crops/poky-container/blob/master/README.md'></ulink>
+ and follow the directions to set up the Poky container
+ on your build host.</para>
- <para>
- The OpenEmbedded build system should be able to run on any
- modern distribution that has the following versions for
- Git, tar, and Python.
- <itemizedlist>
- <listitem><para>
- Git 1.8.3.1 or greater
- </para></listitem>
- <listitem><para>
- tar 1.24 or greater
- </para></listitem>
- <listitem><para>
- Python 3.4.0 or greater.
+ <para>Once you complete the setup instructions for your
+ machine, you need to get a copy of the
+ <filename>poky</filename> repository on your build
+ host.
+ See the
+ "<link linkend='releases'>Yocto Project Release</link>"
+ section to continue.
</para></listitem>
- </itemizedlist>
- If your build host does not meet any of these three listed
- version requirements, you can take steps to prepare the
- system so that you can still use the Yocto Project.
- See the
- "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
- section in the Yocto Project Reference Manual for information.
+ </orderedlist>
</para>
</section>
- <section id='packages'>
- <title>The Build Host Packages</title>
+ <section id='qs-native-linux-build-host'>
+ <title>Using a Native Linux Machine</title>
<para>
- Required build host packages vary depending on your
- build machine and what you want to do with the Yocto Project.
- For example, if you want to build an image that can run
- on QEMU in graphical mode (a minimal, basic build
- requirement), then the build host package requirements
- are different than if you want to build an image on a headless
- system or build out the Yocto Project documentation set.
+ The following list shows what you need in order to use a
+ Linux-based build host to use the Yocto Project to build images:
</para>
- <para>
- Collectively, the number of required packages is large
- if you want to be able to cover all cases.
- <note>
- In general, you need to have root access and then install
- the required packages.
- Thus, the commands in the following section may or may
- not work depending on whether or not your Linux
- distribution has <filename>sudo</filename> installed.
- </note>
- </para>
+ <itemizedlist>
+ <listitem><para><emphasis>Build Host</emphasis>
+ A build host with a minimum of 50 Gbytes of free disk
+ space that is running a supported Linux distribution (i.e.
+ recent releases of Fedora, openSUSE, CentOS, Debian, or
+ Ubuntu).
+ </para></listitem>
+ <listitem><para><emphasis>Build Host Packages</emphasis>
+ Appropriate packages installed on the build host.
+ </para></listitem>
+ </itemizedlist>
- <para>
- The following list shows the required packages needed to build
- an image that runs on QEMU in graphical mode (e.g. essential
- plus graphics support).
- For lists of required packages for other scenarios, see the
- "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
- section in the Yocto Project Reference Manual.
- <itemizedlist>
- <listitem><para><emphasis>Ubuntu and Debian</emphasis>
- <literallayout class='monospaced'>
+ <section id='the-linux-distro'>
+ <title>The Linux Distribution</title>
+
+ <para>
+ The Yocto Project team verifies each release against recent
+ versions of the most popular Linux distributions that
+ provide stable releases.
+ In general, if you have the current release minus one of the
+ following distributions, you should have no problems.
+ <itemizedlist>
+ <listitem><para>
+ Ubuntu
+ </para></listitem>
+ <listitem><para>
+ Fedora
+ </para></listitem>
+ <listitem><para>
+ openSUSE
+ </para></listitem>
+ <listitem><para>
+ CentOS
+ </para></listitem>
+ <listitem><para>
+ Debian
+ </para></listitem>
+ </itemizedlist>
+ For a more detailed list of distributions that support the
+ Yocto Project, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+ section in the Yocto Project Reference Manual.
+ </para>
+
+ <para>
+ The OpenEmbedded build system should be able to run on any
+ modern distribution that has the following versions for
+ Git, tar, and Python.
+ <itemizedlist>
+ <listitem><para>
+ Git 1.8.3.1 or greater
+ </para></listitem>
+ <listitem><para>
+ tar 1.27 or greater
+ </para></listitem>
+ <listitem><para>
+ Python 3.4.0 or greater.
+ </para></listitem>
+ </itemizedlist>
+ If your build host does not meet any of these three listed
+ version requirements, you can take steps to prepare the
+ system so that you can still use the Yocto Project.
+ See the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
+ section in the Yocto Project Reference Manual for information.
+ </para>
+ </section>
+
+ <section id='packages'>
+ <title>The Build Host Packages</title>
+
+ <para>
+ Required build host packages vary depending on your
+ build machine and what you want to do with the Yocto Project.
+ For example, if you want to build an image that can run
+ on QEMU in graphical mode (a minimal, basic build
+ requirement), then the build host package requirements
+ are different than if you want to build an image on a headless
+ system or build out the Yocto Project documentation set.
+ </para>
+
+ <para>
+ Collectively, the number of required packages is large
+ if you want to be able to cover all cases.
+ <note>
+ In general, you need to have root access and then install
+ the required packages.
+ Thus, the commands in the following section may or may
+ not work depending on whether or not your Linux
+ distribution has <filename>sudo</filename> installed.
+ </note>
+ </para>
+
+ <para>
+ The following list shows the required packages needed to build
+ an image that runs on QEMU in graphical mode (e.g. essential
+ plus graphics support).
+ For lists of required packages for other scenarios, see the
+ "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
+ section in the Yocto Project Reference Manual.
+ <itemizedlist>
+ <listitem><para><emphasis>Ubuntu and Debian</emphasis>
+ <literallayout class='monospaced'>
$ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; libsdl1.2-dev xterm
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>Fedora</emphasis>
- <literallayout class='monospaced'>
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>Fedora</emphasis>
+ <literallayout class='monospaced'>
$ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>OpenSUSE</emphasis>
- <literallayout class='monospaced'>
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>OpenSUSE</emphasis>
+ <literallayout class='monospaced'>
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; libSDL-devel xterm
- </literallayout>
- </para></listitem>
- <listitem><para><emphasis>CentOS</emphasis>
- <literallayout class='monospaced'>
+ </literallayout>
+ </para></listitem>
+ <listitem><para><emphasis>CentOS</emphasis>
+ <literallayout class='monospaced'>
$ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
- </literallayout>
- <note><title>Notes</title>
- <itemizedlist>
- <listitem><para>
- Extra Packages for Enterprise Linux
- (i.e. <filename>epel-release</filename>)
- is a collection of packages from Fedora
- built on RHEL/CentOS for easy installation
- of packages not included in enterprise
- Linux by default.
- You need to install these packages
- separately.
- </para></listitem>
- <listitem><para>
- The <filename>makecache</filename> command
- consumes additional Metadata from
- <filename>epel-release</filename>.
- </para></listitem>
- </itemizedlist>
- </note>
- </para></listitem>
- </itemizedlist>
+ </literallayout>
+ <note><title>Notes</title>
+ <itemizedlist>
+ <listitem><para>
+ Extra Packages for Enterprise Linux
+ (i.e. <filename>epel-release</filename>)
+ is a collection of packages from Fedora
+ built on RHEL/CentOS for easy installation
+ of packages not included in enterprise
+ Linux by default.
+ You need to install these packages
+ separately.
+ </para></listitem>
+ <listitem><para>
+ The <filename>makecache</filename> command
+ consumes additional Metadata from
+ <filename>epel-release</filename>.
+ </para></listitem>
+ </itemizedlist>
+ </note>
+ </para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <para>
+ Once you complete the setup instructions for your
+ machine, you need to get a copy of the
+ <filename>poky</filename> repository on your build
+ host.
+ Continue with the
+ "<link linkend='releases'>Yocto Project Release</link>"
+ section.
</para>
</section>
@@ -365,11 +401,12 @@
<title>Yocto Project Release</title>
<para>
- The last requirement you need to meet before using the
- Yocto Project is getting a Yocto Project release.
+ Now that your build host has the right packages (native
+ Linux machine) or you have the Poky container set up
+ (CROPS), you need to get a copy of the Yocto Project.
It is recommended that you get the latest Yocto Project release
by setting up (cloning in
- <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> terms) a
+ <ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink> terms) a
local copy of the <filename>poky</filename> Git repository on
your build host and then checking out the latest release.
Doing so allows you to easily update to newer Yocto Project
@@ -377,9 +414,15 @@
</para>
<para>
- Here is an example from an Ubuntu build host that clones the
- <filename>poky</filename> repository and then checks out the
- latest Yocto Project Release (i.e. &DISTRO;):
+ Here is an example from a native Linux machine that is
+ running Ubuntu.
+ <note>
+ If your build host is using a Poky container, you can
+ use the same Git commands.
+ </note>
+ The following example clones the <filename>poky</filename>
+ repository and then checks out the latest Yocto Project Release
+ by tag (i.e. <filename>&DISTRO_REL_TAG;</filename>):
<literallayout class='monospaced'>
$ git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
@@ -389,18 +432,35 @@
Receiving objects: 100% (361782/361782), 131.94 MiB | 6.88 MiB/s, done.
Resolving deltas: 100% (268619/268619), done.
Checking connectivity... done.
- $ git checkout &DISTRO_NAME_NO_CAP;
+ $ git checkout tags/&DISTRO_REL_TAG; -b poky_&DISTRO;
</literallayout>
- You can also get the Yocto Project Files by downloading
- Yocto Project releases from the
- <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
</para>
<para>
- For more information on getting set up with the Yocto Project
- release, see the
- "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto Project Release</ulink>"
- item in the Yocto Project Development Manual.
+ The previous Git <filename>checkout</filename> command
+ creates a local branch named
+ <filename>poky_&DISTRO;</filename>.
+ The files available to you in that branch exactly match the
+ repository's files in the
+ <filename>&DISTRO_NAME_NO_CAP;</filename>
+ development branch at the time of the Yocto Project &DISTRO;
+ release.
+ <note>
+ Rather than checking out the entire development branch
+ of a release (i.e. the tip), which could be continuously
+ changing while you are doing your development, you would
+ check out a branch based on a release tag as shown in
+ the previous example.
+ Doing so provides you with an unchanging, stable set of
+ files.
+ </note>
+ </para>
+
+ <para>
+ For more options and information about accessing Yocto
+ Project related repositories, see the
+ "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
+ section in the Yocto Project Development Tasks Manual.
</para>
</section>
</section>
@@ -409,20 +469,22 @@
<title>Building Images</title>
<para>
- Now that you have your system requirements in order, you can give
- Yocto Project a try.
- You can try out Yocto Project using either the command-line
- interface or using Toaster, which uses a graphical user
- interface.
- If you want to try out the Yocto Project using a GUI, see the
- <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>
- for information on how to install and set up Toaster.
+ You are now ready to give the Yocto Project a try.
+ For this example, you will be using the command line to build
+ your images.
+ <note>
+ A graphical user interface to the Yocto Project is available
+ through
+ <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>.
+ See the
+ <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>
+ for more information.
+ </note>
</para>
<para>
- To use the Yocto Project through the command-line interface,
- finish this quick start, which presents steps that let you
- do the following:
+ The remainder of this quick start steps you through the
+ following:
<itemizedlist>
<listitem><para>
Build a <filename>qemux86</filename> reference image
@@ -433,7 +495,7 @@
create a second image that you can load onto bootable
media and actually boot target hardware.
This example uses the MinnowBoard
- MAX-compatible boards.
+ Turbot-compatible boards.
</para></listitem>
</itemizedlist>
<note>
@@ -452,37 +514,39 @@
Use the following commands to build your image.
The OpenEmbedded build system creates an entire Linux
distribution, including the toolchain, from source.
- <note><title>Note about Network Proxies</title>
- <para>
- By default, the build process searches for source code
- using a pre-determined order through a set of
- locations.
- If you are working behind a firewall and your build
- host is not set up for proxies, you could encounter
- problems with the build process when fetching source
- code (e.g. fetcher failures or Git failures).
- </para>
-
- <para>
- If you do not know your proxy settings, consult your
- local network infrastructure resources and get that
- information.
- A good starting point could also be to check your web
- browser settings.
- Finally, you can find more information on using the
- Yocto Project behind a firewall in the Yocto Project
- Reference Manual
- <ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</ulink>
- and on the
- "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
- wiki page.
- </para>
+ <note><title>Notes about Network Proxies</title>
+ <itemizedlist>
+ <listitem><para>
+ By default, the build process searches for source
+ code using a pre-determined order through a set of
+ locations.
+ If you are working behind a firewall and your build
+ host is not set up for proxies, you could encounter
+ problems with the build process when fetching source
+ code (e.g. fetcher failures or Git failures).
+ </para></listitem>
+ <listitem><para>
+ If you do not know your proxy settings, consult your
+ local network infrastructure resources and get that
+ information.
+ A good starting point could also be to check your
+ web browser settings.
+ Finally, you can find more information on using the
+ Yocto Project behind a firewall in the Yocto Project
+ Reference Manual
+ <ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</ulink>
+ and on the
+ "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
+ wiki page.
+ </para></listitem>
+ </itemizedlist>
</note>
</para>
<para>
<orderedlist>
- <listitem><para><emphasis>Be Sure Your Build Host is Set Up:</emphasis>
+ <listitem><para>
+ <emphasis>Be Sure Your Build Host is Set Up:</emphasis>
The steps to build an image in this section depend on
your build host being properly set up.
Be sure you have worked through the requirements
@@ -490,9 +554,10 @@
"<link linkend='yp-resources'>Setting Up to Use the Yocto Project</link>"
section.
</para></listitem>
- <listitem><para><emphasis>Check Out Your Branch:</emphasis>
+ <listitem><para>
+ <emphasis>Check Out Your Branch:</emphasis>
Be sure you are in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
(e.g. <filename>poky</filename>) and then check out
the branch associated with the latest Yocto Project
Release:
@@ -510,7 +575,8 @@
branch ensures you are using the latest files for
that release.
</para></listitem>
- <listitem><para><emphasis>Initialize the Build Environment:</emphasis>
+ <listitem><para>
+ <emphasis>Initialize the Build Environment:</emphasis>
Run the
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
environment setup script to define the OpenEmbedded
@@ -519,23 +585,17 @@
$ source &OE_INIT_FILE;
</literallayout>
Among other things, the script creates the
- <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
which is <filename>build</filename> in this case
and is located in the
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
After the script runs, your current working directory
is set to the Build Directory.
Later, when the build completes, the Build Directory
contains all the files created during the build.
- <note>
- For information on running a memory-resident
- <ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>,
- see the
- <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
- setup script.
- </note>
</para></listitem>
- <listitem><para><emphasis>Examine Your Local Configuration File:</emphasis>
+ <listitem><para>
+ <emphasis>Examine Your Local Configuration File:</emphasis>
When you set up the build environment, a local
configuration file named
<filename>local.conf</filename> becomes available in
@@ -589,7 +649,8 @@
</para></listitem>
</itemizedlist>
</para></listitem>
- <listitem><para><emphasis>Start the Build:</emphasis>
+ <listitem><para>
+ <emphasis>Start the Build:</emphasis>
Continue with the following command to build an OS image
for the target, which is
<filename>core-image-sato</filename> in this example:
@@ -647,7 +708,8 @@
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
chapter in the Yocto Project Reference Manual.
</para></listitem>
- <listitem><para><emphasis>Simulate Your Image Using QEMU:</emphasis>
+ <listitem><para>
+ <emphasis>Simulate Your Image Using QEMU:</emphasis>
Once this particular image is built, you can start QEMU
and run the image:
<literallayout class='monospaced'>
@@ -655,9 +717,10 @@
</literallayout>
If you want to learn more about running QEMU, see the
"<ulink url="&YOCTO_DOCS_DEV_URL;#dev-manual-qemu">Using the Quick EMUlator (QEMU)</ulink>"
- chapter in the Yocto Project Development Manual.
+ chapter in the Yocto Project Development Tasks Manual.
</para></listitem>
- <listitem><para><emphasis>Exit QEMU:</emphasis>
+ <listitem><para>
+ <emphasis>Exit QEMU:</emphasis>
Exit QEMU by either clicking on the shutdown icon or by
typing <filename>Ctrl-C</filename> in the QEMU
transcript window from which you evoked QEMU.
@@ -672,13 +735,13 @@
<para id='qs-minnowboard-example'>
The following steps show how easy it is to set up to build an
image for a new machine.
- These steps build an image for the MinnowBoard MAX, which is
+ These steps build an image for the MinnowBoard Turbot, which is
supported by the Yocto Project and the
<filename>meta-intel</filename> <filename>intel-corei7-64</filename>
and <filename>intel-core2-32</filename> Board Support Packages
(BSPs).
<note>
- The MinnowBoard MAX ships with 64-bit firmware.
+ The MinnowBoard Turbot ships with 64-bit firmware.
If you want to use the board in 32-bit mode, you must
download the
<ulink url='http://firmware.intel.com/projects/minnowboard-max'>32-bit firmware</ulink>.
@@ -687,13 +750,15 @@
<para>
<orderedlist>
- <listitem><para><emphasis>Create a Local Copy of the
+ <listitem><para>
+ <emphasis>Create a Local Copy of the
<filename>meta-intel</filename> Repository:</emphasis>
- Building an image for the MinnowBoard MAX requires the
+ Building an image for the MinnowBoard Turbot requires
+ the
<filename>meta-intel</filename> layer.
Use the <filename>git clone</filename> command to create
a local copy of the repository inside your
- <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+ <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
which is <filename>poky</filename> in this example:
<literallayout class='monospaced'>
$ cd $HOME/poky
@@ -713,17 +778,30 @@
sure that both repositories
(<filename>meta-intel</filename> and
<filename>poky</filename>) are using the same releases.
+ Because you used the <filename>&DISTRO_REL_TAG;</filename>
+ tag when you checked out the <filename>poky</filename>
+ repository by tag, you should use a
+ <filename>meta-intel</filename>
+ tag that corresponds with the release you used for
+ <filename>poky</filename>.
Consequently, you need to checkout out the
- "<filename>&DISTRO_NAME_NO_CAP;</filename>" release after
- cloning <filename>meta-intel</filename>:
+ "<filename>&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;</filename>"
+ branch after cloning <filename>meta-intel</filename>:
<literallayout class='monospaced'>
$ cd $HOME/poky/meta-intel
- $ git checkout &DISTRO_NAME_NO_CAP;
- Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
- Switched to a new branch '&DISTRO_NAME_NO_CAP;'
+ $ git checkout tags/&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION; -b meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;
+ Switched to a new branch 'meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;'
</literallayout>
+ The previous Git <filename>checkout</filename> command
+ creates a local branch named
+ <filename>meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;</filename>.
+ You have the option to name your local branch whatever
+ you want by providing any name you like for
+ "meta-intel-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;"
+ in the above example.
</para></listitem>
- <listitem><para><emphasis>Configure the Build:</emphasis>
+ <listitem><para>
+ <emphasis>Configure the Build:</emphasis>
To configure the build, you edit the
<filename>bblayers.conf</filename> and
<filename>local.conf</filename> files, both of which are
@@ -760,13 +838,15 @@
</para>
</note>
</para></listitem>
- <listitem><para><emphasis>Build an Image for MinnowBoard MAX:</emphasis>
+ <listitem><para>
+ <emphasis>Build an Image for MinnowBoard
+ Turbot:</emphasis>
The type of image you build depends on your goals.
For example, the previous build created a
<filename>core-image-sato</filename> image, which is an
image with Sato support.
It is possible to build many image types for the
- MinnowBoard MAX.
+ MinnowBoard Turbot.
Some possibilities are <filename>core-image-base</filename>,
which is a console-only image.
Another choice could be a
@@ -826,7 +906,8 @@
tmp/deploy/images/intel-corei7-64/core-image-base-intel-corei7-64.wic
</literallayout>
</para></listitem>
- <listitem><para><emphasis>Write the Image:</emphasis>
+ <listitem><para>
+ <emphasis>Write the Image:</emphasis>
You can write the image just built to a bootable media
(e.g. a USB key, SATA drive, SD card, etc.) using the
<filename>dd</filename> utility:
@@ -840,9 +921,10 @@
<filename>/dev/mmcblk0</filename>, which is most likely an
SD card).
</para></listitem>
- <listitem><para><emphasis>Boot the Hardware:</emphasis>
+ <listitem><para>
+ <emphasis>Boot the Hardware:</emphasis>
With the boot device provisioned, you can insert the
- media into the MinnowBoard MAX and boot the hardware.
+ media into the MinnowBoard Turbot and boot the hardware.
The board should automatically detect the media and boot to
the bootloader and subsequently the operating system.
</para>
@@ -880,66 +962,76 @@
Depending on what you primary interests are with the Yocto Project,
you could consider any of the following:
<itemizedlist>
- <listitem><para><emphasis>Visit the Yocto Project Web Site:</emphasis>
+ <listitem><para>
+ <emphasis>Visit the Yocto Project Web Site:</emphasis>
The official
<ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
web site contains information on the entire project.
Visiting this site is a good way to familiarize yourself
with the overall project.
</para></listitem>
- <listitem><para><emphasis>Look Through the Yocto Project Development Manual:</emphasis>
- The
- <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-intro'>Yocto Project Development Manual</ulink>
- is a great place to get a feel for how to use the Yocto
- Project.
- The manual contains conceptual and procedural information
- that covers
- <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-model'>common development models</ulink>
- and introduces
- <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-newbie'>the Yocto Project open source development environment</ulink>.
- The manual also contains several targeted sections that
- cover specific
- <ulink url='&YOCTO_DOCS_DEV_URL;#extendpoky'>common tasks</ulink>
- such as understanding and creating layers, customizing
- images, writing new recipes, working with libraries, and
- configuring and patching the kernel.
+ <listitem><para>
+ <emphasis>Look Through the
+ <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-intro'>Yocto Project Development Tasks Manual</ulink>:</emphasis>
+ This manual contains procedural information grouped to
+ help you get set up, work with layers, customize images,
+ write new recipes, work with libraries, and use QEMU.
+ The information is task-based and spans the breadth of the
+ Yocto Project.
</para></listitem>
- <listitem><para><emphasis>Look Through the Yocto Project Software Development Kit (SDK) Developer's Guide:</emphasis>
- The
- <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
- describes how to use both the
+ <listitem><para>
+ <emphasis>Look Through the
+ <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
+ manual:</emphasis>
+ This manual describes how to use both the
<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk'>standard SDK</ulink>
and the
<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>,
which are used primarily for application development.
- This manual also provides an example workflow that uses
- the popular <trademark class='trade'>Eclipse</trademark>
- development environment.
+ This manual also provides example workflows
+ that use the popular <trademark class='trade'>Eclipse</trademark>
+ development environment and that use <filename>devtool</filename>.
See the
"<ulink url='&YOCTO_DOCS_SDK_URL;#workflow-using-eclipse'>Workflow using Eclipse™</ulink>"
- section.
+ and
+ "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in your SDK Workflow</ulink>"
+ sections for more information.
</para></listitem>
- <listitem><para><emphasis>Learn About Board Support Packages (BSPs):</emphasis>
+ <listitem><para>
+ <emphasis>Learn About Kernel Development:</emphasis>
+ If you want to see how to work with the kernel and
+ understand Yocto Linux kernels, see the
+ <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-dev-intro'>Yocto Project Linux Kernel Development Manual</ulink>.
+ This manual provides information on how to patch the
+ kernel, modify kernel recipes, and configure the kernel.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>Learn About Board Support Packages (BSPs):</emphasis>
If you want to learn about BSPs, see the
<ulink url='&YOCTO_DOCS_BSP_URL;#bsp'>Yocto Project Board Support Packages (BSP) Developer's Guide</ulink>.
+ This manual also provides an example BSP creation workflow.
+ See the
+ <ulink url='&YOCTO_DOCS_BSP_URL;#developing-a-board-support-package-bsp'>"Developing a Board Support Package (BSP)</ulink>"
+ section.
</para></listitem>
- <listitem><para><emphasis>Learn About Toaster:</emphasis>
+ <listitem><para>
+ <emphasis>Learn About Toaster:</emphasis>
Toaster is a web interface to the Yocto Project's
OpenEmbedded build system.
If you are interested in using this type of interface to
create images, see the
<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-intro'>Toaster User Manual</ulink>.
</para></listitem>
- <listitem><para><emphasis>Have Available the Yocto Project Reference Manual</emphasis>
- The
- <ulink url='&YOCTO_DOCS_REF_URL;#ref-manual-intro'>Yocto Project Reference Manual</ulink>,
- unlike the rest of the Yocto Project manual set, is
- comprised of material suited for reference rather than
+ <listitem><para>
+ <emphasis>Have Available the
+ <ulink url='&YOCTO_DOCS_REF_URL;#ref-manual-intro'>Yocto Project Reference Manual:</ulink></emphasis>
+ Unlike the rest of the Yocto Project manual set, this manual
+ is comprised of material suited for reference rather than
procedures.
You can get
<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky'>build details</ulink>,
a
- <ulink url='&YOCTO_DOCS_REF_URL;#closer-look'>closer look</ulink>
+ <ulink url='&YOCTO_DOCS_REF_URL;#development-concepts'>closer look</ulink>
at how the pieces of the Yocto Project development
environment work together, information on various
<ulink url='&YOCTO_DOCS_REF_URL;#technical-details'>technical details</ulink>,