summaryrefslogtreecommitdiff
path: root/import-layers/yocto-poky/documentation/kernel-dev
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-26 06:55:05 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-15 17:22:49 +0300
commitd7bf8c17eca8f8c89898a7794462c773c449e983 (patch)
treed18618fca85ca5f0c077032cc7b009344b60f663 /import-layers/yocto-poky/documentation/kernel-dev
parente2b5abdc9f28cdf8578e5b9be803c8e697443c20 (diff)
downloadopenbmc-d7bf8c17eca8f8c89898a7794462c773c449e983.tar.xz
Yocto 2.4
Move OpenBMC to Yocto 2.4(rocko) Tested: Built and verified Witherspoon and Palmetto images Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/documentation/kernel-dev')
-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
11 files changed, 3168 insertions, 1994 deletions
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 000000000..793a395e8
--- /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 000000000..ee2cdb206
--- /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 a5ccfdc30..c3013b8f7 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 aa40fc852..b8fd87016 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 ac91749cd..fbecc1387 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 9d9aef6d0..000000000
--- 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 9e0517d4a..c3a20465a 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 263e50098..dba45495f 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 6bb0cf6fd..f5fd183fd 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 6e0c1c7fc..9c01aa798 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 28a336408..ec36d2449 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'>