diff options
| -rw-r--r-- | documentation/dev-manual/dev-manual-cases.xml | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-cases.xml b/documentation/dev-manual/dev-manual-cases.xml index 59c9168d6c..d57f0eabff 100644 --- a/documentation/dev-manual/dev-manual-cases.xml +++ b/documentation/dev-manual/dev-manual-cases.xml | |||
| @@ -728,6 +728,98 @@ | |||
| 728 | <title>Modifying a Kernel</title> | 728 | <title>Modifying a Kernel</title> |
| 729 | 729 | ||
| 730 | <para> | 730 | <para> |
| 731 | Kernel modification involves changing or adding configurations to an existing kernel, or | ||
| 732 | adding recipes to the kernel that are needed to support specific hardware features. | ||
| 733 | The process is similar to creating a Board Support Package (BSP) except that it does not | ||
| 734 | involve a BSP layer. | ||
| 735 | </para> | ||
| 736 | |||
| 737 | <para> | ||
| 738 | This section presents a brief overview of the kernel structure and then provides a simple | ||
| 739 | example that shows how to modify the kernel. | ||
| 740 | </para> | ||
| 741 | |||
| 742 | <section id='yocto-project-kernel-overview'> | ||
| 743 | <title>Yocto Project Kernel Overview</title> | ||
| 744 | |||
| 745 | <para> | ||
| 746 | When one thinks of the source files for a kernel they usually think of a fixed structure | ||
| 747 | of files that contain kernel patches. | ||
| 748 | The Yocto Project, however, employs mechanisims that in a sense result in a kernel source | ||
| 749 | generator. | ||
| 750 | </para> | ||
| 751 | |||
| 752 | <para> | ||
| 753 | The Yocto Project uses the source code management (SCM) tool Git to manage and track Yocto | ||
| 754 | Project files. | ||
| 755 | Git employs branching strategies that effectively produce a tree-like structure whose | ||
| 756 | branches represent diversions from more general code. | ||
| 757 | For example, suppose two kernels are basically identical with the exception of a couple | ||
| 758 | different features in each. | ||
| 759 | In the Yocto Project kernel Git repository a main branch can contain the common or shared | ||
| 760 | parts of the kernel source and two branches that diverge from that common branch can | ||
| 761 | each contain the features specific to the respective kernel. | ||
| 762 | The result is a tree whose "leaves" represent the end of a specific path that yields | ||
| 763 | a set of kernel source files necessary for a specific piece of hardware and its features. | ||
| 764 | </para> | ||
| 765 | |||
| 766 | <para> | ||
| 767 | A big advantage to this scheme is the sharing of common features by keeping them in | ||
| 768 | "larger" branches that are further up the tree. | ||
| 769 | This practice eliminates redundant storage of similar features shared among kernels. | ||
| 770 | </para> | ||
| 771 | |||
| 772 | <para> | ||
| 773 | When you build the kernel on your development system all files needed for the build | ||
| 774 | are taken from the local tree (the Git repository) and gathered in a temporary work area | ||
| 775 | where they are subsequently used to create the unique kernel. | ||
| 776 | Thus, in a sense, the process uses a local, all-inclusive source tree to generate | ||
| 777 | (or choose) the specific kernel source files you need for the build - a source | ||
| 778 | generator if you will. | ||
| 779 | </para> | ||
| 780 | |||
| 781 | <para> | ||
| 782 | For a complete discussion of the Yocto Project kernel's architcture and its branching strategy, | ||
| 783 | see the <ulink url='http://www.yoctoproject.org/docs/1.1/kernel-manual/kernel-manual.html'> | ||
| 784 | The Yocto Project Kernel Architecture and Use Manual</ulink>. | ||
| 785 | </para> | ||
| 786 | |||
| 787 | <para> | ||
| 788 | You can find a web interface to the Yocto Project source repository at | ||
| 789 | <ulink url='http://git.yoctoproject.org/'></ulink>. | ||
| 790 | Within the interface you will see groups of related source code, each of which can | ||
| 791 | be cloned using Git to result in a working Git repository on your local system. | ||
| 792 | The Yocto Project supports four types of kernels in its source repositories at | ||
| 793 | <ulink url='http://git.yoctoproject.org/'></ulink>: | ||
| 794 | <itemizedlist> | ||
| 795 | <listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The | ||
| 796 | stable Linux Yocto kernel that is based on the Linux 2.6.34 release.</para></listitem> | ||
| 797 | <listitem><para><emphasis><filename>linux-yocto-2.6.37</filename></emphasis> - The current | ||
| 798 | Linux Yocto kernel that is based on the Linux 2.6.37 release.</para></listitem> | ||
| 799 | <listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development | ||
| 800 | kernel based on the Linux 2.6.39-rc1 release.</para></listitem> | ||
| 801 | <listitem><para><emphasis><filename>linux-2.6</filename></emphasis> - A kernel based on | ||
| 802 | minimal Linux mainline tracking. | ||
| 803 | [WRITER'S NOTE: I don't know which Git repository the user needs to clone to get this | ||
| 804 | repository on their development system.]</para></listitem> | ||
| 805 | </itemizedlist> | ||
| 806 | </para> | ||
| 807 | </section> | ||
| 808 | |||
| 809 | <section id='modifying-a-kernel'> | ||
| 810 | <title>Modifying a Kernel</title> | ||
| 811 | |||
| 812 | <para> | ||
| 813 | The remainder of this section presents a simple example that modifies a kernel. | ||
| 814 | For the purpose of this example we are going to base our new kernel on the current | ||
| 815 | Linux Yocto 2.6.37 release. | ||
| 816 | |||
| 817 | |||
| 818 | |||
| 819 | |||
| 820 | |||
| 821 | |||
| 822 | <para> | ||
| 731 | [WRITER'S NOTE: This section is a second example that focuses on just modifying the kernel. | 823 | [WRITER'S NOTE: This section is a second example that focuses on just modifying the kernel. |
| 732 | I don't have any information on this yet. | 824 | I don't have any information on this yet. |
| 733 | </para> | 825 | </para> |
