diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2017-06-29 15:54:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-12 00:28:15 +0100 |
commit | b643938bdecd4ed928713c3a9b4c9f7e0e637964 (patch) | |
tree | 7dbde3901caa80b516a49eb1c7bc1a85ca819499 /documentation | |
parent | 0e92314239dc4b81a1d944b54f485292b422f982 (diff) | |
download | poky-b643938bdecd4ed928713c3a9b4c9f7e0e637964.tar.gz |
dev-manual, kernel-dev: Moved the kernel build hierarchy section
Fixes [YOCTO #11630]
The section that presented the Yocto Linux kernel file structure
resulting from a build using BitBake needed to be in the kernel-dev
manual. I moved it over. This required transferring over a
figure as well.
(From yocto-docs rev: 0abc6c7d87a6aa10dac28fefbb280eb51fea61a7)
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/Makefile | 3 | ||||
-rw-r--r-- | documentation/dev-manual/dev-manual-model.xml | 71 | ||||
-rw-r--r-- | documentation/kernel-dev/figures/kernel-overview-2-generic.png (renamed from documentation/dev-manual/figures/kernel-overview-2-generic.png) | bin | 49230 -> 49230 bytes | |||
-rw-r--r-- | documentation/kernel-dev/kernel-dev-concepts-appx.xml | 87 |
4 files changed, 91 insertions, 70 deletions
diff --git a/documentation/Makefile b/documentation/Makefile index a761c19dba..93cf6ca726 100644 --- a/documentation/Makefile +++ b/documentation/Makefile | |||
@@ -131,7 +131,6 @@ TARFILES = dev-style.css dev-manual.html \ | |||
131 | TARFILES = dev-style.css dev-manual.html \ | 131 | TARFILES = dev-style.css dev-manual.html \ |
132 | figures/dev-title.png \ | 132 | figures/dev-title.png \ |
133 | figures/kernel-dev-flow.png \ | 133 | figures/kernel-dev-flow.png \ |
134 | figures/kernel-overview-2-generic.png \ | ||
135 | figures/recipe-workflow.png \ | 134 | figures/recipe-workflow.png \ |
136 | figures/devtool-add-flow.png figures/devtool-modify-flow.png \ | 135 | figures/devtool-add-flow.png figures/devtool-modify-flow.png \ |
137 | figures/devtool-upgrade-flow.png \ | 136 | figures/devtool-upgrade-flow.png \ |
@@ -330,7 +329,7 @@ ifeq ($(DOC),kernel-dev) | |||
330 | XSLTOPTS = --xinclude | 329 | XSLTOPTS = --xinclude |
331 | ALLPREQ = html eclipse tarball | 330 | ALLPREQ = html eclipse tarball |
332 | TARFILES = kernel-dev.html kernel-dev-style.css \ | 331 | TARFILES = kernel-dev.html kernel-dev-style.css \ |
333 | figures/kernel-dev-title.png \ | 332 | figures/kernel-dev-title.png figures/kernel-overview-2-generic \ |
334 | figures/kernel-architecture-overview.png \ | 333 | figures/kernel-architecture-overview.png \ |
335 | eclipse | 334 | eclipse |
336 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse | 335 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml index 05ff369f5d..0055bccfed 100644 --- a/documentation/dev-manual/dev-manual-model.xml +++ b/documentation/dev-manual/dev-manual-model.xml | |||
@@ -82,71 +82,6 @@ | |||
82 | <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>. | 82 | <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>. |
83 | </para> | 83 | </para> |
84 | 84 | ||
85 | <section id='kernel-overview'> | ||
86 | <title>Kernel Overview</title> | ||
87 | |||
88 | <para> | ||
89 | Upstream storage of all the available kernel source code is | ||
90 | one thing, while representing and using the code on your host | ||
91 | development system is another. | ||
92 | Conceptually, you can think of the kernel source repositories | ||
93 | as all the source files necessary for all the supported | ||
94 | Yocto Linux kernels. | ||
95 | As a developer, you are just interested in the source files | ||
96 | for the kernel on which you are working. | ||
97 | And, furthermore, you need them available on your host system. | ||
98 | </para> | ||
99 | |||
100 | <para> | ||
101 | Kernel source code is available on your host system a couple | ||
102 | of different ways. | ||
103 | If you are working in the kernel all the time, you probably | ||
104 | would want to set up your own local Git repository of the | ||
105 | Yocto Linux kernel tree. | ||
106 | If you just need to make some patches to the kernel, you can | ||
107 | access temporary kernel source files that were extracted and | ||
108 | used during a build. | ||
109 | We will just talk about working with the temporary source code. | ||
110 | For more information on how to get kernel source code onto your | ||
111 | host system, see the | ||
112 | "<link linkend='local-kernel-files'>Setting Up to Work On a Kernel</link>" | ||
113 | section. | ||
114 | </para> | ||
115 | |||
116 | <para> | ||
117 | What happens during the build? | ||
118 | When you build the kernel on your development system, all files needed for the build | ||
119 | are taken from the source repositories pointed to by the | ||
120 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> variable | ||
121 | and gathered in a temporary work area | ||
122 | where they are subsequently used to create the unique kernel. | ||
123 | Thus, in a sense, the process constructs a local source tree specific to your | ||
124 | kernel to generate the new kernel image - a source generator if you will. | ||
125 | </para> | ||
126 | |||
127 | <para> | ||
128 | The following figure shows the temporary file structure | ||
129 | created on your host system when the build occurs. | ||
130 | This | ||
131 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | ||
132 | contains all the source files used during the build. | ||
133 | </para> | ||
134 | |||
135 | <para> | ||
136 | <imagedata fileref="figures/kernel-overview-2-generic.png" | ||
137 | width="6in" depth="5in" align="center" scale="100" /> | ||
138 | </para> | ||
139 | |||
140 | <para> | ||
141 | Again, for additional information on the Yocto Project kernel's | ||
142 | architecture and its branching strategy, see the | ||
143 | <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>. | ||
144 | You can also reference the | ||
145 | "<link linkend='patching-the-kernel'>Patching the Kernel</link>" | ||
146 | section for a detailed example that modifies the kernel. | ||
147 | </para> | ||
148 | </section> | ||
149 | |||
150 | <section id='kernel-modification-workflow'> | 85 | <section id='kernel-modification-workflow'> |
151 | <title>Kernel Modification Workflow</title> | 86 | <title>Kernel Modification Workflow</title> |
152 | 87 | ||
@@ -219,9 +154,9 @@ | |||
219 | Try to resist the temptation to directly edit an | 154 | Try to resist the temptation to directly edit an |
220 | existing <filename>.config</filename> file, which is | 155 | existing <filename>.config</filename> file, which is |
221 | found in the Build Directory among the source code | 156 | found in the Build Directory among the source code |
222 | used for the build (e.g. see the bottom | 157 | used for the build (e.g. see the workflow illustration |
223 | illustration in the | 158 | in the |
224 | "<link linkend='kernel-overview'>Kernel Overview</link>" | 159 | "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>" |
225 | section). | 160 | section). |
226 | Doing so, can produce unexpected results when the | 161 | Doing so, can produce unexpected results when the |
227 | OpenEmbedded build system regenerates the configuration | 162 | OpenEmbedded build system regenerates the configuration |
diff --git a/documentation/dev-manual/figures/kernel-overview-2-generic.png b/documentation/kernel-dev/figures/kernel-overview-2-generic.png index ee2cdb206b..ee2cdb206b 100644 --- a/documentation/dev-manual/figures/kernel-overview-2-generic.png +++ b/documentation/kernel-dev/figures/kernel-overview-2-generic.png | |||
Binary files differ | |||
diff --git a/documentation/kernel-dev/kernel-dev-concepts-appx.xml b/documentation/kernel-dev/kernel-dev-concepts-appx.xml index 7c9f34c729..8eb8c30dce 100644 --- a/documentation/kernel-dev/kernel-dev-concepts-appx.xml +++ b/documentation/kernel-dev/kernel-dev-concepts-appx.xml | |||
@@ -380,6 +380,93 @@ | |||
380 | cloning and building the kernel. | 380 | cloning and building the kernel. |
381 | </para> | 381 | </para> |
382 | </section> | 382 | </section> |
383 | |||
384 | <section id='kernel-build-file-hierarchy'> | ||
385 | <title>Kernel Build File Hierarchy</title> | ||
386 | |||
387 | <para> | ||
388 | Upstream storage of all the available kernel source code is | ||
389 | one thing, while representing and using the code on your host | ||
390 | development system is another. | ||
391 | Conceptually, you can think of the kernel source repositories | ||
392 | as all the source files necessary for all the supported | ||
393 | Yocto Linux kernels. | ||
394 | As a developer, you are just interested in the source files | ||
395 | for the kernel on which you are working. | ||
396 | And, furthermore, you need them available on your host system. | ||
397 | </para> | ||
398 | |||
399 | <para> | ||
400 | Kernel source code is available on your host system several | ||
401 | different ways: | ||
402 | <itemizedlist> | ||
403 | <listitem><para> | ||
404 | <emphasis>Files Accessed While using <filename>devtool</filename>:</emphasis> | ||
405 | <filename>devtool</filename>, which is available with the | ||
406 | Yocto Project, is the preferred method by which to | ||
407 | modify the kernel. | ||
408 | See the | ||
409 | "<ulink url='&YOCTO_DOCS_DEV_URL;#kernel-modification-workflow'>Kernel Modification Workflow</ulink>" | ||
410 | section in the Yocto Project Development Manual for | ||
411 | information. | ||
412 | </para></listitem> | ||
413 | <listitem><para> | ||
414 | <emphasis>Cloned Repository:</emphasis> | ||
415 | If you are working in the kernel all the time, you probably | ||
416 | would want to set up your own local Git repository of the | ||
417 | Yocto Linux kernel tree. | ||
418 | For information on how to clone a Yocto Linux kernel | ||
419 | Git repository, see the | ||
420 | "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Setting Up to Work On a Kernel</ulink>" | ||
421 | section in the Yocto Project Development Manual. | ||
422 | </para></listitem> | ||
423 | <listitem><para> | ||
424 | <emphasis>Temporary Source Files from a Build:</emphasis> | ||
425 | If you just need to make some patches to the kernel using | ||
426 | a traditional BitBake workflow (i.e. not using the | ||
427 | <filename>devtool</filename>), you can access temporary | ||
428 | kernel source files that were extracted and used during | ||
429 | a kernel build. | ||
430 | </para></listitem> | ||
431 | </itemizedlist> | ||
432 | </para> | ||
433 | |||
434 | <para> | ||
435 | The temporary kernel source files resulting from a build using | ||
436 | BitBake have a particular hierarchy. | ||
437 | When you build the kernel on your development system, all files | ||
438 | needed for the build are taken from the source repositories | ||
439 | pointed to by the | ||
440 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> | ||
441 | variable and gathered in a temporary work area where they are | ||
442 | subsequently used to create the unique kernel. | ||
443 | Thus, in a sense, the process constructs a local source tree | ||
444 | specific to your kernel from which to generate the new kernel | ||
445 | image. | ||
446 | </para> | ||
447 | |||
448 | <para> | ||
449 | The following figure shows the temporary file structure | ||
450 | created on your host system when you build the kernel using | ||
451 | Bitbake. | ||
452 | This | ||
453 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | ||
454 | contains all the source files used during the build. | ||
455 | <imagedata fileref="figures/kernel-overview-2-generic.png" | ||
456 | width="6in" depth="5in" align="center" scale="100" /> | ||
457 | </para> | ||
458 | |||
459 | <para> | ||
460 | Again, for additional information on the Yocto Project kernel's | ||
461 | architecture and its branching strategy, see the | ||
462 | "<link linkend='yocto-linux-kernel-architecture-and-branching-strategies'>Yocto Linux Kernel Architecture and Branching Strategies</link>" | ||
463 | section. | ||
464 | You can also reference the | ||
465 | "<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>" | ||
466 | section in the Yocto Project Development Manual for a detailed | ||
467 | example that modifies the kernel. | ||
468 | </para> | ||
469 | </section> | ||
383 | </appendix> | 470 | </appendix> |
384 | <!-- | 471 | <!-- |
385 | vim: expandtab tw=80 ts=4 | 472 | vim: expandtab tw=80 ts=4 |