diff options
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index b263420813..b18d80b41f 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
@@ -395,7 +395,7 @@ | |||
395 | LICENSE = "MIT" | 395 | LICENSE = "MIT" |
396 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | 396 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ |
397 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 397 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
398 | PR = "r20" | 398 | PR = "r21" |
399 | 399 | ||
400 | SRC_URI = "file://config file://machconfig" | 400 | SRC_URI = "file://config file://machconfig" |
401 | S = "${WORKDIR}" | 401 | S = "${WORKDIR}" |
@@ -410,9 +410,15 @@ | |||
410 | if [ -s "${S}/machconfig" ]; then | 410 | if [ -s "${S}/machconfig" ]; then |
411 | install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/ | 411 | install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/ |
412 | fi | 412 | fi |
413 | } | 413 | } </literallayout> |
414 | </literallayout> | 414 | In the main recipe, note the |
415 | Here is the append file, which is named | 415 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> |
416 | variable, which tells the OpenEmbedded build system where to | ||
417 | find files during the build. | ||
418 | </para> | ||
419 | |||
420 | <para> | ||
421 | Following is the append file, which is named | ||
416 | <filename>formfactor_0.0.bbappend</filename> and is from the | 422 | <filename>formfactor_0.0.bbappend</filename> and is from the |
417 | Crown Bay BSP Layer named | 423 | Crown Bay BSP Layer named |
418 | <filename>meta-intel/meta-crownbay</filename>. | 424 | <filename>meta-intel/meta-crownbay</filename>. |
@@ -422,21 +428,33 @@ | |||
422 | 428 | ||
423 | PRINC := "${@int(PRINC) + 2}" | 429 | PRINC := "${@int(PRINC) + 2}" |
424 | </literallayout> | 430 | </literallayout> |
425 | This example adds or overrides files in | 431 | </para> |
426 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> | 432 | |
427 | within a <filename>.bbappend</filename> by extending the path | 433 | <para> |
428 | BitBake uses to search for files. | 434 | By default, the build system uses the |
429 | The most reliable way to do this is by prepending the | 435 | <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink> |
436 | variable to locate files. | ||
437 | This append file extends the locations by setting the | ||
430 | <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> | 438 | <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> |
431 | variable. | 439 | variable. |
432 | For example, if you have your files in a directory that is named | 440 | Setting this variable in the <filename>.bbappend</filename> |
433 | the same as your package | 441 | file is the most reliable and recommended method for adding |
434 | (<ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>), | 442 | directories to the search path used by the build system |
435 | you can add this directory by adding the following to your | 443 | to find files. |
436 | <filename>.bbappend</filename> file: | 444 | </para> |
437 | <literallayout class='monospaced'> | 445 | |
438 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 446 | <para> |
439 | </literallayout> | 447 | The statement in this example extends the directories to include |
448 | <filename>${THISDIR}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>, | ||
449 | which resolves to the same directory in which the append file | ||
450 | resides (i.e. | ||
451 | <filename>meta-intel/meta-crownbay/recipes-bsp/formfactor</filename>. | ||
452 | This implies that you must have the supporting directory | ||
453 | structure set up that will contain any files or patches you | ||
454 | will be including from the layer. | ||
455 | </para> | ||
456 | |||
457 | <para> | ||
440 | Using the immediate expansion assignment operator | 458 | Using the immediate expansion assignment operator |
441 | <filename>:=</filename> is important because of the reference to | 459 | <filename>:=</filename> is important because of the reference to |
442 | <filename>THISDIR</filename>. | 460 | <filename>THISDIR</filename>. |