From ced75cec41d0227ef75c9765d5c0a86ddb4f21f7 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 7 Jan 2013 14:08:58 -0600 Subject: kernel-dev: Edits to using metadata in a recipe section. General edits to clarify the writing. (From yocto-docs rev: 0510ab0faf81e0ac1c931863337eb217581c66ed) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-advanced.xml | 80 +++++++++++++----------- 1 file changed, 43 insertions(+), 37 deletions(-) (limited to 'documentation/kernel-dev/kernel-dev-advanced.xml') diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml index ad46fcc8f0..a951aaec5d 100644 --- a/documentation/kernel-dev/kernel-dev-advanced.xml +++ b/documentation/kernel-dev/kernel-dev-advanced.xml @@ -77,7 +77,7 @@ to source changes. feature enablement. The BSP can be influenced from within the linux-yocto recipe. - Linux kernel source that contains this Metadata is said to be + Linux kernel source that contains kernel Metadata is said to be "linux-yocto style" kernel source. A Linux kernel recipe that inherits from the linux-yocto.inc include file is said to be a @@ -91,14 +91,15 @@ to source changes. variable. This variable is typically set to the same value as the MACHINE - variable used by BitBake (e.g. "routerstationpro" or "fri2"). - However, multiple BSPs can reuse the same KMACHINE + variable, which is used by BitBake (e.g. "routerstationpro" or "fri2"). + Multiple BSPs can reuse the same KMACHINE name if they are built using the same BSP description. + The "fri2" and "fri2-noemgd" BSP combination + in the meta-intel + layer is a good example of two BSPs using the same + KMACHINE value (i.e. "fri2"). See the BSP Descriptions section for more information. - The meta-intel "fri2" and "fri2-noemgd" are good - examples of such a situation where each specifies - KMACHINE as "fri2". @@ -110,39 +111,43 @@ to source changes. KBRANCH_DEFAULT LINUX_KERNEL_TYPE - KBRANCH_DEFAULT defines the default source branch - within the Linux kernel source repository to be used to build the - Linux kernel. - It is used as the default value for KBRANCH which - may define an alternate branch, typically with a machine override, - such as: + KBRANCH_DEFAULT defines the Linux kernel source + repository's default branch to use to build the Linux kernel. + The value is used as the default for KBRANCH, which + can define an alternate branch typically with a machine override as + follows: KBRANCH_fri2 = "standard/fri2" Unless you specify otherwise, KBRANCH_DEFAULT - is initialized to "master". + initializes to "master". LINUX_KERNEL_TYPE defines the kernel type to be - used in assembling the configuration and defaults to "standard" - if you do not specify otherwise. - Together with KMACHINE, this defines the search - arguments used by the Yocto Project Linux kernel tools to find the - appropriate description within the metadata with which to build out - the sources and configuration. + used in assembling the configuration. + If you do not specify a LINUX_KERNEL_TYPE, + it defaults to "standard". + Together with KMACHINE, + LINUX_KERNEL_TYPE defines the search + arguments used by the kernel tools to find the + appropriate description within the kernel Metadata with which to + build out the sources and configuration. The linux-yocto recipes define "standard", "tiny", and "preempt-rt" kernel types. - See section 3.3.4 for more inforation on kernel types. + See the Kernel Types section + for more inforation on kernel types. - During the build, the kern-tools will search for the BSP description + During the build, the kern-tools search for the BSP description file that most closely matches the KMACHINE - and LINUX_KERNEL_TYPE passed in from the + and LINUX_KERNEL_TYPE variables passed in from the recipe. - It will use the first BSP description it finds matching both variables. - Failing that it will issue a warning such as the following: + 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: WARNING: Can't find any BSP hardware or required configuration fragments. WARNING: Looked at meta/cfg/broken/fri2-broken/hdw_frags.txt and @@ -154,19 +159,19 @@ to source changes. - It will then search first for the KMACHINE and + The tools first search for the KMACHINE and then for the LINUX_KERNEL_TYPE. - If it cannot find a partial match, it will use the + If the tools cannot find a partial match, they will use the sources from the KBRANCH and any configuration specified in the SRC_URI. - KERNEL_FEATURES can be used to include features - (configuration fragments, patches, or both) that are not already - included by the KMACHINE and - LINUX_KERNEL_TYPE combination. - To include a feature specified as "features/netfilter.scc" for example, + You can use the KERNEL_FEATURES variable + to include features (configuration fragments, patches, or both) that + are not already included by the KMACHINE and + LINUX_KERNEL_TYPE variable combination. + For example, to include a feature specified as "features/netfilter.scc", specify: KERNEL_FEATURES += "features/netfilter.scc" @@ -177,12 +182,13 @@ to source changes. KERNEL_FEATURES_append_qemux86 = "cfg/sound.scc" The value of the entries in KERNEL_FEATURES - are dependent on their location within the metadata itself. + are dependent on their location within the kernel Metadata itself. The examples here are taken from the linux-yocto-3.4 repository where "features" - and "cfg" are subdirectories of the metadata - directory. - For details, see section 3.3. + and "cfg" are subdirectories within the + meta/cfg/kernel-cache directory. + For more information, see the + "Metadata Syntax" section. The processing of the these variables has evolved some between the 0.9 and 1.3 releases of the Yocto Project and associated @@ -275,8 +281,8 @@ metadata directory. For details, see 3.3. -
- Metadata Location +
+ Kernel Metadata Location This metadata can be defined along with the Linux kernel -- cgit v1.2.3-54-g00ecf