diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2017-10-03 12:36:57 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-10-06 12:06:34 +0100 |
commit | cb9150394dd430f5829a89bceb3bf5cc7a90dc13 (patch) | |
tree | cc155ab519cfee4ceaaff1284c92472a3f40563f /documentation | |
parent | 766770aa35626c8598b849346b6c79335ba1f9e4 (diff) | |
download | poky-cb9150394dd430f5829a89bceb3bf5cc7a90dc13.tar.gz |
kernel-dev: Edits to "Build Strategy" section.
This section was written before the yocto-kernel-cache strategy
existed and was thus incorrect. I updated it with how I understand
things to work.
(From yocto-docs rev: 629f24c9312a168ddcd28b0d9dde92ff06068483)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/kernel-dev/kernel-dev-maint-appx.xml | 101 |
1 files changed, 63 insertions, 38 deletions
diff --git a/documentation/kernel-dev/kernel-dev-maint-appx.xml b/documentation/kernel-dev/kernel-dev-maint-appx.xml index 4575c90df9..79e6e26e00 100644 --- a/documentation/kernel-dev/kernel-dev-maint-appx.xml +++ b/documentation/kernel-dev/kernel-dev-maint-appx.xml | |||
@@ -56,7 +56,7 @@ | |||
56 | <para> | 56 | <para> |
57 | Once you have cloned the kernel Git repository and the | 57 | Once you have cloned the kernel Git repository and the |
58 | cache of Metadata on your local machine, you can discover the | 58 | cache of Metadata on your local machine, you can discover the |
59 | branches that are avilable in the repository using the following | 59 | branches that are available in the repository using the following |
60 | Git command: | 60 | Git command: |
61 | <literallayout class='monospaced'> | 61 | <literallayout class='monospaced'> |
62 | $ git branch -a | 62 | $ git branch -a |
@@ -188,7 +188,7 @@ | |||
188 | <emphasis>Clone Base Repository:</emphasis> | 188 | <emphasis>Clone Base Repository:</emphasis> |
189 | The base repository is cloned, and the actions | 189 | The base repository is cloned, and the actions |
190 | listed in the <filename>yocto-kernel-cache</filename> | 190 | listed in the <filename>yocto-kernel-cache</filename> |
191 | irectories are applied to the tree. | 191 | directories are applied to the tree. |
192 | </para></listitem> | 192 | </para></listitem> |
193 | <listitem><para> | 193 | <listitem><para> |
194 | <emphasis>Perform Cleanup:</emphasis> | 194 | <emphasis>Perform Cleanup:</emphasis> |
@@ -228,74 +228,99 @@ | |||
228 | <title>Build Strategy</title> | 228 | <title>Build Strategy</title> |
229 | 229 | ||
230 | <para> | 230 | <para> |
231 | Once a local Git repository of the Yocto Project kernel exists on a development system, | 231 | Once you have cloned a Yocto Linux kernel repository and the |
232 | you can consider the compilation phase of kernel development - building a kernel image. | 232 | cache repository (<filename>yocto-kernel-cache</filename>) onto |
233 | Some prerequisites exist that are validated by the build process before compilation | 233 | your development system, you can consider the compilation phase |
234 | starts: | 234 | of kernel development, which is building a kernel image. |
235 | Some prerequisites exist that are validated by the build process | ||
236 | before compilation starts: | ||
235 | </para> | 237 | </para> |
236 | 238 | ||
237 | <itemizedlist> | 239 | <itemizedlist> |
238 | <listitem><para>The | 240 | <listitem><para> |
239 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> points | 241 | The |
240 | to the kernel Git repository.</para></listitem> | 242 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> |
241 | <listitem><para>A BSP build branch exists. | 243 | points to the kernel Git repository. |
242 | This branch has the following form: | 244 | </para></listitem> |
245 | <listitem><para> | ||
246 | A BSP build branch with Metadata exists in the | ||
247 | <filename>yocto-kernel-cache</filename> repository. | ||
248 | The branch is based on the Yocto Linux kernel version and | ||
249 | has configurations and features grouped under the | ||
250 | <filename>yocto-kernel-cache/bsp</filename> directory. | ||
251 | For example, features and configurations for the | ||
252 | BeagleBone Board assuming a | ||
253 | <filename>linux-yocto_4.12</filename> kernel reside in the | ||
254 | following area of the <filename>yocto-kernel-cache</filename> | ||
255 | repository: | ||
243 | <literallayout class='monospaced'> | 256 | <literallayout class='monospaced'> |
244 | <replaceable>kernel_type</replaceable>/<replaceable>bsp_name</replaceable> | 257 | yocto-kernel-cache/bsp/beaglebone |
245 | </literallayout></para></listitem> | 258 | </literallayout> |
259 | <note> | ||
260 | In the previous example, the "yocto-4.12" branch is | ||
261 | checked out in the <filename>yocto-kernel-cache</filename> | ||
262 | repository. | ||
263 | </note> | ||
264 | </para></listitem> | ||
246 | </itemizedlist> | 265 | </itemizedlist> |
247 | 266 | ||
248 | <para> | 267 | <para> |
249 | The OpenEmbedded build system makes sure these conditions exist before attempting compilation. | 268 | The OpenEmbedded build system makes sure these conditions exist |
269 | before attempting compilation. | ||
250 | Other means, however, do exist, such as as bootstrapping a BSP. | 270 | Other means, however, do exist, such as as bootstrapping a BSP. |
251 | </para> | 271 | </para> |
252 | 272 | ||
253 | <para> | 273 | <para> |
254 | Before building a kernel, the build process verifies the tree | 274 | Before building a kernel, the build process verifies the tree |
255 | and configures the kernel by processing all of the | 275 | and configures the kernel by processing all of the |
256 | configuration "fragments" specified by feature descriptions in the <filename>.scc</filename> | 276 | configuration "fragments" specified by feature descriptions |
257 | files. | 277 | in the <filename>.scc</filename> files. |
258 | As the features are compiled, associated kernel configuration fragments are noted | 278 | As the features are compiled, associated kernel configuration |
259 | and recorded in the <filename>meta-*</filename> series of directories in their compilation order. | 279 | fragments are noted and recorded in the series of directories |
260 | The fragments are migrated, pre-processed and passed to the Linux Kernel | 280 | in their compilation order. |
261 | Configuration subsystem (<filename>lkc</filename>) as raw input in the form | 281 | The fragments are migrated, pre-processed and passed to the |
262 | of a <filename>.config</filename> file. | 282 | Linux Kernel Configuration subsystem (<filename>lkc</filename>) as |
263 | The <filename>lkc</filename> uses its own internal dependency constraints to do the final | 283 | raw input in the form of a <filename>.config</filename> file. |
264 | processing of that information and generates the final <filename>.config</filename> file | 284 | The <filename>lkc</filename> uses its own internal dependency |
265 | that is used during compilation. | 285 | constraints to do the final processing of that information and |
286 | generates the final <filename>.config</filename> file that is used | ||
287 | during compilation. | ||
266 | </para> | 288 | </para> |
267 | 289 | ||
268 | <para> | 290 | <para> |
269 | Using the board's architecture and other relevant values from the board's template, | 291 | Using the board's architecture and other relevant values from |
270 | kernel compilation is started and a kernel image is produced. | 292 | the board's template, kernel compilation is started and a kernel |
293 | image is produced. | ||
271 | </para> | 294 | </para> |
272 | 295 | ||
273 | <para> | 296 | <para> |
274 | The other thing that you notice once you configure a kernel is that | 297 | The other thing that you notice once you configure a kernel is that |
275 | the build process generates a build tree that is separate from your kernel's local Git | 298 | the build process generates a build tree that is separate from |
276 | source repository tree. | 299 | your kernel's local Git source repository tree. |
277 | This build tree has a name that uses the following form, where | 300 | This build tree has a name that uses the following form, where |
278 | <filename>${MACHINE}</filename> is the metadata name of the machine (BSP) and "kernel_type" is one | 301 | <filename>${MACHINE}</filename> is the metadata name of the |
279 | of the Yocto Project supported kernel types (e.g. "standard"): | 302 | machine (BSP) and "kernel_type" is one of the Yocto Project |
303 | supported kernel types (e.g. "standard"): | ||
280 | <literallayout class='monospaced'> | 304 | <literallayout class='monospaced'> |
281 | linux-${MACHINE}-<replaceable>kernel_type</replaceable>-build | 305 | linux-${MACHINE}-<replaceable>kernel_type</replaceable>-build |
282 | </literallayout> | 306 | </literallayout> |
283 | </para> | 307 | </para> |
284 | 308 | ||
285 | <para> | 309 | <para> |
286 | The existing support in the <filename>kernel.org</filename> tree achieves this | 310 | The existing support in the <filename>kernel.org</filename> tree |
287 | default functionality. | 311 | achieves this default functionality. |
288 | </para> | 312 | </para> |
289 | 313 | ||
290 | <para> | 314 | <para> |
291 | This behavior means that all the generated files for a particular machine or BSP are now in | 315 | This behavior means that all the generated files for a particular |
292 | the build tree directory. | 316 | machine or BSP are now in the build tree directory. |
293 | The files include the final <filename>.config</filename> file, all the <filename>.o</filename> | 317 | The files include the final <filename>.config</filename> file, |
294 | files, the <filename>.a</filename> files, and so forth. | 318 | all the <filename>.o</filename> files, the <filename>.a</filename> |
319 | files, and so forth. | ||
295 | Since each machine or BSP has its own separate | 320 | Since each machine or BSP has its own separate |
296 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | 321 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> |
297 | in its own separate branch | 322 | in its own separate branch of the Git repository, you can easily |
298 | of the Git repository, you can easily switch between different builds. | 323 | switch between different builds. |
299 | </para> | 324 | </para> |
300 | </section> | 325 | </section> |
301 | </appendix> | 326 | </appendix> |