diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-02-06 11:39:17 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-08 12:07:51 -0800 |
commit | 646bda0f1d24dbabb8e8ec8e0520d8f9cb817939 (patch) | |
tree | c7a72e80d467a710e607eef50fb65ea28c2db67d /documentation/dev-manual/dev-manual-common-tasks.xml | |
parent | 797758c0d496dc6938a5b6fe2681bfc908dde0cd (diff) | |
download | poky-646bda0f1d24dbabb8e8ec8e0520d8f9cb817939.tar.gz |
documentation/dev-manual/dev-manual-common-tasks.xml: links fixed.
Moving the "Common Tasks" section from the YP Reference Manual into
the YP Development Manual upset a bunch of links. I have corrected
these links.
(From yocto-docs rev: 69ee73c59958aaab6f6370231c65300d1d8c92f8)
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-common-tasks.xml')
-rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 166 |
1 files changed, 94 insertions, 72 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 4fef075360..14657861fc 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
@@ -23,7 +23,7 @@ | |||
23 | variables. | 23 | variables. |
24 | For information on variables that are useful for recipes and for information about recipe naming | 24 | For information on variables that are useful for recipes and for information about recipe naming |
25 | issues, see the | 25 | issues, see the |
26 | <link linkend='ref-varlocality-recipe-required'>Required</link> section for recipe variables. | 26 | <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-varlocality-recipe-required'>Required</ulink>" section of the Yocto Project Reference Manual. |
27 | </para> | 27 | </para> |
28 | 28 | ||
29 | <para> | 29 | <para> |
@@ -47,12 +47,14 @@ | |||
47 | <para> | 47 | <para> |
48 | Building an application from a single file that is stored locally (e.g. under | 48 | Building an application from a single file that is stored locally (e.g. under |
49 | <filename>files/</filename>) requires a recipe that has the file listed in | 49 | <filename>files/</filename>) requires a recipe that has the file listed in |
50 | the <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> variable. | 50 | the |
51 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> variable. | ||
51 | Additionally, you need to manually write the <filename>do_compile</filename> and | 52 | Additionally, you need to manually write the <filename>do_compile</filename> and |
52 | <filename>do_install</filename> tasks. | 53 | <filename>do_install</filename> tasks. |
53 | The <filename><link linkend='var-S'>S</link></filename> variable defines the | 54 | The <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename> variable defines the |
54 | directory containing the source code, which is set to <filename><link linkend='var-WORKDIR'> | 55 | directory containing the source code, which is set to |
55 | WORKDIR</link></filename> in this case - the directory BitBake uses for the build. | 56 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-WORKDIR'> |
57 | WORKDIR</ulink></filename> in this case - the directory BitBake uses for the build. | ||
56 | <literallayout class='monospaced'> | 58 | <literallayout class='monospaced'> |
57 | DESCRIPTION = "Simple helloworld application" | 59 | DESCRIPTION = "Simple helloworld application" |
58 | SECTION = "examples" | 60 | SECTION = "examples" |
@@ -89,7 +91,7 @@ | |||
89 | <para> | 91 | <para> |
90 | Applications that use Autotools such as <filename>autoconf</filename> and | 92 | Applications that use Autotools such as <filename>autoconf</filename> and |
91 | <filename>automake</filename> require a recipe that has a source archive listed in | 93 | <filename>automake</filename> require a recipe that has a source archive listed in |
92 | <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> and | 94 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> and |
93 | also inherits Autotools, which instructs BitBake to use the | 95 | also inherits Autotools, which instructs BitBake to use the |
94 | <filename>autotools.bbclass</filename> file, which contains the definitions of all the steps | 96 | <filename>autotools.bbclass</filename> file, which contains the definitions of all the steps |
95 | needed to build an Autotool-based application. | 97 | needed to build an Autotool-based application. |
@@ -111,10 +113,10 @@ | |||
111 | </para> | 113 | </para> |
112 | 114 | ||
113 | <para> | 115 | <para> |
114 | The variable <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link> | 116 | The variable |
115 | </filename> is used to track source license changes as described in the | 117 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename> |
116 | <link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Change</link> | 118 | is used to track source license changes as described in the |
117 | section. | 119 | "<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Change</ulink>" section. |
118 | You can quickly create Autotool-based recipes in a manner similar to the previous example. | 120 | You can quickly create Autotool-based recipes in a manner similar to the previous example. |
119 | </para> | 121 | </para> |
120 | </section> | 122 | </section> |
@@ -124,11 +126,11 @@ | |||
124 | 126 | ||
125 | <para> | 127 | <para> |
126 | Applications that use GNU <filename>make</filename> also require a recipe that has | 128 | Applications that use GNU <filename>make</filename> also require a recipe that has |
127 | the source archive listed in <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>. | 129 | the source archive listed in <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>. |
128 | You do not need to add a <filename>do_compile</filename> step since by default BitBake | 130 | You do not need to add a <filename>do_compile</filename> step since by default BitBake |
129 | starts the <filename>make</filename> command to compile the application. | 131 | starts the <filename>make</filename> command to compile the application. |
130 | If you need additional <filename>make</filename> options you should store them in the | 132 | If you need additional <filename>make</filename> options you should store them in the |
131 | <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable. | 133 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-EXTRA_OEMAKE'>EXTRA_OEMAKE</ulink></filename> variable. |
132 | BitBake passes these options into the <filename>make</filename> GNU invocation. | 134 | BitBake passes these options into the <filename>make</filename> GNU invocation. |
133 | Note that a <filename>do_install</filename> task is still required. | 135 | Note that a <filename>do_install</filename> task is still required. |
134 | Otherwise BitBake runs an empty <filename>do_install</filename> task by default. | 136 | Otherwise BitBake runs an empty <filename>do_install</filename> task by default. |
@@ -137,8 +139,8 @@ | |||
137 | <para> | 139 | <para> |
138 | Some applications might require extra parameters to be passed to the compiler. | 140 | Some applications might require extra parameters to be passed to the compiler. |
139 | For example, the application might need an additional header path. | 141 | For example, the application might need an additional header path. |
140 | You can accomplish this by adding to the <filename><link linkend='var-CFLAGS'>CFLAGS</link> | 142 | You can accomplish this by adding to the |
141 | </filename> variable. | 143 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-CFLAGS'>CFLAGS</ulink></filename> variable. |
142 | The following example shows this: | 144 | The following example shows this: |
143 | <literallayout class='monospaced'> | 145 | <literallayout class='monospaced'> |
144 | CFLAGS_prepend = "-I ${S}/include " | 146 | CFLAGS_prepend = "-I ${S}/include " |
@@ -179,8 +181,9 @@ | |||
179 | <title>Splitting an Application into Multiple Packages</title> | 181 | <title>Splitting an Application into Multiple Packages</title> |
180 | 182 | ||
181 | <para> | 183 | <para> |
182 | You can use the variables <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename> and | 184 | You can use the variables |
183 | <filename><link linkend='var-FILES'>FILES</link></filename> to split an application into | 185 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGES'>PACKAGES</ulink></filename> and |
186 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-FILES'>FILES</ulink></filename> to split an application into | ||
184 | multiple packages. | 187 | multiple packages. |
185 | </para> | 188 | </para> |
186 | 189 | ||
@@ -211,14 +214,17 @@ | |||
211 | In the previous example, we want to ship the <filename>sxpm</filename> | 214 | In the previous example, we want to ship the <filename>sxpm</filename> |
212 | and <filename>cxpm</filename> binaries in separate packages. | 215 | and <filename>cxpm</filename> binaries in separate packages. |
213 | Since <filename>bindir</filename> would be packaged into the main | 216 | Since <filename>bindir</filename> would be packaged into the main |
214 | <filename><link linkend='var-PN'>PN</link></filename> | 217 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PN'>PN</ulink></filename> |
215 | package by default, we prepend the <filename><link linkend='var-PACKAGES'>PACKAGES</link> | 218 | package by default, we prepend the |
219 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGES'>PACKAGES</ulink> | ||
216 | </filename> variable so additional package names are added to the start of list. | 220 | </filename> variable so additional package names are added to the start of list. |
217 | This results in the extra <filename><link linkend='var-FILES'>FILES</link></filename>_* | 221 | This results in the extra |
222 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-FILES'>FILES</ulink></filename>_* | ||
218 | variables then containing information that define which files and | 223 | variables then containing information that define which files and |
219 | directories go into which packages. | 224 | directories go into which packages. |
220 | Files included by earlier packages are skipped by latter packages. | 225 | Files included by earlier packages are skipped by latter packages. |
221 | Thus, the main <filename><link linkend='var-PN'>PN</link></filename> package | 226 | Thus, the main |
227 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PN'>PN</ulink></filename> package | ||
222 | does not include the above listed files. | 228 | does not include the above listed files. |
223 | </para> | 229 | </para> |
224 | </section> | 230 | </section> |
@@ -284,8 +290,9 @@ | |||
284 | </filename> function to the <filename>.bb</filename> file and use | 290 | </filename> function to the <filename>.bb</filename> file and use |
285 | <filename>PACKAGENAME</filename> as the name of the package you want to attach to the | 291 | <filename>PACKAGENAME</filename> as the name of the package you want to attach to the |
286 | <filename>postinst</filename> script. | 292 | <filename>postinst</filename> script. |
287 | Normally <filename><link linkend='var-PN'>PN</link></filename> can be used, which | 293 | Normally |
288 | automatically expands to PACKAGENAME. | 294 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PN'>PN</ulink></filename> |
295 | can be used, which automatically expands to PACKAGENAME. | ||
289 | A post-installation function has the following structure: | 296 | A post-installation function has the following structure: |
290 | <literallayout class='monospaced'> | 297 | <literallayout class='monospaced'> |
291 | pkg_postinst_PACKAGENAME () { | 298 | pkg_postinst_PACKAGENAME () { |
@@ -323,7 +330,8 @@ | |||
323 | 330 | ||
324 | <para> | 331 | <para> |
325 | The previous example delays execution until the image boots again because the | 332 | The previous example delays execution until the image boots again because the |
326 | <filename><link linkend='var-D'>D</link></filename> variable points | 333 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-D'>D</ulink></filename> |
334 | variable points | ||
327 | to the directory containing the image when the root filesystem is created at build time but | 335 | to the directory containing the image when the root filesystem is created at build time but |
328 | is unset when executed on the first boot. | 336 | is unset when executed on the first boot. |
329 | </para> | 337 | </para> |
@@ -355,7 +363,7 @@ | |||
355 | By creating a custom image, a developer has total control | 363 | By creating a custom image, a developer has total control |
356 | over the contents of the image. | 364 | over the contents of the image. |
357 | It is important to use the correct names of packages in the | 365 | It is important to use the correct names of packages in the |
358 | <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename> variable. | 366 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename> variable. |
359 | You must use the OpenEmbedded notation and not the Debian notation for the names | 367 | You must use the OpenEmbedded notation and not the Debian notation for the names |
360 | (e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>). | 368 | (e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>). |
361 | </para> | 369 | </para> |
@@ -380,12 +388,14 @@ | |||
380 | that is used to build the image or images. | 388 | that is used to build the image or images. |
381 | A good example of a tasks package is | 389 | A good example of a tasks package is |
382 | <filename>meta/recipes-sato/tasks/task-poky.bb</filename>. | 390 | <filename>meta/recipes-sato/tasks/task-poky.bb</filename>. |
383 | The <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename> | 391 | The |
392 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGES'>PACKAGES</ulink></filename> | ||
384 | variable lists the task packages to build along with the complementary | 393 | variable lists the task packages to build along with the complementary |
385 | <filename>-dbg</filename> and <filename>-dev</filename> packages. | 394 | <filename>-dbg</filename> and <filename>-dev</filename> packages. |
386 | For each package added, you can use | 395 | For each package added, you can use |
387 | <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> | 396 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-RDEPENDS'>RDEPENDS</ulink></filename> |
388 | and <filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename> | 397 | and |
398 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-RRECOMMENDS'>RRECOMMENDS</ulink></filename> | ||
389 | entries to provide a list of packages the parent task package should contain. | 399 | entries to provide a list of packages the parent task package should contain. |
390 | Following is an example: | 400 | Following is an example: |
391 | <literallayout class='monospaced'> | 401 | <literallayout class='monospaced'> |
@@ -423,7 +433,7 @@ | |||
423 | To build an image using these task packages, you need to add | 433 | To build an image using these task packages, you need to add |
424 | <filename>task-custom-apps</filename> and/or | 434 | <filename>task-custom-apps</filename> and/or |
425 | <filename>task-custom-tools</filename> to | 435 | <filename>task-custom-tools</filename> to |
426 | <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>. | 436 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>. |
427 | For other forms of image dependencies see the other areas of this section. | 437 | For other forms of image dependencies see the other areas of this section. |
428 | </para> | 438 | </para> |
429 | </section> | 439 | </section> |
@@ -435,7 +445,7 @@ | |||
435 | <para> | 445 | <para> |
436 | Ultimately users might want to add extra image features to the set used by | 446 | Ultimately users might want to add extra image features to the set used by |
437 | Yocto Project with the | 447 | Yocto Project with the |
438 | <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename> | 448 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_FEATURES'>IMAGE_FEATURES</ulink></filename> |
439 | variable. | 449 | variable. |
440 | To create these features, the best reference is | 450 | To create these features, the best reference is |
441 | <filename>meta/classes/core-image.bbclass</filename>, which shows how the | 451 | <filename>meta/classes/core-image.bbclass</filename>, which shows how the |
@@ -444,12 +454,12 @@ | |||
444 | <filename>IMAGE_FEATURES</filename> | 454 | <filename>IMAGE_FEATURES</filename> |
445 | variable and then maps that into a set of tasks or packages. | 455 | variable and then maps that into a set of tasks or packages. |
446 | Based on this information the | 456 | Based on this information the |
447 | <filename><link linkend='var-IMAGE_INSTALL'> IMAGE_INSTALL</link></filename> variable | 457 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'> IMAGE_INSTALL</ulink></filename> |
448 | is generated automatically. | 458 | variable is generated automatically. |
449 | Users can add extra features by extending the class or creating a custom class for use | 459 | Users can add extra features by extending the class or creating a custom class for use |
450 | with specialized image <filename>.bb</filename> files. | 460 | with specialized image <filename>.bb</filename> files. |
451 | You can also add more features by configuring the | 461 | You can also add more features by configuring the |
452 | <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> | 462 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</ulink></filename> |
453 | variable in the <filename>local.conf</filename> file found in the Yocto Project | 463 | variable in the <filename>local.conf</filename> file found in the Yocto Project |
454 | files located in the build directory. | 464 | files located in the build directory. |
455 | </para> | 465 | </para> |
@@ -486,7 +496,7 @@ | |||
486 | 496 | ||
487 | <para> | 497 | <para> |
488 | The simplest way to add extra packages to all images is by using the | 498 | The simplest way to add extra packages to all images is by using the |
489 | <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename> | 499 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename> |
490 | variable with the <filename>_append</filename> operator: | 500 | variable with the <filename>_append</filename> operator: |
491 | <literallayout class='monospaced'> | 501 | <literallayout class='monospaced'> |
492 | IMAGE_INSTALL_append = " strace" | 502 | IMAGE_INSTALL_append = " strace" |
@@ -521,7 +531,7 @@ | |||
521 | 531 | ||
522 | <para> | 532 | <para> |
523 | You can add packages using a similar approach through the | 533 | You can add packages using a similar approach through the |
524 | <filename><link linkend='var-POKY_EXTRA_INSTALL'>POKY_EXTRA_INSTALL</link></filename> | 534 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-POKY_EXTRA_INSTALL'>POKY_EXTRA_INSTALL</ulink></filename> |
525 | variable. | 535 | variable. |
526 | If you use this variable, only <filename>core-image-*</filename> images are affected. | 536 | If you use this variable, only <filename>core-image-*</filename> images are affected. |
527 | </para> | 537 | </para> |
@@ -534,7 +544,8 @@ | |||
534 | It is possible to filter or mask out recipe and recipe append files such that | 544 | It is possible to filter or mask out recipe and recipe append files such that |
535 | BitBake ignores them. | 545 | BitBake ignores them. |
536 | You can do this by providing an expression with the | 546 | You can do this by providing an expression with the |
537 | <filename><link linkend='var-BBMASK'>BBMASK</link></filename> variable. | 547 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBMASK'>BBMASK</ulink></filename> |
548 | variable. | ||
538 | Here is an example: | 549 | Here is an example: |
539 | <literallayout class='monospaced'> | 550 | <literallayout class='monospaced'> |
540 | BBMASK = ".*/meta-mymachine/recipes-maybe/" | 551 | BBMASK = ".*/meta-mymachine/recipes-maybe/" |
@@ -581,24 +592,24 @@ | |||
581 | <para> | 592 | <para> |
582 | The most important variables to set in this file are as follows: | 593 | The most important variables to set in this file are as follows: |
583 | <itemizedlist> | 594 | <itemizedlist> |
584 | <listitem><para><filename><link linkend='var-TARGET_ARCH'> | 595 | <listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-TARGET_ARCH'> |
585 | TARGET_ARCH</link></filename> (e.g. "arm")</para></listitem> | 596 | TARGET_ARCH</ulink></filename> (e.g. "arm")</para></listitem> |
586 | <listitem><para><filename><link linkend='var-PREFERRED_PROVIDER'> | 597 | <listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PREFERRED_PROVIDER'> |
587 | PREFERRED_PROVIDER</link></filename>_virtual/kernel (see below)</para></listitem> | 598 | PREFERRED_PROVIDER</ulink></filename>_virtual/kernel (see below)</para></listitem> |
588 | <listitem><para><filename><link linkend='var-MACHINE_FEATURES'> | 599 | <listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-MACHINE_FEATURES'> |
589 | MACHINE_FEATURES</link></filename> (e.g. "kernel26 apm screen wifi")</para></listitem> | 600 | MACHINE_FEATURES</ulink></filename> (e.g. "kernel26 apm screen wifi")</para></listitem> |
590 | </itemizedlist> | 601 | </itemizedlist> |
591 | </para> | 602 | </para> |
592 | 603 | ||
593 | <para> | 604 | <para> |
594 | You might also need these variables: | 605 | You might also need these variables: |
595 | <itemizedlist> | 606 | <itemizedlist> |
596 | <listitem><para><filename><link linkend='var-SERIAL_CONSOLE'> | 607 | <listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SERIAL_CONSOLE'> |
597 | SERIAL_CONSOLE</link></filename> (e.g. "115200 ttyS0")</para></listitem> | 608 | SERIAL_CONSOLE</ulink></filename> (e.g. "115200 ttyS0")</para></listitem> |
598 | <listitem><para><filename><link linkend='var-KERNEL_IMAGETYPE'> | 609 | <listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-KERNEL_IMAGETYPE'> |
599 | KERNEL_IMAGETYPE</link></filename> (e.g. "zImage")</para></listitem> | 610 | KERNEL_IMAGETYPE</ulink></filename> (e.g. "zImage")</para></listitem> |
600 | <listitem><para><filename><link linkend='var-IMAGE_FSTYPES'> | 611 | <listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_FSTYPES'> |
601 | IMAGE_FSTYPES</link></filename> (e.g. "tar.gz jffs2")</para></listitem> | 612 | IMAGE_FSTYPES</ulink></filename> (e.g. "tar.gz jffs2")</para></listitem> |
602 | </itemizedlist> | 613 | </itemizedlist> |
603 | </para> | 614 | </para> |
604 | 615 | ||
@@ -623,9 +634,10 @@ | |||
623 | 634 | ||
624 | <para> | 635 | <para> |
625 | If you are creating a new recipe, normal recipe-writing rules apply for setting | 636 | If you are creating a new recipe, normal recipe-writing rules apply for setting |
626 | up a <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>. | 637 | up a |
638 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>. | ||
627 | Thus, you need to specify any necessary patches and set | 639 | Thus, you need to specify any necessary patches and set |
628 | <filename><link linkend='var-S'>S</link></filename> to point at the source code. | 640 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename> to point at the source code. |
629 | You need to create a <filename>configure</filename> task that configures the | 641 | You need to create a <filename>configure</filename> task that configures the |
630 | unpacked kernel with a defconfig. | 642 | unpacked kernel with a defconfig. |
631 | You can do this by using a <filename>make defconfig</filename> command or, | 643 | You can do this by using a <filename>make defconfig</filename> command or, |
@@ -643,7 +655,7 @@ | |||
643 | used for other machines in a given kernel. | 655 | used for other machines in a given kernel. |
644 | A possible way to do this is by listing the file in the | 656 | A possible way to do this is by listing the file in the |
645 | <filename>SRC_URI</filename> and adding the machine to the expression in | 657 | <filename>SRC_URI</filename> and adding the machine to the expression in |
646 | <filename><link linkend='var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</link></filename>: | 658 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</ulink></filename>: |
647 | <literallayout class='monospaced'> | 659 | <literallayout class='monospaced'> |
648 | COMPATIBLE_MACHINE = '(qemux86|qemumips)' | 660 | COMPATIBLE_MACHINE = '(qemux86|qemumips)' |
649 | </literallayout> | 661 | </literallayout> |
@@ -698,20 +710,20 @@ | |||
698 | 710 | ||
699 | <para> | 711 | <para> |
700 | During a build, source is available in the | 712 | During a build, source is available in the |
701 | <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename> directory. | 713 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-WORKDIR'>WORKDIR</ulink></filename> directory. |
702 | The actual location depends on the type of package and the architecture of the target device. | 714 | The actual location depends on the type of package and the architecture of the target device. |
703 | For a standard recipe not related to | 715 | For a standard recipe not related to |
704 | <filename><link linkend='var-MACHINE'>MACHINE</link></filename>, the location is | 716 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-MACHINE'>MACHINE</ulink></filename>, the location is |
705 | <filename>tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/</filename>. | 717 | <filename>tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/</filename>. |
706 | For target device-dependent packages, you should use the <filename>MACHINE</filename> | 718 | For target device-dependent packages, you should use the <filename>MACHINE</filename> |
707 | variable instead of | 719 | variable instead of |
708 | <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename> | 720 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGE_ARCH'>PACKAGE_ARCH</ulink></filename> |
709 | in the directory name. | 721 | in the directory name. |
710 | </para> | 722 | </para> |
711 | 723 | ||
712 | <tip> | 724 | <tip> |
713 | Be sure the package recipe sets the | 725 | Be sure the package recipe sets the |
714 | <filename><link linkend='var-S'>S</link></filename> variable to something | 726 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename> variable to something |
715 | other than the standard <filename>WORKDIR/PN-PV/</filename> value. | 727 | other than the standard <filename>WORKDIR/PN-PV/</filename> value. |
716 | </tip> | 728 | </tip> |
717 | 729 | ||
@@ -729,7 +741,7 @@ | |||
729 | option forces re-execution of the specified task. | 741 | option forces re-execution of the specified task. |
730 | You can call other tasks this way as well. | 742 | You can call other tasks this way as well. |
731 | But note that all the modifications in | 743 | But note that all the modifications in |
732 | <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename> | 744 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-WORKDIR'>WORKDIR</ulink></filename> |
733 | are gone once you execute <filename>-c clean</filename> for a package. | 745 | are gone once you execute <filename>-c clean</filename> for a package. |
734 | </para> | 746 | </para> |
735 | </section> | 747 | </section> |
@@ -770,9 +782,9 @@ | |||
770 | <para> | 782 | <para> |
771 | You can find the resulting patch file in the | 783 | You can find the resulting patch file in the |
772 | <filename>patches/</filename> subdirectory of the source | 784 | <filename>patches/</filename> subdirectory of the source |
773 | (<filename><link linkend='var-S'>S</link></filename>) directory. | 785 | (<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename>) directory. |
774 | For future builds, you should copy the patch into the Yocto Project metadata and add it into the | 786 | For future builds, you should copy the patch into the Yocto Project metadata and add it into the |
775 | <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> of a recipe. | 787 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> of a recipe. |
776 | Here is an example: | 788 | Here is an example: |
777 | <literallayout class='monospaced'> | 789 | <literallayout class='monospaced'> |
778 | SRC_URI += "file://NAME-OF-PATCH.patch" | 790 | SRC_URI += "file://NAME-OF-PATCH.patch" |
@@ -781,8 +793,8 @@ | |||
781 | 793 | ||
782 | <para> | 794 | <para> |
783 | Finally, don't forget to 'bump' the | 795 | Finally, don't forget to 'bump' the |
784 | <filename><link linkend='var-PR'>PR</link></filename> value in the same recipe since | 796 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PR'>PR</ulink></filename> |
785 | the resulting packages have changed. | 797 | value in the same recipe since the resulting packages have changed. |
786 | </para> | 798 | </para> |
787 | </section> | 799 | </section> |
788 | 800 | ||
@@ -961,7 +973,8 @@ | |||
961 | If the package exists under a different name in a different distribution, you get a | 973 | If the package exists under a different name in a different distribution, you get a |
962 | <filename>distro_check</filename> mismatch. | 974 | <filename>distro_check</filename> mismatch. |
963 | You can resolve this problem by defining a per-distro recipe name alias using the | 975 | You can resolve this problem by defining a per-distro recipe name alias using the |
964 | <filename><link linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link></filename> variable. | 976 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</ulink></filename> |
977 | variable. | ||
965 | </para> | 978 | </para> |
966 | 979 | ||
967 | <para> | 980 | <para> |
@@ -1029,7 +1042,8 @@ | |||
1029 | 1042 | ||
1030 | <para> | 1043 | <para> |
1031 | To enable a layer, you simply add the layer's path to the | 1044 | To enable a layer, you simply add the layer's path to the |
1032 | <filename><link linkend='var-BBLAYERS'>BBLAYERS</link></filename> variable in your | 1045 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBLAYERS'>BBLAYERS</ulink></filename> |
1046 | variable in your | ||
1033 | <filename>bblayers.conf</filename> file, which is found in the Yocto Project file's | 1047 | <filename>bblayers.conf</filename> file, which is found in the Yocto Project file's |
1034 | build directory. | 1048 | build directory. |
1035 | The following example shows how to enable the <filename>meta-rt</filename>: | 1049 | The following example shows how to enable the <filename>meta-rt</filename>: |
@@ -1074,21 +1088,26 @@ | |||
1074 | 1088 | ||
1075 | <para> | 1089 | <para> |
1076 | In the previous example, the recipes for the layers are added to | 1090 | In the previous example, the recipes for the layers are added to |
1077 | <filename><link linkend='var-BBFILES'>BBFILES</link></filename>. | 1091 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILES'>BBFILES</ulink></filename>. |
1078 | The <filename><link linkend='var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</link></filename> | 1092 | The |
1093 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename> | ||
1079 | variable is then appended with the layer name. | 1094 | variable is then appended with the layer name. |
1080 | The <filename><link linkend='var-BBFILE_PATTERN'>BBFILE_PATTERN</link></filename> variable | 1095 | The |
1081 | immediately expands with a regular expression used to match files from | 1096 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename> |
1097 | variable immediately expands with a regular expression used to match files from | ||
1082 | <filename>BBFILES</filename> into | 1098 | <filename>BBFILES</filename> into |
1083 | a particular layer, in this case by using the base pathname. | 1099 | a particular layer, in this case by using the base pathname. |
1084 | The <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename> variable | 1100 | The |
1101 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename> | ||
1102 | variable | ||
1085 | then assigns different priorities to the files in different layers. | 1103 | then assigns different priorities to the files in different layers. |
1086 | Applying priorities is useful in situations where the same package might appear in multiple | 1104 | Applying priorities is useful in situations where the same package might appear in multiple |
1087 | layers and allows you to choose what layer should take precedence. | 1105 | layers and allows you to choose what layer should take precedence. |
1088 | </para> | 1106 | </para> |
1089 | 1107 | ||
1090 | <para> | 1108 | <para> |
1091 | Note the use of the <filename><link linkend='var-LAYERDIR'>LAYERDIR</link></filename> | 1109 | Note the use of the |
1110 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-LAYERDIR'>LAYERDIR</ulink></filename> | ||
1092 | variable with the immediate expansion operator. | 1111 | variable with the immediate expansion operator. |
1093 | The <filename>LAYERDIR</filename> variable expands to the directory of the current layer and | 1112 | The <filename>LAYERDIR</filename> variable expands to the directory of the current layer and |
1094 | requires the immediate expansion operator so that BitBake does not wait to expand the variable | 1113 | requires the immediate expansion operator so that BitBake does not wait to expand the variable |
@@ -1168,7 +1187,8 @@ | |||
1168 | <para> | 1187 | <para> |
1169 | If a committed change results in changing the package output, | 1188 | If a committed change results in changing the package output, |
1170 | then the value of the | 1189 | then the value of the |
1171 | <filename><link linkend='var-PR'>PR</link></filename> variable needs to be increased | 1190 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PR'>PR</ulink></filename> |
1191 | variable needs to be increased | ||
1172 | (or "bumped") as part of that commit. | 1192 | (or "bumped") as part of that commit. |
1173 | This means that for new recipes you must be sure to add the <filename>PR</filename> | 1193 | This means that for new recipes you must be sure to add the <filename>PR</filename> |
1174 | variable and set its initial value equal to "r0". | 1194 | variable and set its initial value equal to "r0". |
@@ -1180,7 +1200,8 @@ | |||
1180 | <para> | 1200 | <para> |
1181 | If you are sharing a common <filename>.inc</filename> file with multiple recipes, | 1201 | If you are sharing a common <filename>.inc</filename> file with multiple recipes, |
1182 | you can also use the | 1202 | you can also use the |
1183 | <filename><link linkend='var-INC_PR'>INC_PR</link></filename> variable to ensure that | 1203 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-INC_PR'>INC_PR</ulink></filename> |
1204 | variable to ensure that | ||
1184 | the recipes sharing the <filename>.inc</filename> file are rebuilt when the | 1205 | the recipes sharing the <filename>.inc</filename> file are rebuilt when the |
1185 | <filename>.inc</filename> file itself is changed. | 1206 | <filename>.inc</filename> file itself is changed. |
1186 | The <filename>.inc</filename> file must set <filename>INC_PR</filename> | 1207 | The <filename>.inc</filename> file must set <filename>INC_PR</filename> |
@@ -1192,8 +1213,8 @@ | |||
1192 | 1213 | ||
1193 | <para> | 1214 | <para> |
1194 | When upgrading the version of a package, assuming the | 1215 | When upgrading the version of a package, assuming the |
1195 | <filename><link linkend='var-PV'>PV</link></filename> changes, | 1216 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PV'>PV</ulink></filename> |
1196 | the <filename>PR</filename> variable should be reset to "r0" | 1217 | changes, the <filename>PR</filename> variable should be reset to "r0" |
1197 | (or "$(INC_PR).0" if you are using <filename>INC_PR</filename>). | 1218 | (or "$(INC_PR).0" if you are using <filename>INC_PR</filename>). |
1198 | </para> | 1219 | </para> |
1199 | 1220 | ||
@@ -1201,7 +1222,8 @@ | |||
1201 | Usually, version increases occur only to packages. | 1222 | Usually, version increases occur only to packages. |
1202 | However, if for some reason <filename>PV</filename> changes but does not | 1223 | However, if for some reason <filename>PV</filename> changes but does not |
1203 | increase, you can increase the | 1224 | increase, you can increase the |
1204 | <filename><link linkend='var-PE'>PE</link></filename> variable (Package Epoch). | 1225 | <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PE'>PE</ulink></filename> |
1226 | variable (Package Epoch). | ||
1205 | The <filename>PE</filename> variable defaults to "0". | 1227 | The <filename>PE</filename> variable defaults to "0". |
1206 | </para> | 1228 | </para> |
1207 | 1229 | ||