diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2011-07-22 15:04:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-04 15:06:44 +0100 |
commit | 2c7834cae617d75c89192ba65444a2f5c9b00357 (patch) | |
tree | 4c3225b9dde6ab3fef114417ca61485b0721adaa /documentation | |
parent | e77f5649e08f96d2480567a515fd73d3f21cccd3 (diff) | |
download | poky-2c7834cae617d75c89192ba65444a2f5c9b00357.tar.gz |
documentation/dev-manual/dev-manual-cases.xml: re-write of BSP example
Completed the terminology scrub for the yp files.
(From yocto-docs rev: c99f64541bf09ad7267625828894e3364dcdf937)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/dev-manual/dev-manual-cases.xml | 82 |
1 files changed, 44 insertions, 38 deletions
diff --git a/documentation/dev-manual/dev-manual-cases.xml b/documentation/dev-manual/dev-manual-cases.xml index bb8389bc10..610412d166 100644 --- a/documentation/dev-manual/dev-manual-cases.xml +++ b/documentation/dev-manual/dev-manual-cases.xml | |||
@@ -97,10 +97,23 @@ | |||
97 | contributing back to the Yocto Project. | 97 | contributing back to the Yocto Project. |
98 | However, if you just want a hierarchical file structure that contains the recipes | 98 | However, if you just want a hierarchical file structure that contains the recipes |
99 | and metadata that let you develop you can download tarballs from the | 99 | and metadata that let you develop you can download tarballs from the |
100 | <ulink url='http://yoctoproject.org/download'>download page</ulink>. | 100 | <ulink url='http://yoctoproject.org/download'>download page</ulink>. |
101 | </para> | ||
102 | |||
103 | <para> | ||
104 | Regardless of the method you use this manual will refer to the resulting | ||
105 | hierarchical set of files as "the local Yocto Project files." | ||
106 | </para> | ||
107 | |||
108 | <para> | ||
109 | [WRITER'S NOTE: I need to substitute correct and actual filenames for the | ||
110 | 1.1 release throughout this example once they become available.] | ||
111 | </para> | ||
112 | |||
113 | <para> | ||
101 | If you download a tarball you can extract it into any directory you want using the | 114 | If you download a tarball you can extract it into any directory you want using the |
102 | tar command. | 115 | tar command. |
103 | For example, the following command extracts the Yocto Project 1.1_M2 release tarball | 116 | For example, the following command extracts the Yocto Project 1.1 release tarball |
104 | into the current working directory and sets up a file structure whose top-level | 117 | into the current working directory and sets up a file structure whose top-level |
105 | directory is named <filename>poky-1.1</filename>: | 118 | directory is named <filename>poky-1.1</filename>: |
106 | <literallayout class='monospaced'> | 119 | <literallayout class='monospaced'> |
@@ -124,8 +137,8 @@ | |||
124 | </para> | 137 | </para> |
125 | 138 | ||
126 | <para> | 139 | <para> |
127 | Once you have the repository set up you have many development branches from which | 140 | Once you have the local <filename>poky</filename> Git repository set up, |
128 | you can work. | 141 | you have many development branches from which you can work. |
129 | From inside the repository you can see the branch names and the tag names used | 142 | From inside the repository you can see the branch names and the tag names used |
130 | in the Git repository using either of the following two commands: | 143 | in the Git repository using either of the following two commands: |
131 | <literallayout class='monospaced'> | 144 | <literallayout class='monospaced'> |
@@ -133,8 +146,8 @@ | |||
133 | $ git tag -l | 146 | $ git tag -l |
134 | </literallayout> | 147 | </literallayout> |
135 | For this example we are going to use the Yocto Project 1.1 Release, | 148 | For this example we are going to use the Yocto Project 1.1 Release, |
136 | which maps to the <filename>[NEED BRANCH]</filename> branch in the repository. | 149 | which maps to the <filename>1.1</filename> branch in the repository. |
137 | These commands create a local branch named <filename>[NEED BRANCH]</filename> | 150 | These commands create a local branch named <filename>1.1</filename> |
138 | that tracks the remote branch of the same name. | 151 | that tracks the remote branch of the same name. |
139 | <literallayout class='monospaced'> | 152 | <literallayout class='monospaced'> |
140 | 153 | ||
@@ -142,7 +155,6 @@ | |||
142 | $ git checkout -b 1.1 origin/1.1 | 155 | $ git checkout -b 1.1 origin/1.1 |
143 | Switched to a new branch '1.1' | 156 | Switched to a new branch '1.1' |
144 | </literallayout> | 157 | </literallayout> |
145 | [WRITER'S NOTE: I NEED THE REAL BRANCH NAMES IN THE EXAMPLE.] | ||
146 | </para> | 158 | </para> |
147 | </section> | 159 | </section> |
148 | 160 | ||
@@ -181,11 +193,11 @@ | |||
181 | 193 | ||
182 | <para> | 194 | <para> |
183 | You need to have the base BSP layer on your development system. | 195 | You need to have the base BSP layer on your development system. |
184 | Like the Yocto Project's <filename>poky</filename> Git repository you can get the BSP | 196 | Like the local Yocto Project files, you can get the BSP |
185 | layer one of two ways: | 197 | layer one of two ways: |
186 | download the BSP tarball and extract it, or set up a local Git repository that | 198 | download the BSP tarball and extract it, or set up a local Git repository that |
187 | has the Yocto Project BSP layers. | 199 | has the Yocto Project BSP layers. |
188 | You should use the same method that you used to get the Yocto Project files earlier. | 200 | You should use the same method that you used to get the local Yocto Project files earlier. |
189 | </para> | 201 | </para> |
190 | 202 | ||
191 | <para> | 203 | <para> |
@@ -202,14 +214,14 @@ | |||
202 | </para> | 214 | </para> |
203 | 215 | ||
204 | <para> | 216 | <para> |
205 | If you cloned a Yocto Project Git repository (<filename>poky</filename>) | 217 | If you cloned a <filename>poky</filename> Git repository |
206 | then you need to do the same for the | 218 | then you need to set up a different local Git repository |
207 | BSP, which is located in Yocto Project's <filename>meta-intel</filename> Git repository. | 219 | (<filename>meta-intel</filename>) for the BSP. |
208 | The <filename>meta-intel</filename> repository contains all the metadata | 220 | The <filename>meta-intel</filename> Git repository contains all the metadata |
209 | that supports BSP creation. | 221 | that supports BSP creation. |
210 | When you set up the <filename>meta-intel</filename> Git repository you can | 222 | When you set up the <filename>meta-intel</filename> Git repository you can |
211 | set it up anywhere you want. | 223 | set it up anywhere you want. |
212 | We will set up the <filename>meta-intel</filename> Git repository inside the | 224 | We will set up the repository inside the |
213 | <filename>poky</filename> Git repository in this example. | 225 | <filename>poky</filename> Git repository in this example. |
214 | </para> | 226 | </para> |
215 | 227 | ||
@@ -232,13 +244,12 @@ | |||
232 | <para> | 244 | <para> |
233 | Because <filename>meta-intel</filename> is its own Git repository you will want | 245 | Because <filename>meta-intel</filename> is its own Git repository you will want |
234 | to be sure you are in the appropriate branch for your work. | 246 | to be sure you are in the appropriate branch for your work. |
235 | For this example we are going to use the <filename>[NEED BRANCH]</filename> branch. | 247 | For this example we are going to use the <filename>1.1</filename> branch. |
236 | <literallayout class='monospaced'> | 248 | <literallayout class='monospaced'> |
237 | $ cd meta-intel | 249 | $ cd meta-intel |
238 | $ git checkout -b 1.1 origin/1.1 | 250 | $ git checkout -b 1.1 origin/1.1 |
239 | Switched to a new branch 'bernard' | 251 | Switched to a new branch 'bernard' |
240 | </literallayout> | 252 | </literallayout> |
241 | [WRITER'S NOTE: I NEED THE REAL BRANCH NAMES IN THE EXAMPLE.] | ||
242 | </para> | 253 | </para> |
243 | </section> | 254 | </section> |
244 | 255 | ||
@@ -246,7 +257,7 @@ | |||
246 | <title>Making a Copy of the Base BSP to Create Your New BSP Layer</title> | 257 | <title>Making a Copy of the Base BSP to Create Your New BSP Layer</title> |
247 | 258 | ||
248 | <para> | 259 | <para> |
249 | Now that you have the Yocto Project and base BSP files you need to create a | 260 | Now that you have the local Yocto Project files and the base BSP files you need to create a |
250 | new layer for your BSP. | 261 | new layer for your BSP. |
251 | </para> | 262 | </para> |
252 | 263 | ||
@@ -267,16 +278,11 @@ | |||
267 | Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>, | 278 | Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>, |
268 | <filename>mpc8315e</filename>, and <filename>routerstationpro</filename>. | 279 | <filename>mpc8315e</filename>, and <filename>routerstationpro</filename>. |
269 | The recipes and configurations for these four BSPs are located and dispersed | 280 | The recipes and configurations for these four BSPs are located and dispersed |
270 | within <filename>meta-yocto</filename>, which can be found in the | 281 | within local Yocto Project files. |
271 | area you unpacked the Yocto Project release tarball or set up your local | ||
272 | <filename>poky</filename> Git repository. | ||
273 | Consequently, they are not totally isolated in the spirit of layers unless you think | 282 | Consequently, they are not totally isolated in the spirit of layers unless you think |
274 | of <filename>meta-yocto</filename> as a layer itself. | 283 | of <filename>meta-yocto</filename> as a layer itself. |
275 | On the other hand, the Yocto Project has isolated BSP layers within | 284 | On the other hand, BSP layers for Crown Bay, Emenlow, Jasper Forest, |
276 | <filename>meta-intel</filename> Git repository for the Crown Bay, Emenlow, Jasper Forest, | 285 | N450, and Sugar Bay are isolated. |
277 | N450, and Sugar Bay. | ||
278 | If you are not using a <filename>meta-intel</filename> Git repository then you would | ||
279 | downloaded a tarball for one of these isolated BSP layers. | ||
280 | </note> | 286 | </note> |
281 | 287 | ||
282 | <para> | 288 | <para> |
@@ -289,8 +295,7 @@ | |||
289 | configuration information. | 295 | configuration information. |
290 | You can see the standard layout for the Crown Bay BSP in this example by examining the | 296 | You can see the standard layout for the Crown Bay BSP in this example by examining the |
291 | directory structure of the <filename>meta-crownbay</filename> layer inside the | 297 | directory structure of the <filename>meta-crownbay</filename> layer inside the |
292 | <filename>meta-intel</filename> Git repository or the area where you unpacked the | 298 | local Yocto Project files. |
293 | Crown Bay BSP tarball. | ||
294 | </para> | 299 | </para> |
295 | 300 | ||
296 | <para> | 301 | <para> |
@@ -300,10 +305,11 @@ | |||
300 | The name must follow the BSP layer naming convention, which is | 305 | The name must follow the BSP layer naming convention, which is |
301 | <filename>meta-<name></filename>. | 306 | <filename>meta-<name></filename>. |
302 | The following example assumes your working directory is <filename>meta-intel</filename> | 307 | The following example assumes your working directory is <filename>meta-intel</filename> |
303 | inside the <filename>meta-intel</filename> Git repository. | 308 | inside the local Yocto Project files. |
304 | If you downloaded and expanded a Crown Bay tarball then you simply copy the resulting | 309 | If you downloaded and expanded a Crown Bay tarball then you simply copy the resulting |
305 | <filename>meta-crownbay</filename> directory structure to a location of your choice. | 310 | <filename>meta-crownbay</filename> directory structure to a location of your choice. |
306 | Good practice for a Git repository is to just copy the new layer alongside the existing | 311 | Good practice for a Git repository, however, is to just copy the new layer alongside |
312 | the existing | ||
307 | BSP layers in the <filename>meta-intel</filename> Git repository: | 313 | BSP layers in the <filename>meta-intel</filename> Git repository: |
308 | <literallayout class='monospaced'> | 314 | <literallayout class='monospaced'> |
309 | $ cp -a meta-crownbay/ meta-mymachine | 315 | $ cp -a meta-crownbay/ meta-mymachine |
@@ -429,7 +435,7 @@ | |||
429 | Now let's look at changes in <filename>recipes-core</filename>. | 435 | Now let's look at changes in <filename>recipes-core</filename>. |
430 | The file <filename>task-core-tools.bbappend</filename> in | 436 | The file <filename>task-core-tools.bbappend</filename> in |
431 | <filename>recipes-core/tasks</filename> appends the similarly named recipe | 437 | <filename>recipes-core/tasks</filename> appends the similarly named recipe |
432 | located in the <filename>poky</filename> Git repository at | 438 | located in the local Yocto Project files at |
433 | <filename>meta/recipes-core/tasks</filename>. | 439 | <filename>meta/recipes-core/tasks</filename>. |
434 | The "append" file in our layer right now is Crown Bay-specific and supports | 440 | The "append" file in our layer right now is Crown Bay-specific and supports |
435 | EMGD and non-EMGD. | 441 | EMGD and non-EMGD. |
@@ -454,13 +460,13 @@ | |||
454 | Finally, let's look at <filename>recipes-kernel</filename> changes. | 460 | Finally, let's look at <filename>recipes-kernel</filename> changes. |
455 | Recall that the BSP uses the <filename>linux-yocto</filename> kernel as determined | 461 | Recall that the BSP uses the <filename>linux-yocto</filename> kernel as determined |
456 | earlier in the <filename>mymachine.conf</filename>. | 462 | earlier in the <filename>mymachine.conf</filename>. |
457 | The recipe for that kernel is located is not located in the | 463 | The recipe for that kernel is not located in the |
458 | BSP layer but rather in the <filename>poky</filename> Git repository at | 464 | BSP layer but rather in the local Yocto Project files at |
459 | <filename>meta/recipes-kernel/linux</filename> and is | 465 | <filename>meta/recipes-kernel/linux</filename> and is |
460 | named <filename>linux-yocto-2.6.37.bb</filename>. | 466 | named <filename>linux-yocto-2.6.37.bb</filename>. |
461 | The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename> | 467 | The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename> |
462 | statements point to the exact commits in the <filename>poky</filename> Git repository | 468 | statements point to the exact commits used by the Yocto Project development team |
463 | that identify the right kernel for our hardware. | 469 | in their source repositories that identify the right kernel for our hardware. |
464 | </para> | 470 | </para> |
465 | 471 | ||
466 | <para> | 472 | <para> |
@@ -518,7 +524,8 @@ | |||
518 | 524 | ||
519 | <para> | 525 | <para> |
520 | If you are familiar with Git repositories you probably won’t have trouble locating the | 526 | If you are familiar with Git repositories you probably won’t have trouble locating the |
521 | exact commit strings you need to change the <filename>SRCREV</filename> statements. | 527 | exact commit strings in the Yocto Project source repositories you need to change |
528 | the <filename>SRCREV</filename> statements. | ||
522 | You can find all the <filename>machine</filename> and <filename>meta</filename> | 529 | You can find all the <filename>machine</filename> and <filename>meta</filename> |
523 | branch points (commits) for the <filename>linux-yocto-2.6.37</filename> kernel | 530 | branch points (commits) for the <filename>linux-yocto-2.6.37</filename> kernel |
524 | <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.37'>here</ulink>. | 531 | <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.37'>here</ulink>. |
@@ -607,9 +614,8 @@ | |||
607 | <orderedlist> | 614 | <orderedlist> |
608 | <listitem><para>Get the environment ready for the build by sourcing the environment | 615 | <listitem><para>Get the environment ready for the build by sourcing the environment |
609 | script. | 616 | script. |
610 | The environment script is in the top-level of the <filename>poky</filename> | 617 | The environment script is in the top-level of the local Yocto Project files |
611 | Git repository or the top-level directory in which you unpacked the Yocto Project | 618 | directory structure. |
612 | release tarball. | ||
613 | The script has the string | 619 | The script has the string |
614 | <filename>init-build-env</filename> in the file’s name. | 620 | <filename>init-build-env</filename> in the file’s name. |
615 | For this example, the following command gets the build environment ready: | 621 | For this example, the following command gets the build environment ready: |