diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2011-07-20 14:49:06 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-04 15:06:41 +0100 |
commit | 70e006ec0ce2b0edc6b4811100f80b15c447dced (patch) | |
tree | f34e5d4fedfe1d5584ce8ea0a7be81f6a386575b | |
parent | 468d7898fc80648db321d9d3d0ac8fd0a8eb8add (diff) | |
download | poky-70e006ec0ce2b0edc6b4811100f80b15c447dced.tar.gz |
documentation/dev-manual/dev-manual-cases.xml: partial edits to procedures
Partial stuff as I am working through the BSP example trying to
use git clone instead of git init per Darren Hart's suggestion.
(From yocto-docs rev: e829d761575786093c9ac1f1b901a2151011ce9d)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | documentation/dev-manual/dev-manual-cases.xml | 318 |
1 files changed, 145 insertions, 173 deletions
diff --git a/documentation/dev-manual/dev-manual-cases.xml b/documentation/dev-manual/dev-manual-cases.xml index d57f0eabff..83b02b1435 100644 --- a/documentation/dev-manual/dev-manual-cases.xml +++ b/documentation/dev-manual/dev-manual-cases.xml | |||
@@ -58,8 +58,14 @@ | |||
58 | <para> | 58 | <para> |
59 | Here are the basic steps involved in creating a BSP: | 59 | Here are the basic steps involved in creating a BSP: |
60 | <orderedlist> | 60 | <orderedlist> |
61 | <listitem><para>Be sure you are set up to use Yocto Project (see | 61 | <listitem><para>Be sure your host development system is set up to support |
62 | <xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref>).</para></listitem> | 62 | development using the Yocto Project. |
63 | See | ||
64 | <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'> | ||
65 | The Linux Distributions</ulink> section and | ||
66 | <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'> | ||
67 | The Packages</ulink> section both | ||
68 | in the Yocto Project Quick Start for requirements.</para></listitem> | ||
63 | <listitem><para>Choose a BSP available with Yocto Project that most closely represents | 69 | <listitem><para>Choose a BSP available with Yocto Project that most closely represents |
64 | your hardware.</para></listitem> | 70 | your hardware.</para></listitem> |
65 | <listitem><para>Get set up with a base BSP.</para></listitem> | 71 | <listitem><para>Get set up with a base BSP.</para></listitem> |
@@ -85,19 +91,10 @@ | |||
85 | <title>Setting Up Yocto Project</title> | 91 | <title>Setting Up Yocto Project</title> |
86 | 92 | ||
87 | <para> | 93 | <para> |
88 | For general host development system preparation such as package requirements and | ||
89 | operating system requirements, see | ||
90 | <xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref>)Chapter 2 of | ||
91 | this manual or the | ||
92 | <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'> | ||
93 | Yocto Project Quick Start</ulink>. | ||
94 | </para> | ||
95 | |||
96 | <para> | ||
97 | You need to have the Yocto Project source tree available on your host system. | 94 | You need to have the Yocto Project source tree available on your host system. |
98 | You can get that through tarball extraction or by initializing and checking out the | 95 | You can get that through tarball extraction or by cloning the <filename>poky</filename> |
99 | Yocto Project Git repository. | 96 | Git repository. |
100 | Typically, checking out the Git repository is the method to use. | 97 | Typically, cloning the Git repository is the method to use. |
101 | This allows you to maintain a complete history of changes and facilitates you | 98 | This allows you to maintain a complete history of changes and facilitates you |
102 | contributing back to the Yocto Project. | 99 | contributing back to the Yocto Project. |
103 | However, if you just want the source you can download the Yocto Project Release | 100 | However, if you just want the source you can download the Yocto Project Release |
@@ -105,68 +102,48 @@ | |||
105 | <ulink url='http://yoctoproject.org/download'>download page</ulink>. | 102 | <ulink url='http://yoctoproject.org/download'>download page</ulink>. |
106 | If you download the tarball you can extract it into any directory you want using the | 103 | If you download the tarball you can extract it into any directory you want using the |
107 | tar command. | 104 | tar command. |
108 | For example, the following commands extract the 1.0.1 release tarball into | 105 | For example, the following command extracts the Yocto Project 1.0.1 release tarball |
109 | <filename>/usr/local/yocto</filename> with the Yocto Project source directory as | 106 | (bernard 5.0.1) into |
110 | <filename>poky.bernard.5.0.1.tar.bz2</filename>: | 107 | the current working directory and sets up a Yocto Project source directory named |
108 | <filename>bernard.5.0.1</filename>: | ||
111 | <literallayout class='monospaced'> | 109 | <literallayout class='monospaced'> |
112 | /usr/local/yocto$ tar xfj poky.bernard.5.0.1.tar.bz2 | 110 | $ tar xfj poky.bernard.5.0.1.tar.bz2 |
113 | </literallayout> | 111 | </literallayout> |
114 | </para> | 112 | </para> |
115 | 113 | ||
116 | <para> | 114 | <para> |
117 | The following transcript shows how to initialize a Git repository and checkout the | 115 | The following transcript shows how to clone the <filename>poky</filename> Git repository |
118 | Yocto Project source tree: | 116 | into the current working directory. |
117 | The command creates the Git repository in a directory named <filename>poky</filename>: | ||
119 | <literallayout class='monospaced'> | 118 | <literallayout class='monospaced'> |
120 | /usr/local/yocto$ git init | 119 | $ git clone git://git.yoctoproject.org/poky |
121 | Initialized empty Git repository in /usr/local/yocto/.git | 120 | Initialized empty Git repository in /home/scottrif/poky/.git/ |
122 | /usr/local/yocto$ git remote add poky git://git.yoctoproject.org/poky.git | 121 | remote: Counting objects: 107624, done. |
123 | /usr/local/yocto$ git remote update | 122 | remote: Compressing objects: 100% (37128/37128), done. |
124 | Fetching poky | 123 | remote: Total 107624 (delta 73393), reused 99851 (delta 67287) |
125 | remote: Counting objects: 106111, done. | 124 | Receiving objects: 100% (107624/107624), 69.74 MiB | 483 KiB/s, done. |
126 | remote: Compressing objects: 100% (36106/36106), done. | 125 | Resolving deltas: 100% (73393/73393), done. |
127 | remote: Total 106111 (delta 72275), reused 99193 (delta 66808) | ||
128 | Receiving objects: 100% (106111/106111), 69.51 MiB | 518 KiB/s, done. | ||
129 | Resolving deltas: 100% (72275/72275), done. | ||
130 | From git://git.yoctoproject.org/poky | ||
131 | * [new branch] 1.1_M1 -> poky/1.1_M1 | ||
132 | * [new branch] 1.1_M2 -> poky/1.1_M2 | ||
133 | * [new branch] bernard -> poky/bernard | ||
134 | * [new branch] blinky -> poky/blinky | ||
135 | * [new branch] clyde -> poky/clyde | ||
136 | * [new branch] elroy -> poky/elroy | ||
137 | * [new branch] green -> poky/green | ||
138 | * [new branch] laverne -> poky/laverne | ||
139 | * [new branch] master -> poky/master | ||
140 | * [new branch] pinky -> poky/pinky | ||
141 | * [new branch] purple -> poky/purple | ||
142 | * [new tag] 1.1_M1.final -> 1.1_M1.final | ||
143 | * [new tag] 1.1_M2.rc1 -> 1.1_M2.rc1 | ||
144 | * [new tag] bernard-5.0.1 -> bernard-5.0.1 | ||
145 | * [new tag] pinky-3.1.2 -> pinky-3.1.2 | ||
146 | From git://git.yoctoproject.org/poky | ||
147 | * [new tag] 1.1_M1.rc1 -> 1.1_M1.rc1 | ||
148 | * [new tag] 1.1_M1.rc2 -> 1.1_M1.rc2 | ||
149 | * [new tag] bernard-1.0rc1 -> bernard-1.0rc1 | ||
150 | * [new tag] bernard-5.0 -> bernard-5.0 | ||
151 | * [new tag] bernard-5.0-alpha -> bernard-5.0-alpha | ||
152 | * [new tag] bernard-5.0rc1 -> bernard-5.0rc1 | ||
153 | * [new tag] bernard-5.0rc2 -> bernard-5.0rc2 | ||
154 | * [new tag] laverne-4.0 -> laverne-4.0 | ||
155 | * [new tag] laverne-4.0.1 -> laverne-4.0.1 | ||
156 | * [new tag] m4 -> m4 | ||
157 | * [new tag] purple-3.2 -> purple-3.2 | ||
158 | * [new tag] purple-3.2.1 -> purple-3.2.1 | ||
159 | </literallayout> | 126 | </literallayout> |
160 | </para> | 127 | </para> |
161 | 128 | ||
162 | <para> | 129 | <para> |
163 | Once you have the repository set up, you have many development branches from which | 130 | Once you have the repository set up you have many development branches from which |
164 | you can work. | 131 | you can work. |
132 | From inside the repository you can see the branch names and the tag names used | ||
133 | in the Git repository using either of the following two commands: | ||
134 | <literallayout class='monospaced'> | ||
135 | $ git branch -a | ||
136 | $ git tag -l | ||
137 | </literallayout> | ||
165 | For this example we are going to use the Yocto Project 1.0.1 Release, | 138 | For this example we are going to use the Yocto Project 1.0.1 Release, |
166 | which maps to the <filename>Bernard 5.0.1</filename> tag in Git. | 139 | which maps to the <filename>bernard</filename> branch in the repository. |
140 | These commands create a local branch named <filename>bernard</filename> | ||
141 | that tracks the remote branch of the same name. | ||
167 | <literallayout class='monospaced'> | 142 | <literallayout class='monospaced'> |
168 | /usr/local/yocto$ git checkout -b Bernard-5.0.1 bernard-5.0.1 | 143 | |
169 | Switched to a new branch 'bernard-5.0.1' | 144 | $ cd poky |
145 | $ git checkout -b bernard | ||
146 | Switched to a new branch 'bernard' | ||
170 | </literallayout> | 147 | </literallayout> |
171 | </para> | 148 | </para> |
172 | </section> | 149 | </section> |
@@ -211,58 +188,53 @@ | |||
211 | </para> | 188 | </para> |
212 | 189 | ||
213 | <para> | 190 | <para> |
214 | If you are using tarball extraction then simply download the tarball for the base | 191 | If you are using tarball extraction then simply download the tarball for the base |
215 | BSP you chose in the previous step and then extract it into any directory | 192 | BSP you chose in the previous step and then extract it into any directory |
216 | you choose using the tar command. | 193 | you choose using the tar command. |
217 | Upon extraction, the BSP source directory (layer) will be named | 194 | Upon extraction, the BSP source directory (layer) will be named |
218 | <filename>meta-<BSP_name></filename>. | 195 | <filename>meta-<BSP_name></filename>. |
219 | The following command extracts the Crown Bay BSP into a directory named | 196 | The following command extracts the Crown Bay BSP into the current directory and names it |
220 | <filename>meta-crownbay</filename>: | 197 | <filename>meta-crownbay</filename>: |
221 | <literallayout class='monospaced'> | 198 | <literallayout class='monospaced'> |
222 | /usr/local$ tar xjf crownbay-noemgd-bernard-5.0.1.tar.bz2 | 199 | $ tar xjf crownbay-noemgd-bernard-5.0.1.tar.bz2 |
223 | </literallayout> | 200 | </literallayout> |
224 | </para> | 201 | </para> |
225 | 202 | ||
226 | <para> | 203 | <para> |
227 | If you initialized a Yocto Project Git repository then you need to do the same for the | 204 | If you cloned a Yocto Project Git repository (<filename>poky</filename>) |
228 | BSP, which is located in the meta-intel Git repository. | 205 | then you need to do the same for the |
229 | The meta-intel repository contains all the metadata that supports BSP creation. | 206 | BSP, which is located in the <filename>meta-intel</filename> Git repository. |
207 | The <filename>meta-intel</filename> repository contains all the metadata | ||
208 | that supports BSP creation. | ||
230 | </para> | 209 | </para> |
231 | 210 | ||
232 | <para> | 211 | <para> |
233 | The following transcript shows the steps to create and set up the meta-intel Git | 212 | The following transcript shows the steps to clone the <filename>meta-intel</filename> |
234 | repository inside the Yocto Project Git repository: | 213 | Git repository inside the <filename>poky</filename> Git repository created earlier in this |
214 | example. | ||
215 | While this example establishes the <filename>meta-intel</filename> Git repository inside | ||
216 | the <filename>poky</filename> Git repository, you are not required to have | ||
217 | <filename>meta-intel</filename> inside of <filename>poky</filename>: | ||
235 | <literallayout class='monospaced'> | 218 | <literallayout class='monospaced'> |
236 | /usr/local/yocto$ mkdir meta-intel | 219 | $cd poky |
237 | /usr/local/yocto$ cd meta-intel | 220 | $ git clone git://git.yoctoproject.org/meta-intel.git |
238 | /usr/local/yocto/meta-intel$ git init | 221 | Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/ |
239 | Initialized empty Git repository in /usr/local/yocto/meta-intel/.git/ | 222 | remote: Counting objects: 1325, done. |
240 | /usr/local/yocto/meta-intel$ git remote add meta-intel \ git://git.yoctoproject.org/meta-intel.git | 223 | remote: Compressing objects: 100% (1078/1078), done. |
241 | /usr/local/yocto/meta-intel$ git remote update | 224 | remote: Total 1325 (delta 546), reused 85 (delta 27) |
242 | Fetching meta-intel | 225 | Receiving objects: 100% (1325/1325), 1.56 MiB | 330 KiB/s, done. |
243 | remote: Counting objects: 1240, done. | 226 | Resolving deltas: 100% (546/546), done. |
244 | remote: Compressing objects: 100% (1008/1008), done. | ||
245 | remote: Total 1240 (delta 513), reused 85 (delta 27) | ||
246 | Receiving objects: 100% (1240/1240), 1.55 MiB | 510 KiB/s, done. | ||
247 | Resolving deltas: 100% (513/513), done. | ||
248 | From git://git.yoctoproject.org/meta-intel | ||
249 | * [new branch] 1.1_M1 -> meta-intel/1.1_M1 | ||
250 | * [new branch] 1.1_M2 -> meta-intel/1.1_M2 | ||
251 | * [new branch] bernard -> meta-intel/bernard | ||
252 | * [new branch] dvhart/n450 -> meta-intel/dvhart/n450 | ||
253 | * [new branch] laverne -> meta-intel/laverne | ||
254 | * [new branch] master -> meta-intel/master | ||
255 | </literallayout> | 227 | </literallayout> |
256 | </para> | 228 | </para> |
257 | 229 | ||
258 | <para> | 230 | <para> |
259 | Once you have the repository set up, you have many development branches from | 231 | Because <filename>meta-intel</filename> is its own Git repository you will want |
260 | which you can work. | 232 | to be sure you are in the appropriate branch for your work. |
261 | For this example we are going to use Bernard 5.0. | 233 | For this example we are going to use the <filename>bernard</filename> branch. |
262 | <literallayout class='monospaced'> | 234 | <literallayout class='monospaced'> |
263 | /usr/local/yocto/meta-intel$ git checkout -b Bernard-5.0.1 meta-intel/bernard | 235 | $ cd meta-intel |
264 | Branch Bernard-5.0.1 set up to track remote branch bernard from meta-intel. | 236 | $ git checkout -b bernard |
265 | Switched to a new branch 'bernard-5.0.1' | 237 | Switched to a new branch 'bernard' |
266 | </literallayout> | 238 | </literallayout> |
267 | </para> | 239 | </para> |
268 | </section> | 240 | </section> |
@@ -271,20 +243,20 @@ | |||
271 | <title>Making a Copy of the Base BSP to Create Your New BSP Layer</title> | 243 | <title>Making a Copy of the Base BSP to Create Your New BSP Layer</title> |
272 | 244 | ||
273 | <para> | 245 | <para> |
274 | Now that you have the Yocto Project and base BSP source you need to create a | 246 | Now that you have the Yocto Project and base BSP source you need to create a |
275 | new layer for your BSP. | 247 | new layer for your BSP. |
276 | </para> | 248 | </para> |
277 | 249 | ||
278 | <para> | 250 | <para> |
279 | Layers are ideal for isolating and storing work for a given piece of hardware. | 251 | Layers are ideal for isolating and storing work for a given piece of hardware. |
280 | A layer is really just a location or area in which you place the recipes for your BSP. | 252 | A layer is really just a location or area in which you place the recipes for your BSP. |
281 | In fact, a BSP is, in itself, a special type of layer. | 253 | In fact, a BSP is, in itself, a special type of layer. |
282 | Consider an application as another example that illustrates a layer. | 254 | Consider an application as another example that illustrates a layer. |
283 | Suppose you are creating an application that has library or other dependencies in | 255 | Suppose you are creating an application that has library or other dependencies in |
284 | order for it to compile and run. | 256 | order for it to compile and run. |
285 | The layer, in this case, would be where all the recipes that define those dependencies | 257 | The layer, in this case, would be where all the recipes that define those dependencies |
286 | are kept. The key point for a layer is that it is an isolated area that contains | 258 | are kept. The key point for a layer is that it is an isolated area that contains |
287 | all the relevant information for the project that the Yocto Project build system knows about. | 259 | all the relevant information for the project that the Yocto Project build system knows about. |
288 | </para> | 260 | </para> |
289 | 261 | ||
290 | <note> | 262 | <note> |
@@ -312,7 +284,8 @@ | |||
312 | In the standard layout you will notice a suggested hierarchy for BSP kernel recipes, | 284 | In the standard layout you will notice a suggested hierarchy for BSP kernel recipes, |
313 | graphics recipes, and configuration information. | 285 | graphics recipes, and configuration information. |
314 | You can see the standard layout for the Crown Bay BSP in this example by examining the | 286 | You can see the standard layout for the Crown Bay BSP in this example by examining the |
315 | directory structure of <filename>meta-crownbay</filename>. | 287 | directory structure of the <filename>meta-crownbay</filename> layer inside the |
288 | <filename>meta-intel</filename> Git repository. | ||
316 | </para> | 289 | </para> |
317 | 290 | ||
318 | <para> | 291 | <para> |
@@ -321,11 +294,12 @@ | |||
321 | For this example the new layer is named <filename>meta-mymachine</filename>. | 294 | For this example the new layer is named <filename>meta-mymachine</filename>. |
322 | The name must follow the BSP layer naming convention, which is | 295 | The name must follow the BSP layer naming convention, which is |
323 | <filename>meta-<name></filename>. | 296 | <filename>meta-<name></filename>. |
324 | The following example assumes a meta-intel Git repository. | 297 | The following example assumes your working directory is <filename>meta-intel</filename> |
298 | inside the <filename>meta-intel</filename> Git repository. | ||
325 | If you downloaded and expanded a Crown Bay tarball then you simply copy the resulting | 299 | If you downloaded and expanded a Crown Bay tarball then you simply copy the resulting |
326 | <filename>meta-crownbay</filename> directory structure to a location of your choice: | 300 | <filename>meta-crownbay</filename> directory structure to a location of your choice: |
327 | <literallayout class='monospaced'> | 301 | <literallayout class='monospaced'> |
328 | /usr/local/yocto/meta-intel$ cp -a meta-crownbay/ meta-mymachine | 302 | $ cp -a meta-crownbay/ meta-mymachine |
329 | </literallayout> | 303 | </literallayout> |
330 | </para> | 304 | </para> |
331 | </section> | 305 | </section> |
@@ -351,8 +325,8 @@ | |||
351 | The following two commands result in a single machine configuration file named | 325 | The following two commands result in a single machine configuration file named |
352 | <filename>mymachine.conf</filename>. | 326 | <filename>mymachine.conf</filename>. |
353 | <literallayout class='monospaced'> | 327 | <literallayout class='monospaced'> |
354 | /usr/local/yocto/meta-intel$ rm meta-mymachine/conf/machine/crownbay.conf | 328 | $ rm meta-mymachine/conf/machine/crownbay.conf |
355 | /usr/local/yocto/meta-intel$ mv meta-mymachine/conf/machine/crownbay-noemgd.conf \ | 329 | $ mv meta-mymachine/conf/machine/crownbay-noemgd.conf \ |
356 | meta-mymachine/conf/machine/mymachine.conf | 330 | meta-mymachine/conf/machine/mymachine.conf |
357 | </literallayout> | 331 | </literallayout> |
358 | </para> | 332 | </para> |
@@ -373,9 +347,9 @@ | |||
373 | statements we need to know which kernel we are using. | 347 | statements we need to know which kernel we are using. |
374 | The <filename>PREFERRED_PROVIDER_virtual/kernel</filename> statement in the file specifies | 348 | The <filename>PREFERRED_PROVIDER_virtual/kernel</filename> statement in the file specifies |
375 | the kernel we are going to use. | 349 | the kernel we are going to use. |
376 | We are going to use <filename>linux-yocto-stable</filename>. | 350 | We are going to use <filename>linux-yocto</filename>. |
377 | The <filename>SRCREV</filename> statement pairs point to the exact machine branch | 351 | The <filename>SRCREV</filename> statement pairs point to the exact machine branch |
378 | (commit) and <filename>meta</filename> branch in the Git repository. | 352 | (commit) and <filename>meta</filename> branch in the <filename>poky</filename> Git repository. |
379 | Right now the <filename>SRCREV</filename> variables are as follows in | 353 | Right now the <filename>SRCREV</filename> variables are as follows in |
380 | <filename>mymachine.conf</filename>: | 354 | <filename>mymachine.conf</filename>: |
381 | <literallayout class='monospaced'> | 355 | <literallayout class='monospaced'> |
@@ -486,10 +460,8 @@ | |||
486 | the remaining one that supports no EMGD. | 460 | the remaining one that supports no EMGD. |
487 | These commands take care of the new layer’s BSP recipes: | 461 | These commands take care of the new layer’s BSP recipes: |
488 | <literallayout class='monospaced'> | 462 | <literallayout class='monospaced'> |
489 | /usr/local/yocto/meta-intel$ rm -rf \ | 463 | $ rm -rf meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay |
490 | meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay | 464 | $ mv meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay-noemgd/ \ |
491 | /usr/local/yocto/meta-intel$ mv \ | ||
492 | meta-mymachine/recipes-bsp/formfactor/formfactor/crownbay-noemgd/ \ | ||
493 | meta-mymachine/recipes-bsp/formfactor/formfactor/mymachine | 465 | meta-mymachine/recipes-bsp/formfactor/formfactor/mymachine |
494 | </literallayout> | 466 | </literallayout> |
495 | </para> | 467 | </para> |
@@ -498,8 +470,7 @@ | |||
498 | For this example we want to remove anything that supports EMGD. | 470 | For this example we want to remove anything that supports EMGD. |
499 | The following command cleans up the <filename>recipes-graphics</filename> directory: | 471 | The following command cleans up the <filename>recipes-graphics</filename> directory: |
500 | <literallayout class='monospaced'> | 472 | <literallayout class='monospaced'> |
501 | /usr/local/yocto/meta-intel$ rm –rf \ | 473 | $ rm –rf meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-emgd* |
502 | meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-emgd* | ||
503 | </literallayout> | 474 | </literallayout> |
504 | </para> | 475 | </para> |
505 | 476 | ||
@@ -509,8 +480,7 @@ | |||
509 | However, we still need to rename a directory in the layer. | 480 | However, we still need to rename a directory in the layer. |
510 | This command applies the final change to the <filename>recipes-graphics</filename> directory: | 481 | This command applies the final change to the <filename>recipes-graphics</filename> directory: |
511 | <literallayout class='monospaced'> | 482 | <literallayout class='monospaced'> |
512 | /usr/local/yocto/meta-intel$ mv \ | 483 | $ mv meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd \ |
513 | meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd \ | ||
514 | meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/mymachine | 484 | meta-mymachine/recipes-graphics/xorg-xserver/xserver-xf86-config/mymachine |
515 | </literallayout> | 485 | </literallayout> |
516 | </para> | 486 | </para> |
@@ -522,11 +492,9 @@ | |||
522 | The other files all support the EMGD feature of Crown Bay. | 492 | The other files all support the EMGD feature of Crown Bay. |
523 | These commands clean up the directory: | 493 | These commands clean up the directory: |
524 | <literallayout class='monospaced'> | 494 | <literallayout class='monospaced'> |
525 | /usr/local/yocto/meta-intel$ rm –rf meta-mymachine/recipes-kernel/linux/linux-yocto | 495 | $ rm –rf meta-mymachine/recipes-kernel/linux/linux-yocto |
526 | /usr/local/yocto/meta-intel$ rm –rf \ | 496 | $ rm –rf meta-mymachine/recipes-kernel/linux/linux-yocto-stable |
527 | meta-mymachine/recipes-kernel/linux/linux-yocto-stable | 497 | $ rm meta-mymachine/recipes-kernel/linux/linux-yocto_git.bbappend |
528 | /usr/local/yocto/meta-intel$ rm \ | ||
529 | meta-mymachine/recipes-kernel/linux/linux-yocto_git.bbappend | ||
530 | </literallayout> | 498 | </literallayout> |
531 | </para> | 499 | </para> |
532 | 500 | ||
@@ -595,18 +563,20 @@ | |||
595 | <orderedlist> | 563 | <orderedlist> |
596 | <listitem><para>Get the environment ready for the build by sourcing the environment | 564 | <listitem><para>Get the environment ready for the build by sourcing the environment |
597 | script. | 565 | script. |
598 | The environment script is in the Yocto Project source directory and has the string | 566 | The environment script is in the Yocto Project source directory |
567 | (<filename>poky</filename> in this example) and has the string | ||
599 | <filename>init-build-env</filename> in the file’s name. | 568 | <filename>init-build-env</filename> in the file’s name. |
600 | For this example, the following command gets the build environment ready: | 569 | For this example, the following command gets the build environment ready: |
601 | <literallayout class='monospaced'> | 570 | <literallayout class='monospaced'> |
602 | /usr/local/yocto$ source oe-init-build-env yocto-build | 571 | $ source oe-init-build-env yocto-build |
603 | </literallayout> | 572 | </literallayout> |
604 | When you source the script a build directory is created in the current | 573 | When you source the script a build directory is created in the current |
605 | working directory. | 574 | working directory. |
606 | In our example we were in the Yocto Project source directory. | 575 | In our example we were in the Yocto Project source directory. |
607 | Thus, entering the previous command created the <filename>yocto-build</filename> directory. | 576 | Thus, entering the previous command created the <filename>yocto-build</filename> directory. |
608 | If you do not provide a name for the build directory it defaults to build. | 577 | If you do not provide a name for the build directory it defaults to |
609 | The build directory contains a <filename>conf</filename> directory that contains | 578 | <filename>build</filename>. |
579 | The <filename>build</filename> directory contains a <filename>conf</filename> directory that has | ||
610 | two configuration files you will need to check: <filename>bblayers.conf</filename> | 580 | two configuration files you will need to check: <filename>bblayers.conf</filename> |
611 | and <filename>local.conf</filename>.</para></listitem> | 581 | and <filename>local.conf</filename>.</para></listitem> |
612 | <listitem><para>Check and edit the resulting <filename>local.conf</filename> file. | 582 | <listitem><para>Check and edit the resulting <filename>local.conf</filename> file. |
@@ -625,11 +595,10 @@ | |||
625 | <listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes | 595 | <listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes |
626 | the path to your new BSP layer. | 596 | the path to your new BSP layer. |
627 | In this example you need to include the pathname to <filename>meta-mymachine</filename>. | 597 | In this example you need to include the pathname to <filename>meta-mymachine</filename>. |
628 | For example, if you created a Yocto Project Git repository named | 598 | For this example the |
629 | <filename>yocto</filename> in <filename>/usr/local</filename> then the | ||
630 | <filename>BBLAYERS</filename> variable in the file would need to include the following path: | 599 | <filename>BBLAYERS</filename> variable in the file would need to include the following path: |
631 | <literallayout class='monospaced'> | 600 | <literallayout class='monospaced'> |
632 | /usr/local/yocto/meta-intel/meta-mymachine | 601 | $HOME/poky/meta-intel/meta-mymachine |
633 | </literallayout></para></listitem> | 602 | </literallayout></para></listitem> |
634 | </orderedlist> | 603 | </orderedlist> |
635 | </para> | 604 | </para> |
@@ -661,7 +630,7 @@ | |||
661 | <para> | 630 | <para> |
662 | You can find these recipes in the <filename>meta/recipes-core/images</filename> and | 631 | You can find these recipes in the <filename>meta/recipes-core/images</filename> and |
663 | <filename>meta/recipes-sato/images</filename> directories of the Yocto Project source | 632 | <filename>meta/recipes-sato/images</filename> directories of the Yocto Project source |
664 | tree or Git repository. | 633 | tree (the <filename>poky</filename> Git repository in this example). |
665 | Although the recipe names are somewhat explanatory, here is a list that describes them: | 634 | Although the recipe names are somewhat explanatory, here is a list that describes them: |
666 | <itemizedlist> | 635 | <itemizedlist> |
667 | <listitem><para><emphasis>Base</emphasis> – A foundational basic image without support | 636 | <listitem><para><emphasis>Base</emphasis> – A foundational basic image without support |
@@ -709,7 +678,7 @@ | |||
709 | For example, moving your working directory around could cause problems. | 678 | For example, moving your working directory around could cause problems. |
710 | Here is the command for this example: | 679 | Here is the command for this example: |
711 | <literallayout class='monospaced'> | 680 | <literallayout class='monospaced'> |
712 | /usr/local/yocto/yocto-build$ bitbake –k poky-image-sato-live | 681 | $ bitbake –k poky-image-sato-live |
713 | </literallayout> | 682 | </literallayout> |
714 | </para> | 683 | </para> |
715 | 684 | ||
@@ -806,48 +775,50 @@ | |||
806 | </para> | 775 | </para> |
807 | </section> | 776 | </section> |
808 | 777 | ||
809 | <section id='modifying-a-kernel'> | 778 | <section id='modifying-a-kernel-example'> |
810 | <title>Modifying a Kernel</title> | 779 | <title>Modifying a Kernel Example</title> |
811 | 780 | ||
812 | <para> | 781 | <para> |
813 | The remainder of this section presents a simple example that modifies a kernel. | 782 | 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 | 783 | For the purpose of this example we are going to base our new kernel on the current |
815 | Linux Yocto 2.6.37 release. | 784 | Linux Yocto 2.6.37 release. |
785 | </para> | ||
816 | 786 | ||
817 | 787 | ||
818 | 788 | ||
819 | 789 | ||
820 | 790 | ||
821 | 791 | ||
822 | <para> | 792 | <para> |
823 | [WRITER'S NOTE: This section is a second example that focuses on just modifying the kernel. | 793 | [WRITER'S NOTE: This section is a second example that focuses on just modifying the kernel. |
824 | I don't have any information on this yet. | 794 | I don't have any information on this yet. |
825 | </para> | 795 | </para> |
826 | 796 | ||
827 | <para> | 797 | <para> |
828 | Here are some points to consider though: | 798 | Here are some points to consider though: |
829 | <itemizedlist> | 799 | <itemizedlist> |
830 | <listitem><para>Reference Darren's presentation | 800 | <listitem><para>Reference Darren's presentation |
831 | <ulink url='http://events.linuxfoundation.org/events/embedded-linux-conference/hart'> | 801 | <ulink url='http://events.linuxfoundation.org/events/embedded-linux-conference/hart'> |
832 | here</ulink></para></listitem> | 802 | here</ulink></para></listitem> |
833 | <listitem><para>Reference <xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref> | 803 | <listitem><para>Reference <xref linkend='dev-manual-start'>Getting Started with the Yocto Project</xref> |
834 | section to get set up at minimum.</para></listitem> | 804 | section to get set up at minimum.</para></listitem> |
835 | <listitem><para>Are there extra steps I need specific to kernel development to get started?</para></listitem> | 805 | <listitem><para>Are there extra steps I need specific to kernel development to get started?</para></listitem> |
836 | <listitem><para>What do I do to get set up? | 806 | <listitem><para>What do I do to get set up? |
837 | Is it a matter of just installing YP and having some pieces together? | 807 | Is it a matter of just installing YP and having some pieces together? |
838 | What are the pieces?</para></listitem> | 808 | What are the pieces?</para></listitem> |
839 | <listitem><para>Where do I get the base kernel to start with?</para></listitem> | 809 | <listitem><para>Where do I get the base kernel to start with?</para></listitem> |
840 | <listitem><para>Do I install the appropriate toolchain?</para></listitem> | 810 | <listitem><para>Do I install the appropriate toolchain?</para></listitem> |
841 | <listitem><para>What kernel git repository do I use?</para></listitem> | 811 | <listitem><para>What kernel git repository do I use?</para></listitem> |
842 | <listitem><para>What is the conversion script? | 812 | <listitem><para>What is the conversion script? |
843 | What does it do?</para></listitem> | 813 | What does it do?</para></listitem> |
844 | <listitem><para>What do I have to do to integrate the kernel layer?</para></listitem> | 814 | <listitem><para>What do I have to do to integrate the kernel layer?</para></listitem> |
845 | <listitem><para>What do I use to integrate the kernel layer? | 815 | <listitem><para>What do I use to integrate the kernel layer? |
846 | HOB? | 816 | HOB? |
847 | Do I just Bitbake it?</para></listitem> | 817 | Do I just Bitbake it?</para></listitem> |
848 | <listitem><para>Using the System Image Creator.]</para></listitem> | 818 | <listitem><para>Using the System Image Creator.]</para></listitem> |
849 | </itemizedlist> | 819 | </itemizedlist> |
850 | </para> | 820 | </para> |
821 | </section> | ||
851 | </section> | 822 | </section> |
852 | </section> | 823 | </section> |
853 | 824 | ||
@@ -861,7 +832,8 @@ | |||
861 | <listitem><para>User-space Application Development scenario overview.</para></listitem> | 832 | <listitem><para>User-space Application Development scenario overview.</para></listitem> |
862 | <listitem><para>Using the Yocto Eclipse Plug-in.</para></listitem> | 833 | <listitem><para>Using the Yocto Eclipse Plug-in.</para></listitem> |
863 | <listitem><para>Back-door support.</para></listitem> | 834 | <listitem><para>Back-door support.</para></listitem> |
864 | <listitem><para>I feel there is more to this area than we have captured during our two review meetings.]</para></listitem> | 835 | <listitem><para>I feel there is more to this area than we have captured during our two |
836 | review meetings.]</para></listitem> | ||
865 | </itemizedlist> | 837 | </itemizedlist> |
866 | </para> | 838 | </para> |
867 | </section> | 839 | </section> |