diff options
| author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2013-01-07 14:08:58 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-16 15:59:15 +0000 |
| commit | ced75cec41d0227ef75c9765d5c0a86ddb4f21f7 (patch) | |
| tree | 4dd1aff913a05984fbddd141569786ff5f3000da /documentation/kernel-dev | |
| parent | e826a507391da71bd79bb8ab15fb340a9cc09f31 (diff) | |
| download | poky-ced75cec41d0227ef75c9765d5c0a86ddb4f21f7.tar.gz | |
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 <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/kernel-dev')
| -rw-r--r-- | documentation/kernel-dev/kernel-dev-advanced.xml | 80 |
1 files changed, 43 insertions, 37 deletions
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. | |||
| 77 | feature enablement. | 77 | feature enablement. |
| 78 | The BSP can be influenced from within the linux-yocto recipe. | 78 | The BSP can be influenced from within the linux-yocto recipe. |
| 79 | <note> | 79 | <note> |
| 80 | Linux kernel source that contains this Metadata is said to be | 80 | Linux kernel source that contains kernel Metadata is said to be |
| 81 | "linux-yocto style" kernel source. | 81 | "linux-yocto style" kernel source. |
| 82 | A Linux kernel recipe that inherits from the | 82 | A Linux kernel recipe that inherits from the |
| 83 | <filename>linux-yocto.inc</filename> include file is said to be a | 83 | <filename>linux-yocto.inc</filename> include file is said to be a |
| @@ -91,14 +91,15 @@ to source changes. | |||
| 91 | variable. | 91 | variable. |
| 92 | This variable is typically set to the same value as the | 92 | This variable is typically set to the same value as the |
| 93 | <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> | 93 | <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> |
| 94 | variable used by BitBake (e.g. "routerstationpro" or "fri2"). | 94 | variable, which is used by BitBake (e.g. "routerstationpro" or "fri2"). |
| 95 | However, multiple BSPs can reuse the same <filename>KMACHINE</filename> | 95 | Multiple BSPs can reuse the same <filename>KMACHINE</filename> |
| 96 | name if they are built using the same BSP description. | 96 | name if they are built using the same BSP description. |
| 97 | The "fri2" and "fri2-noemgd" BSP combination | ||
| 98 | in the <filename>meta-intel</filename> | ||
| 99 | layer is a good example of two BSPs using the same | ||
| 100 | <filename>KMACHINE</filename> value (i.e. "fri2"). | ||
| 97 | See the <link linkend='bsp-descriptions'>BSP Descriptions</link> section | 101 | See the <link linkend='bsp-descriptions'>BSP Descriptions</link> section |
| 98 | for more information. | 102 | for more information. |
| 99 | The <filename>meta-intel</filename> "fri2" and "fri2-noemgd" are good | ||
| 100 | examples of such a situation where each specifies | ||
| 101 | <filename>KMACHINE</filename> as "fri2". | ||
| 102 | </para> | 103 | </para> |
| 103 | 104 | ||
| 104 | <para> | 105 | <para> |
| @@ -110,39 +111,43 @@ to source changes. | |||
| 110 | KBRANCH_DEFAULT | 111 | KBRANCH_DEFAULT |
| 111 | LINUX_KERNEL_TYPE | 112 | LINUX_KERNEL_TYPE |
| 112 | </literallayout> | 113 | </literallayout> |
| 113 | <filename>KBRANCH_DEFAULT</filename> defines the default source branch | 114 | <filename>KBRANCH_DEFAULT</filename> defines the Linux kernel source |
| 114 | within the Linux kernel source repository to be used to build the | 115 | repository's default branch to use to build the Linux kernel. |
| 115 | Linux kernel. | 116 | The value is used as the default for <filename>KBRANCH</filename>, which |
| 116 | It is used as the default value for <filename>KBRANCH</filename> which | 117 | can define an alternate branch typically with a machine override as |
| 117 | may define an alternate branch, typically with a machine override, | 118 | follows: |
| 118 | such as: | ||
| 119 | <literallayout class='monospaced'> | 119 | <literallayout class='monospaced'> |
| 120 | KBRANCH_fri2 = "standard/fri2" | 120 | KBRANCH_fri2 = "standard/fri2" |
| 121 | </literallayout> | 121 | </literallayout> |
| 122 | Unless you specify otherwise, <filename>KBRANCH_DEFAULT</filename> | 122 | Unless you specify otherwise, <filename>KBRANCH_DEFAULT</filename> |
| 123 | is initialized to "master". | 123 | initializes to "master". |
| 124 | </para> | 124 | </para> |
| 125 | 125 | ||
| 126 | <para> | 126 | <para> |
| 127 | <filename>LINUX_KERNEL_TYPE</filename> defines the kernel type to be | 127 | <filename>LINUX_KERNEL_TYPE</filename> defines the kernel type to be |
| 128 | used in assembling the configuration and defaults to "standard" | 128 | used in assembling the configuration. |
| 129 | if you do not specify otherwise. | 129 | If you do not specify a <filename>LINUX_KERNEL_TYPE</filename>, |
| 130 | Together with <filename>KMACHINE</filename>, this defines the search | 130 | it defaults to "standard". |
| 131 | arguments used by the Yocto Project Linux kernel tools to find the | 131 | Together with <filename>KMACHINE</filename>, |
| 132 | appropriate description within the metadata with which to build out | 132 | <filename>LINUX_KERNEL_TYPE</filename> defines the search |
| 133 | the sources and configuration. | 133 | arguments used by the kernel tools to find the |
| 134 | appropriate description within the kernel Metadata with which to | ||
| 135 | build out the sources and configuration. | ||
| 134 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" | 136 | The linux-yocto recipes define "standard", "tiny", and "preempt-rt" |
| 135 | kernel types. | 137 | kernel types. |
| 136 | See section 3.3.4 for more inforation on kernel types. | 138 | See the <link linkend='kernel-types'>Kernel Types</link> section |
| 139 | for more inforation on kernel types. | ||
| 137 | </para> | 140 | </para> |
| 138 | 141 | ||
| 139 | <para> | 142 | <para> |
| 140 | During the build, the kern-tools will search for the BSP description | 143 | During the build, the kern-tools search for the BSP description |
| 141 | file that most closely matches the <filename>KMACHINE</filename> | 144 | file that most closely matches the <filename>KMACHINE</filename> |
| 142 | and <filename>LINUX_KERNEL_TYPE</filename> passed in from the | 145 | and <filename>LINUX_KERNEL_TYPE</filename> variables passed in from the |
| 143 | recipe. | 146 | recipe. |
| 144 | It will use the first BSP description it finds matching both variables. | 147 | The tools use the first BSP description it finds that match |
| 145 | Failing that it will issue a warning such as the following: | 148 | both variables. |
| 149 | If the tools cannot find a match, they issue a warning such as | ||
| 150 | the following: | ||
| 146 | <literallayout class='monospaced'> | 151 | <literallayout class='monospaced'> |
| 147 | WARNING: Can't find any BSP hardware or required configuration fragments. | 152 | WARNING: Can't find any BSP hardware or required configuration fragments. |
| 148 | WARNING: Looked at meta/cfg/broken/fri2-broken/hdw_frags.txt and | 153 | WARNING: Looked at meta/cfg/broken/fri2-broken/hdw_frags.txt and |
| @@ -154,19 +159,19 @@ to source changes. | |||
| 154 | </para> | 159 | </para> |
| 155 | 160 | ||
| 156 | <para> | 161 | <para> |
| 157 | It will then search first for the <filename>KMACHINE</filename> and | 162 | The tools first search for the <filename>KMACHINE</filename> and |
| 158 | then for the <filename>LINUX_KERNEL_TYPE</filename>. | 163 | then for the <filename>LINUX_KERNEL_TYPE</filename>. |
| 159 | If it cannot find a partial match, it will use the | 164 | If the tools cannot find a partial match, they will use the |
| 160 | sources from the <filename>KBRANCH</filename> and any configuration | 165 | sources from the <filename>KBRANCH</filename> and any configuration |
| 161 | specified in the <filename>SRC_URI</filename>. | 166 | specified in the <filename>SRC_URI</filename>. |
| 162 | </para> | 167 | </para> |
| 163 | 168 | ||
| 164 | <para> | 169 | <para> |
| 165 | <filename>KERNEL_FEATURES</filename> can be used to include features | 170 | You can use the <filename>KERNEL_FEATURES</filename> variable |
| 166 | (configuration fragments, patches, or both) that are not already | 171 | to include features (configuration fragments, patches, or both) that |
| 167 | included by the <filename>KMACHINE</filename> and | 172 | are not already included by the <filename>KMACHINE</filename> and |
| 168 | <filename>LINUX_KERNEL_TYPE</filename> combination. | 173 | <filename>LINUX_KERNEL_TYPE</filename> variable combination. |
| 169 | To include a feature specified as "features/netfilter.scc" for example, | 174 | For example, to include a feature specified as "features/netfilter.scc", |
| 170 | specify: | 175 | specify: |
| 171 | <literallayout class='monospaced'> | 176 | <literallayout class='monospaced'> |
| 172 | KERNEL_FEATURES += "features/netfilter.scc" | 177 | KERNEL_FEATURES += "features/netfilter.scc" |
| @@ -177,12 +182,13 @@ to source changes. | |||
| 177 | KERNEL_FEATURES_append_qemux86 = "cfg/sound.scc" | 182 | KERNEL_FEATURES_append_qemux86 = "cfg/sound.scc" |
| 178 | </literallayout> | 183 | </literallayout> |
| 179 | The value of the entries in <filename>KERNEL_FEATURES</filename> | 184 | The value of the entries in <filename>KERNEL_FEATURES</filename> |
| 180 | are dependent on their location within the metadata itself. | 185 | are dependent on their location within the kernel Metadata itself. |
| 181 | The examples here are taken from the | 186 | The examples here are taken from the |
| 182 | <filename>linux-yocto-3.4</filename> repository where "features" | 187 | <filename>linux-yocto-3.4</filename> repository where "features" |
| 183 | and "cfg" are subdirectories of the <filename>metadata</filename> | 188 | and "cfg" are subdirectories within the |
| 184 | directory. | 189 | <filename>meta/cfg/kernel-cache</filename> directory. |
| 185 | For details, see section 3.3. | 190 | For more information, see the |
| 191 | "<link linkend='metadata-syntax'>Metadata Syntax</link>" section. | ||
| 186 | <note> | 192 | <note> |
| 187 | The processing of the these variables has evolved some between the | 193 | The processing of the these variables has evolved some between the |
| 188 | 0.9 and 1.3 releases of the Yocto Project and associated | 194 | 0.9 and 1.3 releases of the Yocto Project and associated |
| @@ -275,8 +281,8 @@ metadata directory. For details, see 3.3. | |||
| 275 | </para> | 281 | </para> |
| 276 | </section> | 282 | </section> |
| 277 | 283 | ||
| 278 | <section id='metadata-location'> | 284 | <section id='kernel-metadata-location'> |
| 279 | <title>Metadata Location</title> | 285 | <title>Kernel Metadata Location</title> |
| 280 | 286 | ||
| 281 | <para> | 287 | <para> |
| 282 | This metadata can be defined along with the Linux kernel | 288 | This metadata can be defined along with the Linux kernel |
