diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-12-07 17:23:56 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-11 16:15:24 +0000 |
commit | 72d01bf43da4d6761ee1b5997307c64152ec3517 (patch) | |
tree | a1b95e8fd3a4489343205eb5f67cb1937efb6f9c /documentation/dev-manual/dev-manual-kernel-appendix-orig.xml | |
parent | eb8c9e1494692583f77d83267f78d5d88a79973d (diff) | |
download | poky-72d01bf43da4d6761ee1b5997307c64152ec3517.tar.gz |
documentation: dev-manual - Removed all trailing whitespace.
(From yocto-docs rev: d117584a589460412a7fc4df15512b0d9c9448c7)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/dev-manual-kernel-appendix-orig.xml')
-rw-r--r-- | documentation/dev-manual/dev-manual-kernel-appendix-orig.xml | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/documentation/dev-manual/dev-manual-kernel-appendix-orig.xml b/documentation/dev-manual/dev-manual-kernel-appendix-orig.xml index 6ea77d030c..7765feb9c1 100644 --- a/documentation/dev-manual/dev-manual-kernel-appendix-orig.xml +++ b/documentation/dev-manual/dev-manual-kernel-appendix-orig.xml | |||
@@ -7,16 +7,16 @@ | |||
7 | <title>Kernel Modification Example</title> | 7 | <title>Kernel Modification Example</title> |
8 | 8 | ||
9 | <para> | 9 | <para> |
10 | Kernel modification involves changing or adding configurations to an existing kernel, | 10 | Kernel modification involves changing or adding configurations to an existing kernel, |
11 | changing or adding recipes to the kernel that are needed to support specific hardware features, | 11 | changing or adding recipes to the kernel that are needed to support specific hardware features, |
12 | or even altering the source code itself. | 12 | or even altering the source code itself. |
13 | This appendix presents simple examples that modify the kernel source code, | 13 | This appendix presents simple examples that modify the kernel source code, |
14 | change the kernel configuration, and add a kernel source recipe. | 14 | change the kernel configuration, and add a kernel source recipe. |
15 | <note> | 15 | <note> |
16 | You can use the <filename>yocto-kernel</filename> script | 16 | You can use the <filename>yocto-kernel</filename> script |
17 | found in the <link linkend='source-directory'>Source Directory</link> | 17 | found in the <link linkend='source-directory'>Source Directory</link> |
18 | under <filename>scripts</filename> to manage kernel patches and configuration. | 18 | under <filename>scripts</filename> to manage kernel patches and configuration. |
19 | See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>" | 19 | See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>" |
20 | section in the Yocto Project Board Support Packages (BSP) Developer's Guide for | 20 | section in the Yocto Project Board Support Packages (BSP) Developer's Guide for |
21 | more information.</note> | 21 | more information.</note> |
22 | </para> | 22 | </para> |
@@ -25,87 +25,87 @@ | |||
25 | <title>Modifying the Kernel Source Code</title> | 25 | <title>Modifying the Kernel Source Code</title> |
26 | 26 | ||
27 | <para> | 27 | <para> |
28 | This example adds some simple QEMU emulator console output at boot time by | 28 | This example adds some simple QEMU emulator console output at boot time by |
29 | adding <filename>printk</filename> statements to the kernel's | 29 | adding <filename>printk</filename> statements to the kernel's |
30 | <filename>calibrate.c</filename> source code file. | 30 | <filename>calibrate.c</filename> source code file. |
31 | Booting the modified image causes the added messages to appear on the emulator's | 31 | Booting the modified image causes the added messages to appear on the emulator's |
32 | console. | 32 | console. |
33 | </para> | 33 | </para> |
34 | 34 | ||
35 | <section id='understanding-the-files-you-need'> | 35 | <section id='understanding-the-files-you-need'> |
36 | <title>Understanding the Files You Need</title> | 36 | <title>Understanding the Files You Need</title> |
37 | 37 | ||
38 | <para> | 38 | <para> |
39 | Before you modify the kernel, you need to know what Git repositories and file | 39 | Before you modify the kernel, you need to know what Git repositories and file |
40 | structures you need. | 40 | structures you need. |
41 | Briefly, you need the following: | 41 | Briefly, you need the following: |
42 | <itemizedlist> | 42 | <itemizedlist> |
43 | <listitem><para>A local | 43 | <listitem><para>A local |
44 | <link linkend='source-directory'>Source Directory</link> for the | 44 | <link linkend='source-directory'>Source Directory</link> for the |
45 | poky Git repository</para></listitem> | 45 | poky Git repository</para></listitem> |
46 | <listitem><para>Local copies of the | 46 | <listitem><para>Local copies of the |
47 | <link linkend='poky-extras-repo'><filename>poky-extras</filename></link> | 47 | <link linkend='poky-extras-repo'><filename>poky-extras</filename></link> |
48 | Git repository placed within the Source Directory.</para></listitem> | 48 | Git repository placed within the Source Directory.</para></listitem> |
49 | <listitem><para>A bare clone of the | 49 | <listitem><para>A bare clone of the |
50 | <link linkend='local-kernel-files'>Yocto Project Kernel</link> upstream Git | 50 | <link linkend='local-kernel-files'>Yocto Project Kernel</link> upstream Git |
51 | repository to which you want to push your modifications. | 51 | repository to which you want to push your modifications. |
52 | </para></listitem> | 52 | </para></listitem> |
53 | <listitem><para>A copy of that bare clone in which you make your source | 53 | <listitem><para>A copy of that bare clone in which you make your source |
54 | modifications</para></listitem> | 54 | modifications</para></listitem> |
55 | </itemizedlist> | 55 | </itemizedlist> |
56 | </para> | 56 | </para> |
57 | 57 | ||
58 | <para> | 58 | <para> |
59 | The following figure summarizes these four areas. | 59 | The following figure summarizes these four areas. |
60 | Within each rectangular that represents a data structure, a | 60 | Within each rectangular that represents a data structure, a |
61 | host development directory pathname appears at the | 61 | host development directory pathname appears at the |
62 | lower left-hand corner of the box. | 62 | lower left-hand corner of the box. |
63 | These pathnames are the locations used in this example. | 63 | These pathnames are the locations used in this example. |
64 | The figure also provides key statements and commands used during the kernel | 64 | The figure also provides key statements and commands used during the kernel |
65 | modification process: | 65 | modification process: |
66 | </para> | 66 | </para> |
67 | 67 | ||
68 | <para> | 68 | <para> |
69 | <imagedata fileref="figures/kernel-example-repos-generic.png" width="7in" depth="5in" | 69 | <imagedata fileref="figures/kernel-example-repos-generic.png" width="7in" depth="5in" |
70 | align="center" scale="100" /> | 70 | align="center" scale="100" /> |
71 | </para> | 71 | </para> |
72 | 72 | ||
73 | <para> | 73 | <para> |
74 | Here is a brief description of the four areas: | 74 | Here is a brief description of the four areas: |
75 | <itemizedlist> | 75 | <itemizedlist> |
76 | <listitem><para><emphasis>Local Source Directory:</emphasis> | 76 | <listitem><para><emphasis>Local Source Directory:</emphasis> |
77 | This area contains all the metadata that supports building images | 77 | This area contains all the metadata that supports building images |
78 | using the OpenEmbedded build system. | 78 | using the OpenEmbedded build system. |
79 | In this example, the | 79 | In this example, the |
80 | <link linkend='source-directory'>Source Directory</link> also | 80 | <link linkend='source-directory'>Source Directory</link> also |
81 | contains the | 81 | contains the |
82 | <link linkend='build-directory'>Build Directory</link>, | 82 | <link linkend='build-directory'>Build Directory</link>, |
83 | which contains the configuration directory | 83 | which contains the configuration directory |
84 | that lets you control the build. | 84 | that lets you control the build. |
85 | Also in this example, the Source Directory contains local copies of the | 85 | Also in this example, the Source Directory contains local copies of the |
86 | <filename>poky-extras</filename> Git repository.</para> | 86 | <filename>poky-extras</filename> Git repository.</para> |
87 | <para>See the bulleted item | 87 | <para>See the bulleted item |
88 | "<link linkend='local-yp-release'>Yocto Project Release</link>" | 88 | "<link linkend='local-yp-release'>Yocto Project Release</link>" |
89 | for information on how to get these files on your local system.</para></listitem> | 89 | for information on how to get these files on your local system.</para></listitem> |
90 | <listitem><para><emphasis>Local copies of the <filename>poky-extras</filename> Git Repository:</emphasis> | 90 | <listitem><para><emphasis>Local copies of the <filename>poky-extras</filename> Git Repository:</emphasis> |
91 | This area contains the <filename>meta-kernel-dev</filename> layer, | 91 | This area contains the <filename>meta-kernel-dev</filename> layer, |
92 | which is where you make changes that append the kernel build recipes. | 92 | which is where you make changes that append the kernel build recipes. |
93 | You edit <filename>.bbappend</filename> files to locate your | 93 | You edit <filename>.bbappend</filename> files to locate your |
94 | local kernel source files and to identify the kernel being built. | 94 | local kernel source files and to identify the kernel being built. |
95 | This Git repository is a gathering place for extensions to the Yocto Project | 95 | This Git repository is a gathering place for extensions to the Yocto Project |
96 | (or really any) kernel recipes that faciliate the creation and development | 96 | (or really any) kernel recipes that faciliate the creation and development |
97 | of kernel features, BSPs or configurations.</para> | 97 | of kernel features, BSPs or configurations.</para> |
98 | <para>See the bulleted item | 98 | <para>See the bulleted item |
99 | "<link linkend='poky-extras-repo'>The | 99 | "<link linkend='poky-extras-repo'>The |
100 | <filename>poky-extras</filename> Git Repository</link>" | 100 | <filename>poky-extras</filename> Git Repository</link>" |
101 | for information on how to get these files.</para></listitem> | 101 | for information on how to get these files.</para></listitem> |
102 | <listitem><para><emphasis>Bare Clone of the Yocto Project kernel:</emphasis> | 102 | <listitem><para><emphasis>Bare Clone of the Yocto Project kernel:</emphasis> |
103 | This bare Git repository tracks the upstream Git repository of the Linux | 103 | This bare Git repository tracks the upstream Git repository of the Linux |
104 | Yocto kernel source code you are changing. | 104 | Yocto kernel source code you are changing. |
105 | When you modify the kernel you must work through a bare clone. | 105 | When you modify the kernel you must work through a bare clone. |
106 | All source code changes you make to the kernel must be committed and | 106 | All source code changes you make to the kernel must be committed and |
107 | pushed to the bare clone using Git commands. | 107 | pushed to the bare clone using Git commands. |
108 | As mentioned, the <filename>.bbappend</filename> file in the | 108 | As mentioned, the <filename>.bbappend</filename> file in the |
109 | <filename>poky-extras</filename> repository points to the bare clone | 109 | <filename>poky-extras</filename> repository points to the bare clone |
110 | so that the build process can locate the locally changed source files.</para> | 110 | so that the build process can locate the locally changed source files.</para> |
111 | <para>See the bulleted item | 111 | <para>See the bulleted item |
@@ -113,16 +113,16 @@ | |||
113 | for information on how to set up the bare clone. | 113 | for information on how to set up the bare clone. |
114 | </para></listitem> | 114 | </para></listitem> |
115 | <listitem><para><emphasis>Copy of the Yocto Project Kernel Bare Clone:</emphasis> | 115 | <listitem><para><emphasis>Copy of the Yocto Project Kernel Bare Clone:</emphasis> |
116 | This Git repository contains the actual source files that you modify. | 116 | This Git repository contains the actual source files that you modify. |
117 | Any changes you make to files in this location need to ultimately be pushed | 117 | Any changes you make to files in this location need to ultimately be pushed |
118 | to the bare clone using the <filename>git push</filename> command.</para> | 118 | to the bare clone using the <filename>git push</filename> command.</para> |
119 | <para>See the bulleted item | 119 | <para>See the bulleted item |
120 | "<link linkend='local-kernel-files'>Yocto Project Kernel</link>" | 120 | "<link linkend='local-kernel-files'>Yocto Project Kernel</link>" |
121 | for information on how to set up the bare clone. | 121 | for information on how to set up the bare clone. |
122 | <note>Typically, Git workflows follow a scheme where changes made to a local area | 122 | <note>Typically, Git workflows follow a scheme where changes made to a local area |
123 | are pulled into a Git repository. | 123 | are pulled into a Git repository. |
124 | However, because the <filename>git pull</filename> command does not work | 124 | However, because the <filename>git pull</filename> command does not work |
125 | with bare clones, this workflow pushes changes to the | 125 | with bare clones, this workflow pushes changes to the |
126 | repository even though you could use other more complicated methods to | 126 | repository even though you could use other more complicated methods to |
127 | get changes into the bare clone.</note> | 127 | get changes into the bare clone.</note> |
128 | </para></listitem> | 128 | </para></listitem> |
@@ -134,11 +134,11 @@ | |||
134 | <title>Setting Up the Local Source Directory</title> | 134 | <title>Setting Up the Local Source Directory</title> |
135 | 135 | ||
136 | <para> | 136 | <para> |
137 | You can set up the | 137 | You can set up the |
138 | <link linkend='source-directory'>Source Directory</link> | 138 | <link linkend='source-directory'>Source Directory</link> |
139 | through tarball extraction or by | 139 | through tarball extraction or by |
140 | cloning the <filename>poky</filename> Git repository. | 140 | cloning the <filename>poky</filename> Git repository. |
141 | This example uses <filename>poky</filename> as the root directory of the | 141 | This example uses <filename>poky</filename> as the root directory of the |
142 | local Source Directory. | 142 | local Source Directory. |
143 | See the bulleted item | 143 | See the bulleted item |
144 | "<link linkend='local-yp-release'>Yocto Project Release</link>" | 144 | "<link linkend='local-yp-release'>Yocto Project Release</link>" |
@@ -146,17 +146,17 @@ | |||
146 | </para> | 146 | </para> |
147 | 147 | ||
148 | <para> | 148 | <para> |
149 | Once you have Source Directory set up, | 149 | Once you have Source Directory set up, |
150 | you have many development branches from which you can work. | 150 | you have many development branches from which you can work. |
151 | From inside the local repository you can see the branch names and the tag names used | 151 | From inside the local repository you can see the branch names and the tag names used |
152 | in the upstream Git repository by using either of the following commands: | 152 | in the upstream Git repository by using either of the following commands: |
153 | <literallayout class='monospaced'> | 153 | <literallayout class='monospaced'> |
154 | $ cd poky | 154 | $ cd poky |
155 | $ git branch -a | 155 | $ git branch -a |
156 | $ git tag -l | 156 | $ git tag -l |
157 | </literallayout> | 157 | </literallayout> |
158 | This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;", | 158 | This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;", |
159 | which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository. | 159 | which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository. |
160 | The following commands create and checkout the local <filename>&DISTRO_NAME;</filename> | 160 | The following commands create and checkout the local <filename>&DISTRO_NAME;</filename> |
161 | branch: | 161 | branch: |
162 | <literallayout class='monospaced'> | 162 | <literallayout class='monospaced'> |
@@ -171,20 +171,20 @@ | |||
171 | <title>Setting Up the Local poky-extras Git Repository</title> | 171 | <title>Setting Up the Local poky-extras Git Repository</title> |
172 | 172 | ||
173 | <para> | 173 | <para> |
174 | This example creates a local copy of the <filename>poky-extras</filename> Git | 174 | This example creates a local copy of the <filename>poky-extras</filename> Git |
175 | repository inside the <filename>poky</filename> Source Directory. | 175 | repository inside the <filename>poky</filename> Source Directory. |
176 | See the bulleted item "<link linkend='poky-extras-repo'>The | 176 | See the bulleted item "<link linkend='poky-extras-repo'>The |
177 | <filename>poky-extras</filename> Git Repository</link>" | 177 | <filename>poky-extras</filename> Git Repository</link>" |
178 | for information on how to set up a local copy of the | 178 | for information on how to set up a local copy of the |
179 | <filename>poky-extras</filename> repository. | 179 | <filename>poky-extras</filename> repository. |
180 | </para> | 180 | </para> |
181 | 181 | ||
182 | <para> | 182 | <para> |
183 | Because this example uses the Yocto Project &DISTRO; Release code | 183 | Because this example uses the Yocto Project &DISTRO; Release code |
184 | named "&DISTRO_NAME;", which maps to the <filename>&DISTRO_NAME;</filename> | 184 | named "&DISTRO_NAME;", which maps to the <filename>&DISTRO_NAME;</filename> |
185 | branch in the repository, you need to be sure you are using that | 185 | branch in the repository, you need to be sure you are using that |
186 | branch for <filename>poky-extras</filename>. | 186 | branch for <filename>poky-extras</filename>. |
187 | The following commands create and checkout the local | 187 | The following commands create and checkout the local |
188 | branch you are using for the <filename>&DISTRO_NAME;</filename> | 188 | branch you are using for the <filename>&DISTRO_NAME;</filename> |
189 | branch: | 189 | branch: |
190 | <literallayout class='monospaced'> | 190 | <literallayout class='monospaced'> |
@@ -201,25 +201,25 @@ | |||
201 | 201 | ||
202 | <para> | 202 | <para> |
203 | This example modifies the <filename>linux-yocto-3.4</filename> kernel. | 203 | This example modifies the <filename>linux-yocto-3.4</filename> kernel. |
204 | Thus, you need to create a bare clone of that kernel and then make a copy of the | 204 | Thus, you need to create a bare clone of that kernel and then make a copy of the |
205 | bare clone. | 205 | bare clone. |
206 | See the bulleted item | 206 | See the bulleted item |
207 | "<link linkend='local-kernel-files'>Yocto Project Kernel</link>" | 207 | "<link linkend='local-kernel-files'>Yocto Project Kernel</link>" |
208 | for information on how to do that. | 208 | for information on how to do that. |
209 | </para> | 209 | </para> |
210 | 210 | ||
211 | <para> | 211 | <para> |
212 | The bare clone exists for the kernel build tools and simply as the receiving end | 212 | The bare clone exists for the kernel build tools and simply as the receiving end |
213 | of <filename>git push</filename> | 213 | of <filename>git push</filename> |
214 | commands after you make edits and commits inside the copy of the clone. | 214 | commands after you make edits and commits inside the copy of the clone. |
215 | The copy (<filename>my-linux-yocto-3.4-work</filename> in this example) has to have | 215 | The copy (<filename>my-linux-yocto-3.4-work</filename> in this example) has to have |
216 | a local branch created and checked out for your work. | 216 | a local branch created and checked out for your work. |
217 | This example uses <filename>common-pc-base</filename> as the local branch. | 217 | This example uses <filename>common-pc-base</filename> as the local branch. |
218 | The following commands create and checkout the branch: | 218 | The following commands create and checkout the branch: |
219 | <literallayout class='monospaced'> | 219 | <literallayout class='monospaced'> |
220 | $ cd ~/my-linux-yocto-3.4-work | 220 | $ cd ~/my-linux-yocto-3.4-work |
221 | $ git checkout -b standard-common-pc-base origin/standard/common-pc/base | 221 | $ git checkout -b standard-common-pc-base origin/standard/common-pc/base |
222 | Branch standard-common-pc-base set up to track remote branch | 222 | Branch standard-common-pc-base set up to track remote branch |
223 | standard/common-pc/base from origin. | 223 | standard/common-pc/base from origin. |
224 | Switched to a new branch 'standard-common-pc-base' | 224 | Switched to a new branch 'standard-common-pc-base' |
225 | </literallayout> | 225 | </literallayout> |
@@ -230,22 +230,22 @@ | |||
230 | <title>Building and Booting the Default QEMU Kernel Image</title> | 230 | <title>Building and Booting the Default QEMU Kernel Image</title> |
231 | 231 | ||
232 | <para> | 232 | <para> |
233 | Before we make changes to the kernel source files, this example first builds the | 233 | Before we make changes to the kernel source files, this example first builds the |
234 | default image and then boots it inside the QEMU emulator. | 234 | default image and then boots it inside the QEMU emulator. |
235 | <note> | 235 | <note> |
236 | Because a full build can take hours, you should check two variables in the | 236 | Because a full build can take hours, you should check two variables in the |
237 | <filename>build</filename> directory that is created after you source the | 237 | <filename>build</filename> directory that is created after you source the |
238 | <filename>&OE_INIT_FILE;</filename> script. | 238 | <filename>&OE_INIT_FILE;</filename> script. |
239 | You can find these variables | 239 | You can find these variables |
240 | <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename> | 240 | <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename> |
241 | in the <filename>build/conf</filename> directory in the | 241 | in the <filename>build/conf</filename> directory in the |
242 | <filename>local.conf</filename> configuration file. | 242 | <filename>local.conf</filename> configuration file. |
243 | By default, these variables are commented out. | 243 | By default, these variables are commented out. |
244 | If your host development system supports multi-core and multi-thread capabilities, | 244 | If your host development system supports multi-core and multi-thread capabilities, |
245 | you can uncomment these statements and set the variables to significantly shorten | 245 | you can uncomment these statements and set the variables to significantly shorten |
246 | the full build time. | 246 | the full build time. |
247 | As a guideline, set both <filename>BB_NUMBER_THREADS</filename> and | 247 | As a guideline, set both <filename>BB_NUMBER_THREADS</filename> and |
248 | <filename>PARALLEL_MAKE</filename> to twice the number | 248 | <filename>PARALLEL_MAKE</filename> to twice the number |
249 | of cores your machine supports. | 249 | of cores your machine supports. |
250 | </note> | 250 | </note> |
251 | The following two commands <filename>source</filename> the build environment setup script | 251 | The following two commands <filename>source</filename> the build environment setup script |
@@ -255,9 +255,9 @@ | |||
255 | $ cd ~/poky | 255 | $ cd ~/poky |
256 | $ source &OE_INIT_FILE; | 256 | $ source &OE_INIT_FILE; |
257 | You had no conf/local.conf file. This configuration file has therefore been | 257 | You had no conf/local.conf file. This configuration file has therefore been |
258 | created for you with some default values. You may wish to edit it to use a | 258 | created for you with some default values. You may wish to edit it to use a |
259 | different MACHINE (target hardware) or enable parallel build options to take | 259 | different MACHINE (target hardware) or enable parallel build options to take |
260 | advantage of multiple cores for example. See the file for more information as | 260 | advantage of multiple cores for example. See the file for more information as |
261 | common configuration options are commented. | 261 | common configuration options are commented. |
262 | 262 | ||
263 | The Yocto Project has extensive documentation about OE including a reference manual | 263 | The Yocto Project has extensive documentation about OE including a reference manual |
@@ -305,7 +305,7 @@ | |||
305 | before starting the build.</note> | 305 | before starting the build.</note> |
306 | </para> | 306 | </para> |
307 | 307 | ||
308 | <para> | 308 | <para> |
309 | After the build completes, you can start the QEMU emulator using the resulting image | 309 | After the build completes, you can start the QEMU emulator using the resulting image |
310 | <filename>qemux86</filename> as follows: | 310 | <filename>qemux86</filename> as follows: |
311 | <literallayout class='monospaced'> | 311 | <literallayout class='monospaced'> |
@@ -317,9 +317,9 @@ | |||
317 | As the image boots in the emulator, console message and status output appears | 317 | As the image boots in the emulator, console message and status output appears |
318 | across the terminal window. | 318 | across the terminal window. |
319 | Because the output scrolls by quickly, it is difficult to read. | 319 | Because the output scrolls by quickly, it is difficult to read. |
320 | To examine the output, you log into the system using the | 320 | To examine the output, you log into the system using the |
321 | login <filename>root</filename> with no password. | 321 | login <filename>root</filename> with no password. |
322 | Once you are logged in, issue the following command to scroll through the | 322 | Once you are logged in, issue the following command to scroll through the |
323 | console output: | 323 | console output: |
324 | <literallayout class='monospaced'> | 324 | <literallayout class='monospaced'> |
325 | # dmesg | less | 325 | # dmesg | less |
@@ -360,7 +360,7 @@ | |||
360 | </para> | 360 | </para> |
361 | 361 | ||
362 | <para> | 362 | <para> |
363 | Here is the altered code showing five new <filename>printk</filename> statements | 363 | Here is the altered code showing five new <filename>printk</filename> statements |
364 | near the top of the function: | 364 | near the top of the function: |
365 | <literallayout class='monospaced'> | 365 | <literallayout class='monospaced'> |
366 | void __cpuinit calibrate_delay(void) | 366 | void __cpuinit calibrate_delay(void) |
@@ -392,9 +392,9 @@ | |||
392 | </para> | 392 | </para> |
393 | 393 | ||
394 | <para> | 394 | <para> |
395 | Once the source code has been modified, you need to use Git to push the changes to | 395 | Once the source code has been modified, you need to use Git to push the changes to |
396 | the bare clone. | 396 | the bare clone. |
397 | If you do not push the changes, then the OpenEmbedded build system will not pick | 397 | If you do not push the changes, then the OpenEmbedded build system will not pick |
398 | up the changed source files. | 398 | up the changed source files. |
399 | </para> | 399 | </para> |
400 | 400 | ||
@@ -411,43 +411,43 @@ | |||
411 | 411 | ||
412 | <para> | 412 | <para> |
413 | At this point, the source has been changed and pushed. | 413 | At this point, the source has been changed and pushed. |
414 | The example now defines some variables used by the OpenEmbedded build system | 414 | The example now defines some variables used by the OpenEmbedded build system |
415 | to locate your kernel source. | 415 | to locate your kernel source. |
416 | You essentially need to identify where to find the kernel recipe and the changed source code. | 416 | You essentially need to identify where to find the kernel recipe and the changed source code. |
417 | You also need to be sure some basic configurations are in place that identify the | 417 | You also need to be sure some basic configurations are in place that identify the |
418 | type of machine you are building and to help speed up the build should your host support | 418 | type of machine you are building and to help speed up the build should your host support |
419 | multiple-core and thread capabilities. | 419 | multiple-core and thread capabilities. |
420 | </para> | 420 | </para> |
421 | 421 | ||
422 | <para> | 422 | <para> |
423 | Do the following to make sure the build parameters are set up for the example. | 423 | Do the following to make sure the build parameters are set up for the example. |
424 | Once you set up these build parameters, they do not have to change unless you | 424 | Once you set up these build parameters, they do not have to change unless you |
425 | change the target architecture of the machine you are building or you move | 425 | change the target architecture of the machine you are building or you move |
426 | the bare clone, copy of the clone, or the <filename>poky-extras</filename> repository: | 426 | the bare clone, copy of the clone, or the <filename>poky-extras</filename> repository: |
427 | <itemizedlist> | 427 | <itemizedlist> |
428 | <listitem><para><emphasis>Build for the Correct Target Architecture:</emphasis> The | 428 | <listitem><para><emphasis>Build for the Correct Target Architecture:</emphasis> The |
429 | <filename>local.conf</filename> file in the build directory defines the build's | 429 | <filename>local.conf</filename> file in the build directory defines the build's |
430 | target architecture. | 430 | target architecture. |
431 | By default, <filename>MACHINE</filename> is set to | 431 | By default, <filename>MACHINE</filename> is set to |
432 | <filename>qemux86</filename>, which specifies a 32-bit | 432 | <filename>qemux86</filename>, which specifies a 32-bit |
433 | <trademark class='registered'>Intel</trademark> Architecture | 433 | <trademark class='registered'>Intel</trademark> Architecture |
434 | target machine suitable for the QEMU emulator. | 434 | target machine suitable for the QEMU emulator. |
435 | In this example, <filename>MACHINE</filename> is correctly configured. | 435 | In this example, <filename>MACHINE</filename> is correctly configured. |
436 | </para></listitem> | 436 | </para></listitem> |
437 | <listitem><para><emphasis>Optimize Build Time:</emphasis> Also in the | 437 | <listitem><para><emphasis>Optimize Build Time:</emphasis> Also in the |
438 | <filename>local.conf</filename> file are two variables that can speed your | 438 | <filename>local.conf</filename> file are two variables that can speed your |
439 | build time if your host supports multi-core and multi-thread capabilities: | 439 | build time if your host supports multi-core and multi-thread capabilities: |
440 | <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>. | 440 | <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>. |
441 | If the host system has multiple cores then you can optimize build time | 441 | If the host system has multiple cores then you can optimize build time |
442 | by setting both these variables to twice the number of | 442 | by setting both these variables to twice the number of |
443 | cores.</para></listitem> | 443 | cores.</para></listitem> |
444 | <listitem><para><emphasis>Identify Your <filename>meta-kernel-dev</filename> | 444 | <listitem><para><emphasis>Identify Your <filename>meta-kernel-dev</filename> |
445 | Layer:</emphasis> The <filename>BBLAYERS</filename> variable in the | 445 | Layer:</emphasis> The <filename>BBLAYERS</filename> variable in the |
446 | <filename>bblayers.conf</filename> file found in the | 446 | <filename>bblayers.conf</filename> file found in the |
447 | <filename>poky/build/conf</filename> directory needs to have the path to your local | 447 | <filename>poky/build/conf</filename> directory needs to have the path to your local |
448 | <filename>meta-kernel-dev</filename> layer. | 448 | <filename>meta-kernel-dev</filename> layer. |
449 | By default, the <filename>BBLAYERS</filename> variable contains paths to | 449 | By default, the <filename>BBLAYERS</filename> variable contains paths to |
450 | <filename>meta</filename> and <filename>meta-yocto</filename> in the | 450 | <filename>meta</filename> and <filename>meta-yocto</filename> in the |
451 | <filename>poky</filename> Git repository. | 451 | <filename>poky</filename> Git repository. |
452 | Add the path to your <filename>meta-kernel-dev</filename> location. | 452 | Add the path to your <filename>meta-kernel-dev</filename> location. |
453 | Be sure to substitute your user information in the statement. | 453 | Be sure to substitute your user information in the statement. |
@@ -460,14 +460,14 @@ | |||
460 | /home/scottrif/poky/poky-extras/meta-kernel-dev \ | 460 | /home/scottrif/poky/poky-extras/meta-kernel-dev \ |
461 | " | 461 | " |
462 | </literallayout></para></listitem> | 462 | </literallayout></para></listitem> |
463 | <listitem><para><emphasis>Identify Your Source Files:</emphasis> In the | 463 | <listitem><para><emphasis>Identify Your Source Files:</emphasis> In the |
464 | <filename>linux-yocto_3.4.bbappend</filename> file located in the | 464 | <filename>linux-yocto_3.4.bbappend</filename> file located in the |
465 | <filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename> | 465 | <filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename> |
466 | directory, you need to identify the location of the | 466 | directory, you need to identify the location of the |
467 | local source code, which in this example is the bare clone named | 467 | local source code, which in this example is the bare clone named |
468 | <filename>linux-yocto-3.4.git</filename>. | 468 | <filename>linux-yocto-3.4.git</filename>. |
469 | To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your | 469 | To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your |
470 | local <filename>linux-yocto-3.4.git</filename> Git repository by adding the | 470 | local <filename>linux-yocto-3.4.git</filename> Git repository by adding the |
471 | following statement. | 471 | following statement. |
472 | Also, be sure the <filename>SRC_URI</filename> variable is pointing to | 472 | Also, be sure the <filename>SRC_URI</filename> variable is pointing to |
473 | your kernel source files by removing the comment. | 473 | your kernel source files by removing the comment. |
@@ -480,20 +480,20 @@ | |||
480 | </para> | 480 | </para> |
481 | 481 | ||
482 | <note> | 482 | <note> |
483 | <para>Before attempting to build the modified kernel, there is one more set of changes you | 483 | <para>Before attempting to build the modified kernel, there is one more set of changes you |
484 | need to make in the <filename>meta-kernel-dev</filename> layer. | 484 | need to make in the <filename>meta-kernel-dev</filename> layer. |
485 | Because all the kernel <filename>.bbappend</filename> files are parsed during the | 485 | Because all the kernel <filename>.bbappend</filename> files are parsed during the |
486 | build process regardless of whether you are using them or not, you should either | 486 | build process regardless of whether you are using them or not, you should either |
487 | comment out the <filename>COMPATIBLE_MACHINE</filename> statements in all | 487 | comment out the <filename>COMPATIBLE_MACHINE</filename> statements in all |
488 | unused <filename>.bbappend</filename> files, or simply remove (or rename) all the files | 488 | unused <filename>.bbappend</filename> files, or simply remove (or rename) all the files |
489 | except the one your are using for the build | 489 | except the one your are using for the build |
490 | (i.e. <filename>linux-yocto_3.4.bbappend</filename> in this example).</para> | 490 | (i.e. <filename>linux-yocto_3.4.bbappend</filename> in this example).</para> |
491 | <para>If you do not make one of these two adjustments, your machine will be compatible | 491 | <para>If you do not make one of these two adjustments, your machine will be compatible |
492 | with all the kernel recipes in the <filename>meta-kernel-dev</filename> layer. | 492 | with all the kernel recipes in the <filename>meta-kernel-dev</filename> layer. |
493 | When your machine is comapatible with all the kernel recipes, the build attempts | 493 | When your machine is comapatible with all the kernel recipes, the build attempts |
494 | to build all kernels in the layer. | 494 | to build all kernels in the layer. |
495 | You could end up with build errors blocking your work.</para> | 495 | You could end up with build errors blocking your work.</para> |
496 | </note> | 496 | </note> |
497 | </section> | 497 | </section> |
498 | 498 | ||
499 | <section id='building-and-booting-the-modified-qemu-kernel-image'> | 499 | <section id='building-and-booting-the-modified-qemu-kernel-image'> |
@@ -511,7 +511,7 @@ | |||
511 | $ source &OE_INIT_FILE; | 511 | $ source &OE_INIT_FILE; |
512 | </literallayout> | 512 | </literallayout> |
513 | </para></listitem> | 513 | </para></listitem> |
514 | <listitem><para>Be sure old images are cleaned out by running the | 514 | <listitem><para>Be sure old images are cleaned out by running the |
515 | <filename>cleanall</filename> BitBake task as follows from your build directory: | 515 | <filename>cleanall</filename> BitBake task as follows from your build directory: |
516 | <literallayout class='monospaced'> | 516 | <literallayout class='monospaced'> |
517 | $ bitbake -c cleanall linux-yocto | 517 | $ bitbake -c cleanall linux-yocto |
@@ -524,7 +524,7 @@ | |||
524 | <literallayout class='monospaced'> | 524 | <literallayout class='monospaced'> |
525 | $ bitbake -k core-image-minimal | 525 | $ bitbake -k core-image-minimal |
526 | </literallayout></para></listitem> | 526 | </literallayout></para></listitem> |
527 | <listitem><para>Finally, boot the modified image in the QEMU emulator | 527 | <listitem><para>Finally, boot the modified image in the QEMU emulator |
528 | using this command: | 528 | using this command: |
529 | <literallayout class='monospaced'> | 529 | <literallayout class='monospaced'> |
530 | $ runqemu qemux86 | 530 | $ runqemu qemux86 |
@@ -533,7 +533,7 @@ | |||
533 | </para> | 533 | </para> |
534 | 534 | ||
535 | <para> | 535 | <para> |
536 | Log into the machine using <filename>root</filename> with no password and then | 536 | Log into the machine using <filename>root</filename> with no password and then |
537 | use the following shell command to scroll through the console's boot output. | 537 | use the following shell command to scroll through the console's boot output. |
538 | <literallayout class='monospaced'> | 538 | <literallayout class='monospaced'> |
539 | # dmesg | less | 539 | # dmesg | less |
@@ -541,7 +541,7 @@ | |||
541 | </para> | 541 | </para> |
542 | 542 | ||
543 | <para> | 543 | <para> |
544 | You should see the results of your <filename>printk</filename> statements | 544 | You should see the results of your <filename>printk</filename> statements |
545 | as part of the output. | 545 | as part of the output. |
546 | </para> | 546 | </para> |
547 | </section> | 547 | </section> |