summaryrefslogtreecommitdiffstats
path: root/documentation/kernel-dev/kernel-dev-intro.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/kernel-dev/kernel-dev-intro.xml')
-rw-r--r--documentation/kernel-dev/kernel-dev-intro.xml124
1 files changed, 124 insertions, 0 deletions
diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml
index 899ed65db2..9080ddc1b8 100644
--- a/documentation/kernel-dev/kernel-dev-intro.xml
+++ b/documentation/kernel-dev/kernel-dev-intro.xml
@@ -90,6 +90,130 @@
90 </para> 90 </para>
91</section> 91</section>
92 92
93<section id='preparing-the-build-host-to-work-on-the-kernel'>
94 <title>Preparing the Build Host to Work on the Kernel</title>
95
96 <para>
97 Kernel development is best accomplished using
98 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename></ulink>
99 and not through traditional kernel workflow methods.
100 This section provides information for both scenarios.
101 </para>
102
103 <section id='getting-ready-to-develop-using-devtool'>
104 <title>Getting Ready to Develop using <filename>devtool</filename></title>
105
106 <para role='writernotes'>
107 Need the updated wiki stuff here
108 </para>
109 </section>
110
111 <section id='getting-ready-for-traditional-kernel-development'>
112 <title>Getting Ready for Traditional Kernel Development</title>
113
114 <para>
115 For traditional kernel development using the Yocto
116 Project, you need to establish local copies of the
117 kernel source.
118 You can find Git repositories of supported Yocto Project
119 kernels organized under "Yocto Linux Kernel" in the Yocto
120 Project Source Repositories at
121 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
122 </para>
123
124 <para>
125 This setup can involve creating a bare clone of the
126 Yocto Project kernel and then copying that cloned
127 repository.
128 You can create the bare clone and the copy of the bare
129 clone anywhere you like.
130 For simplicity, it is recommended that you create these
131 structures outside of the
132 <ulink url='&YOCTO_DOCS_REF_URL;source-directory'>Source Directory</ulink>,
133 which is usually named <filename>poky</filename>.
134 </para>
135
136 <para>
137 The following steps show how to create a bare clone of the
138 <filename>linux-yocto-4.4</filename> kernel and then
139 create a copy of that clone:
140 <note>
141 When you have a local Yocto Project kernel Git
142 repository, you can reference that repository rather than
143 the upstream Git repository as part of the
144 <filename>clone</filename> command.
145 Doing so can speed up the process.
146 </note>
147 <orderedlist>
148 <listitem><para>
149 <emphasis>Create the Bare Clone:</emphasis>
150 In the following example, the bare clone is named
151 <filename>linux-yocto-4.4.git</filename>:
152 <literallayout class='monospaced'>
153 $ git clone &dash;&dash;bare git://git.yoctoproject.org/linux-yocto-4.4 linux-yocto-4.4.git
154 Cloning into bare repository 'linux-yocto-4.4.git'...
155 remote: Counting objects: 4543903, done.
156 remote: Compressing objects: 100% (695618/695618), done.
157 remote: Total 4543903 (delta 3818435), reused 4541724 (delta 3816256)
158 Receiving objects: 100% (4543903/4543903), 801.08 MiB | 6.55 MiB/s, done.
159 Resolving deltas: 100% (3818435/3818435), done.
160 Checking connectivity... done.
161 </literallayout>
162 </para></listitem>
163 <listitem><para>
164 <emphasis>Create the Copy of the Bare Clone:</emphasis>
165 In the following command, the copy of the bare clone
166 is named <filename>my-linux-yocto-4.4-work</filename>:
167 <literallayout class='monospaced'>
168 $ git clone linux-yocto-4.4.git my-linux-yocto-4.4-work
169 Cloning into 'my-linux-yocto-4.4-work'...
170 done.
171 Checking out files: 100% (52221/52221), done.
172 </literallayout>
173 </para></listitem>
174 <listitem><para>
175 <emphasis>Cloning the <filename>meta-yocto-kernel-extras</filename> Repository:</emphasis>
176 The <filename>meta-yocto-kernel-extras</filename> Git
177 repository contains Metadata needed only if you are
178 modifying and building the kernel image.
179 In particular, it contains the kernel BitBake append
180 (<filename>.bbappend</filename>) files that you edit to
181 point to your locally modified kernel source files and
182 to build the kernel image.
183 Pointing to these local files is much more efficient
184 than requiring a download of the kernel's source files
185 from upstream each time you make changes to the kernel.
186 </para>
187
188 <para>You can find the
189 <filename>meta-yocto-kernel-extras</filename> Git
190 Repository in the "Yocto Metadata Layers" area of the
191 Yocto Project Source Repositories at
192 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
193 It is good practice to create this Git repository
194 inside the Source Directory.</para>
195
196 <para>Following is an example that creates the
197 <filename>meta-yocto-kernel-extras</filename> Git
198 repository inside the Source Directory, which is named
199 <filename>poky</filename>, in this case:
200 <literallayout class='monospaced'>
201 $ cd ~/poky
202 $ git clone git://git.yoctoproject.org/meta-yocto-kernel-extras meta-yocto-kernel-extras
203 Cloning into 'meta-yocto-kernel-extras'...
204 remote: Counting objects: 727, done.
205 remote: Compressing objects: 100% (452/452), done.
206 remote: Total 727 (delta 260), reused 719 (delta 252)
207 Receiving objects: 100% (727/727), 536.36 KiB | 0 bytes/s, done.
208 Resolving deltas: 100% (260/260), done.
209 Checking connectivity... done.
210 </literallayout>
211 </para></listitem>
212 </orderedlist>
213 </para>
214 </section>
215</section>
216
93<section id='kernel-modification-workflow'> 217<section id='kernel-modification-workflow'>
94 <title>Kernel Modification Workflow</title> 218 <title>Kernel Modification Workflow</title>
95 219