diff options
| -rw-r--r-- | documentation/dev-manual/dev-manual-model.xml | 46 | ||||
| -rw-r--r-- | documentation/dev-manual/figures/kernel-dev-flow.png | bin | 61779 -> 61916 bytes |
2 files changed, 28 insertions, 18 deletions
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml index d95382617a..93406eb600 100644 --- a/documentation/dev-manual/dev-manual-model.xml +++ b/documentation/dev-manual/dev-manual-model.xml | |||
| @@ -191,7 +191,7 @@ | |||
| 191 | 191 | ||
| 192 | <para> | 192 | <para> |
| 193 | Kernel modification involves changing the Linux Yocto kernel, which could involve changing | 193 | Kernel modification involves changing the Linux Yocto kernel, which could involve changing |
| 194 | configuration variables as well as adding new kernel recipes. | 194 | configuration options as well as adding new kernel recipes. |
| 195 | Configuration changes can be added in the form of configuration fragments, while recipe | 195 | Configuration changes can be added in the form of configuration fragments, while recipe |
| 196 | modification comes through the kernel's <filename>recipes-kernel</filename> area | 196 | modification comes through the kernel's <filename>recipes-kernel</filename> area |
| 197 | in a kernel layer you create. | 197 | in a kernel layer you create. |
| @@ -212,8 +212,8 @@ | |||
| 212 | <title>Kernel Overview</title> | 212 | <title>Kernel Overview</title> |
| 213 | 213 | ||
| 214 | <para> | 214 | <para> |
| 215 | When one thinks of the source files for a kernel they usually think of a fixed structure | 215 | Traditionally, when one thinks of a patched kernel, they think of a base kernel |
| 216 | of files that contain kernel patches. | 216 | source tree and a fixed structure that conains kernel patches. |
| 217 | The Yocto Project, however, employs mechanisims, that in a sense, result in a kernel source | 217 | The Yocto Project, however, employs mechanisims, that in a sense, result in a kernel source |
| 218 | generator. | 218 | generator. |
| 219 | By the end of this section, this analogy will become clearer. | 219 | By the end of this section, this analogy will become clearer. |
| @@ -239,8 +239,8 @@ | |||
| 239 | </para> | 239 | </para> |
| 240 | 240 | ||
| 241 | <para> | 241 | <para> |
| 242 | The kernels are maintained using the Git application that, in a sense, structures | 242 | The kernels are maintained using the Git revision control system |
| 243 | them in a "tree" complete with branches and leaves. | 243 | that structures them using the familiar "tree", "branch", and "leaf" scheme. |
| 244 | Branches represent diversions from general code to more specific code, while leaves | 244 | Branches represent diversions from general code to more specific code, while leaves |
| 245 | represent the end-points for a complete and unique kernel whose source files | 245 | represent the end-points for a complete and unique kernel whose source files |
| 246 | when gathered from the root of the tree to the leaf accumulate to create the files | 246 | when gathered from the root of the tree to the leaf accumulate to create the files |
| @@ -253,7 +253,7 @@ | |||
| 253 | 253 | ||
| 254 | <para> | 254 | <para> |
| 255 | Within the figure, the "Kernel.org Branch Point" represents the point in the tree | 255 | Within the figure, the "Kernel.org Branch Point" represents the point in the tree |
| 256 | where a supported base kernel diverges from the Linux kernel. | 256 | where a supported base kernel is modified from the Linux kernel. |
| 257 | For example, this could be the branch point for the <filename>linux-yocto-3.0</filename> | 257 | For example, this could be the branch point for the <filename>linux-yocto-3.0</filename> |
| 258 | kernel. | 258 | kernel. |
| 259 | Thus, everything further to the right in the structure is based on the | 259 | Thus, everything further to the right in the structure is based on the |
| @@ -267,7 +267,7 @@ | |||
| 267 | 267 | ||
| 268 | <para> | 268 | <para> |
| 269 | The overall result is a Git-maintained repository from which all the supported | 269 | The overall result is a Git-maintained repository from which all the supported |
| 270 | Yocto Project kernels can be derived for all the supported Yocto Project devices. | 270 | Yocto Project kernel types can be derived for all the supported Yocto Project devices. |
| 271 | A big advantage to this scheme is the sharing of common features by keeping them in | 271 | A big advantage to this scheme is the sharing of common features by keeping them in |
| 272 | "larger" branches within the tree. | 272 | "larger" branches within the tree. |
| 273 | This practice eliminates redundant storage of similar features shared among kernels. | 273 | This practice eliminates redundant storage of similar features shared among kernels. |
| @@ -390,7 +390,10 @@ | |||
| 390 | Project files Git repository. | 390 | Project files Git repository. |
| 391 | For information on how to get these files, see the bulleted item | 391 | For information on how to get these files, see the bulleted item |
| 392 | "<link linkend='poky-extras-repo'>The <filename>poky-extras</filename> Git Repository</link>" | 392 | "<link linkend='poky-extras-repo'>The <filename>poky-extras</filename> Git Repository</link>" |
| 393 | earlier in this manual.</para></listitem> | 393 | earlier in this manual. |
| 394 | <note>While it is certainly possible to modify the kernel without involving | ||
| 395 | a local Git repository, the suggested workflow for kernel modification | ||
| 396 | using the Yocto Project does use a Git repository.</note></para></listitem> | ||
| 394 | <listitem><para><emphasis>Establish a local copy of the Linux Yocto kernel files on your | 397 | <listitem><para><emphasis>Establish a local copy of the Linux Yocto kernel files on your |
| 395 | system</emphasis>: In order to make modifications to the kernel you need two things: | 398 | system</emphasis>: In order to make modifications to the kernel you need two things: |
| 396 | a bare clone of the Linux Yocto kernel you are modifying and | 399 | a bare clone of the Linux Yocto kernel you are modifying and |
| @@ -412,7 +415,7 @@ | |||
| 412 | Once the changes are made, you need to use Git commands to commit the changes | 415 | Once the changes are made, you need to use Git commands to commit the changes |
| 413 | and then push them to the bare clone.</para></listitem> | 416 | and then push them to the bare clone.</para></listitem> |
| 414 | <listitem><para><emphasis>Make kernel configuration changes | 417 | <listitem><para><emphasis>Make kernel configuration changes |
| 415 | to your local kernel layer if applicable</emphasis>: | 418 | if applicable</emphasis>: |
| 416 | If your situation calls for changing the kernel's configuration, you can | 419 | If your situation calls for changing the kernel's configuration, you can |
| 417 | use <filename>menuconfig</filename> | 420 | use <filename>menuconfig</filename> |
| 418 | to enable and disable kernel configurations. | 421 | to enable and disable kernel configurations. |
| @@ -420,11 +423,18 @@ | |||
| 420 | configuration changes you are making to the kernel. | 423 | configuration changes you are making to the kernel. |
| 421 | When saved, changes using <filename>menuconfig</filename> update the kernel's | 424 | When saved, changes using <filename>menuconfig</filename> update the kernel's |
| 422 | <filename>.config</filename>. | 425 | <filename>.config</filename>. |
| 423 | As an alternative method to changing the kernel's configuration, you can simply | 426 | Try to resist the temptation of directly editing the <filename>.config</filename> |
| 424 | edit the <filename>.config</filename> found in the Yocto Project build | 427 | file found in the Yocto Project build directory at |
| 425 | directory at <filename>tmp/sysroots/<machine-name>/kernel</filename> | 428 | <filename>tmp/sysroots/<machine-name>/kernel</filename>. |
| 426 | directly.</para></listitem> | 429 | Doing so, can produce unexpected results when the Yocto Project build system |
| 427 | <listitem><para><emphasis>Add new kernel recipes if applicable</emphasis>: The standard | 430 | regenerates the configuration file.</para> |
| 431 | <para>Once you are satisfied with the configuration changes made using | ||
| 432 | <filename>menuconfig</filename>, you can directly examine the | ||
| 433 | <filename>.config</filename> file against a saved original and gather those | ||
| 434 | changes into a config fragment to be placed inside a | ||
| 435 | <filename>.bbappend</filename></para></listitem> | ||
| 436 | <listitem><para><emphasis>Add or extend kernel recipes if applicable</emphasis>: | ||
| 437 | The standard | ||
| 428 | layer structure organizes recipe files inside the | 438 | layer structure organizes recipe files inside the |
| 429 | <filename>meta-kernel-dev</filename> layer that is within the | 439 | <filename>meta-kernel-dev</filename> layer that is within the |
| 430 | <filename>poky-extras</filename> Git repository. | 440 | <filename>poky-extras</filename> Git repository. |
| @@ -465,10 +475,10 @@ | |||
| 465 | which allows you to distribute the layer.</para></listitem> | 475 | which allows you to distribute the layer.</para></listitem> |
| 466 | <listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>: | 476 | <listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>: |
| 467 | If the changes you made | 477 | If the changes you made |
| 468 | are suited for all Linux Yocto users, you might want to push the changes to a | 478 | are suited for all Linux Yocto users, you might want to send them on for inclusion |
| 469 | contribution area for the Linux Yocto Git repository. | 479 | into the Linux Yocto Git repository. |
| 470 | Once the changes are pushed, you can request that they | 480 | If the changes are accepted, the Yocto Project Maintainer pulls them into |
| 471 | be pulled into the master branch of the kernel tree. | 481 | the master branch of the kernel tree. |
| 472 | Doing so makes them available to everyone using the kernel.</para></listitem> | 482 | Doing so makes them available to everyone using the kernel.</para></listitem> |
| 473 | </orderedlist> | 483 | </orderedlist> |
| 474 | </para> | 484 | </para> |
diff --git a/documentation/dev-manual/figures/kernel-dev-flow.png b/documentation/dev-manual/figures/kernel-dev-flow.png index 11fdda5eaa..f200af6338 100644 --- a/documentation/dev-manual/figures/kernel-dev-flow.png +++ b/documentation/dev-manual/figures/kernel-dev-flow.png | |||
| Binary files differ | |||
