summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2017-10-03 08:50:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-10-06 12:06:33 +0100
commit398a00a74c3dda82b7cb9fdf95718df0bf2dd0b9 (patch)
tree806474b80cbaf5b4af4250832e6bee100b3e5aac
parent214c6928897ce191360f13929990932aa22fcb34 (diff)
downloadpoky-398a00a74c3dda82b7cb9fdf95718df0bf2dd0b9.tar.gz
kernel-dev: Minor updates to the "Kernel Maintenance" appendix.
(From yocto-docs rev: eabeff4611d447be12af64f0f44c218c69da3409) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/kernel-dev/kernel-dev-maint-appx.xml147
1 files changed, 99 insertions, 48 deletions
diff --git a/documentation/kernel-dev/kernel-dev-maint-appx.xml b/documentation/kernel-dev/kernel-dev-maint-appx.xml
index 49ac9179b2..9e6fa99998 100644
--- a/documentation/kernel-dev/kernel-dev-maint-appx.xml
+++ b/documentation/kernel-dev/kernel-dev-maint-appx.xml
@@ -7,86 +7,137 @@
7 7
8 <section id='tree-construction'> 8 <section id='tree-construction'>
9 <title>Tree Construction</title> 9 <title>Tree Construction</title>
10
10 <para> 11 <para>
11 This section describes construction of the Yocto Project kernel source repositories 12 This section describes construction of the Yocto Project kernel
12 as accomplished by the Yocto Project team to create kernel repositories. 13 source repositories as accomplished by the Yocto Project team to
13 These kernel repositories are found under the heading "Yocto Linux Kernel" at 14 create Yocto Linux kernel repositories.
15 These kernel repositories are found under the heading "Yocto Linux
16 Kernel" at
14 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink> 17 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink>
15 and can be shipped as part of a Yocto Project release. 18 and are shipped as part of a Yocto Project release.
16 The team creates these repositories by 19 The team creates these repositories by compiling and executing the
17 compiling and executing the set of feature descriptions for every BSP 20 set of feature descriptions for every BSP and feature in the
18 and feature in the product. 21 product.
19 Those feature descriptions list all necessary patches, 22 Those feature descriptions list all necessary patches,
20 configuration, branching, tagging and feature divisions found in a kernel. 23 configurations, branches, tags, and feature divisions found in a
21 Thus, the Yocto Project kernel repository (or tree) is built. 24 Yocto Linux kernel.
25 Thus, the Yocto Project Linux kernel repository (or tree) is built.
22 </para> 26 </para>
27
23 <para> 28 <para>
24 The existence of this tree allows you to access and clone a particular 29 The existence of this tree allows you to access and clone a
25 Yocto Project kernel repository and use it to build images based on their configurations 30 particular Yocto Project Linux kernel repository and use it to
26 and features. 31 build images based on their configurations and features.
27 </para> 32 </para>
33
28 <para> 34 <para>
29 You can find the files used to describe all the valid features and BSPs 35 You can find the files used to describe all the valid features and
30 in the Yocto Project kernel in any clone of the Yocto Project kernel source repository 36 BSPs in the Yocto Project Linux kernel in any clone of the Yocto
31 Git tree. 37 Project Linux kernel source repository Git tree.
32 For example, the following command clones the Yocto Project baseline kernel that 38 For example, the following command clones the Yocto Project
33 branched off of <filename>linux.org</filename> version 3.19: 39 baseline Linux kernel that branches off
40 <filename>linux.org</filename> version 4.12:
34 <literallayout class='monospaced'> 41 <literallayout class='monospaced'>
35 $ git clone git://git.yoctoproject.org/linux-yocto-3.19 42 $ git clone git://git.yoctoproject.org/linux-yocto-4.12
36 </literallayout> 43 </literallayout>
37 For more information on how to set up a local Git repository of 44 For more information on how to set up a local Git repository of
38 the Yocto Project kernel files, see the 45 the Yocto Project Linux kernel files, see the
39 "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>" 46 "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>"
40 section. 47 section.
41 </para> 48 </para>
49
42 <para> 50 <para>
43 Once you have cloned the kernel Git repository on your local machine, you can 51 Once you have cloned the kernel Git repository on your local
44 switch to the <filename>meta</filename> branch within the repository. 52 machine, you can discover the branches that are avilable in the
45 Here is an example that assumes the local Git repository for the kernel is in 53 repository using the following Git command:
46 a top-level directory named <filename>linux-yocto-3.19</filename>:
47 <literallayout class='monospaced'> 54 <literallayout class='monospaced'>
48 $ cd linux-yocto-3.19 55 $ git branch -a
49 $ git checkout -b meta origin/meta
50 </literallayout> 56 </literallayout>
51 Once you have checked out and switched to the <filename>meta</filename> branch, 57 Checking out a branch allows you to work with a particular
52 you can see a snapshot of all the kernel configuration and feature descriptions that are 58 Yocto Linux kernel.
53 used to build that particular kernel repository. 59 For example, the following command checks out the
54 These descriptions are in the form of <filename>.scc</filename> files. 60 <filename>standard/beagleboard</filename> branch of the
61 repository:
62 <literallayout class='monospaced'>
63 $ cd linux-yocto-4.12
64 $ git checkout -b my-kernel-4.12 standard/beagleboard
65 </literallayout>
66 Once you have checked out and switched to the
67 <filename>standard/beagleboard</filename> branch,
68 you can see a snapshot of all the kernel source files used to
69 used to build that particular Yocto Linux kernel for that
70 particular board.
71 </para>
72
73 <para>
74 To see the features and configurations for a particular Yocto
75 Linux kernel, you need to examine the
76 <filename>yocto-kernel-cache</filename> Git repository.
77 Branches in the <filename>yocto-kernel-cache</filename> repository
78 correspond to Yocto Linux kernel versions (e.g.
79 <filename>yocto-4.12</filename>).
80 Branches contain descriptions in the form of
81 <filename>.scc</filename> and <filename>.cfg</filename> files.
55 </para> 82 </para>
83
56 <para> 84 <para>
57 You should realize, however, that browsing your local kernel repository 85 You should realize, however, that browsing your local
58 for feature descriptions and patches is not an effective way to determine what is in a 86 <filename>yocto-kernel-cache</filename> repository for feature
59 particular kernel branch. 87 descriptions and patches is not an effective way to determine what
60 Instead, you should use Git directly to discover the changes in a branch. 88 is in a particular kernel branch.
61 Using Git is an efficient and flexible way to inspect changes to the kernel. 89 Instead, you should use Git directly to discover the changes in
90 a branch.
91 Using Git is an efficient and flexible way to inspect changes to
92 the kernel.
62 <note> 93 <note>
63 Ground up reconstruction of the complete kernel tree is an action only taken by the 94 Ground up reconstruction of the complete kernel tree is an
64 Yocto Project team during an active development cycle. 95 action only taken by the Yocto Project team during an active
65 When you create a clone of the kernel Git repository, you are simply making it 96 development cycle.
66 efficiently available for building and development. 97 When you create a clone of the kernel Git repository, you are
98 simply making it efficiently available for building and
99 development.
67 </note> 100 </note>
68 </para> 101 </para>
102
69 <para> 103 <para>
70 The following steps describe what happens when the Yocto Project Team constructs 104 The following steps describe what happens when the Yocto Project
71 the Yocto Project kernel source Git repository (or tree) found at 105 Team constructs the Yocto Project kernel source Git repository
106 (or tree) found at
72 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the 107 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the
73 introduction of a new top-level kernel feature or BSP. 108 introduction of a new top-level kernel feature or BSP.
74 These are the actions that effectively create the tree 109 These are the actions that effectively create the tree
75 that includes the new feature, patch or BSP: 110 that includes the new feature, patch or BSP:
76 <orderedlist> 111 <orderedlist>
77 <listitem><para>A top-level kernel feature is passed to the kernel build subsystem. 112 <listitem><para>
78 Normally, this feature is a BSP for a particular kernel type.</para></listitem> 113 A top-level kernel feature is passed to the kernel build
79 <listitem><para>The file that describes the top-level feature is located by searching 114 subsystem.
80 these system directories: 115 Normally, this feature is a BSP for a particular kernel
116 type.
117 </para></listitem>
118 <listitem><para>
119 The file that describes the top-level feature is located
120 by searching these system directories:
81 <itemizedlist> 121 <itemizedlist>
82 <listitem><para>The in-tree kernel-cache directories, which are located 122 <listitem><para>
83 in <filename>meta/cfg/kernel-cache</filename></para></listitem> 123 The in-tree kernel-cache directories, which are
84 <listitem><para>Areas pointed to by <filename>SRC_URI</filename> statements 124 located in
85 found in recipes</para></listitem> 125 <filename>yocto-kernel-cache/cfg/kernel-cache</filename>
126 </para></listitem>
127 <listitem><para>
128 Areas pointed to by <filename>SRC_URI</filename>
129 statements found in recipes
130 </para></listitem>
86 </itemizedlist> 131 </itemizedlist>
87 For a typical build, the target of the search is a 132 For a typical build, the target of the search is a
88 feature description in an <filename>.scc</filename> file 133 feature description in an <filename>.scc</filename> file
89 whose name follows this format: 134 whose name follows this format:
135
136
137I AM HERE
138
139
140
90 <literallayout class='monospaced'> 141 <literallayout class='monospaced'>
91 <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc 142 <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
92 </literallayout> 143 </literallayout>