summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-common-tasks.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml71
1 files changed, 36 insertions, 35 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 76a2c654dd..6e6577220d 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -685,37 +685,46 @@
685 </section> 685 </section>
686 686
687 <section id='using-bbappend-files'> 687 <section id='using-bbappend-files'>
688 <title>Using .bbappend Files</title> 688 <title>Using .bbappend Files in Your Layer</title>
689 689
690 <para> 690 <para>
691 Recipes used to append Metadata to other recipes are called 691 A recipe that appends Metadata to another recipe is called a
692 BitBake append files. 692 BitBake append file.
693 BitBake append files use the <filename>.bbappend</filename> file 693 A BitBake append file uses the <filename>.bbappend</filename>
694 type suffix, while the corresponding recipes to which Metadata 694 file type suffix, while the corresponding recipe to which
695 is being appended use the <filename>.bb</filename> file type 695 Metadata is being appended uses the <filename>.bb</filename>
696 suffix. 696 file type suffix.
697 </para> 697 </para>
698 698
699 <para> 699 <para>
700 A <filename>.bbappend</filename> file allows your layer to make 700 You can use a <filename>.bbappend</filename> file in your
701 additions or changes to the content of another layer's recipe 701 layer to make additions or changes to the content of another
702 without having to copy the other recipe into your layer. 702 layer's recipe without having to copy the other layer's
703 recipe into your layer.
703 Your <filename>.bbappend</filename> file resides in your layer, 704 Your <filename>.bbappend</filename> file resides in your layer,
704 while the main <filename>.bb</filename> recipe file to 705 while the main <filename>.bb</filename> recipe file to
705 which you are appending Metadata resides in a different layer. 706 which you are appending Metadata resides in a different layer.
706 </para> 707 </para>
707 708
708 <para> 709 <para>
709 Append files must have the same root names as their corresponding 710 Being able to append information to an existing recipe not only
710 recipes. 711 avoids duplication, but also automatically applies recipe
712 changes from a different layer into your layer.
713 If you were copying recipes, you would have to manually merge
714 changes as they occur.
715 </para>
716
717 <para>
718 When you create an append file, you must use the same root
719 name as the corresponding recipe file.
711 For example, the append file 720 For example, the append file
712 <filename>someapp_&DISTRO;.bbappend</filename> must apply to 721 <filename>someapp_&DISTRO;.bbappend</filename> must apply to
713 <filename>someapp_&DISTRO;.bb</filename>. 722 <filename>someapp_&DISTRO;.bb</filename>.
714 This means the original recipe and append file names are version 723 This means the original recipe and append file names are
715 number-specific. 724 version number-specific.
716 If the corresponding recipe is renamed to update to a newer 725 If the corresponding recipe is renamed to update to a newer
717 version, the corresponding <filename>.bbappend</filename> file must 726 version, you must also rename and possibly update
718 be renamed (and possibly updated) as well. 727 the corresponding <filename>.bbappend</filename> as well.
719 During the build process, BitBake displays an error on starting 728 During the build process, BitBake displays an error on starting
720 if it detects a <filename>.bbappend</filename> file that does 729 if it detects a <filename>.bbappend</filename> file that does
721 not have a corresponding recipe with a matching name. 730 not have a corresponding recipe with a matching name.
@@ -725,14 +734,6 @@
725 </para> 734 </para>
726 735
727 <para> 736 <para>
728 Being able to append information to an existing recipe not only
729 avoids duplication, but also automatically applies recipe
730 changes in a different layer to your layer.
731 If you were copying recipes, you would have to manually merge
732 changes as they occur.
733 </para>
734
735 <para>
736 As an example, consider the main formfactor recipe and a 737 As an example, consider the main formfactor recipe and a
737 corresponding formfactor append file both from the 738 corresponding formfactor append file both from the
738 <link linkend='source-directory'>Source Directory</link>. 739 <link linkend='source-directory'>Source Directory</link>.
@@ -744,8 +745,7 @@
744 SUMMARY = "Device formfactor information" 745 SUMMARY = "Device formfactor information"
745 SECTION = "base" 746 SECTION = "base"
746 LICENSE = "MIT" 747 LICENSE = "MIT"
747 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ 748 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
748 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
749 PR = "r45" 749 PR = "r45"
750 750
751 SRC_URI = "file://config file://machconfig" 751 SRC_URI = "file://config file://machconfig"
@@ -761,8 +761,7 @@
761 if [ -s "${S}/machconfig" ]; then 761 if [ -s "${S}/machconfig" ]; then
762 install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/ 762 install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
763 fi 763 fi
764 } 764 } </literallayout>
765 </literallayout>
766 In the main recipe, note the 765 In the main recipe, note the
767 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> 766 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
768 variable, which tells the OpenEmbedded build system where to 767 variable, which tells the OpenEmbedded build system where to
@@ -774,7 +773,8 @@
774 <filename>formfactor_0.0.bbappend</filename> and is from the 773 <filename>formfactor_0.0.bbappend</filename> and is from the
775 Raspberry Pi BSP Layer named 774 Raspberry Pi BSP Layer named
776 <filename>meta-raspberrypi</filename>. 775 <filename>meta-raspberrypi</filename>.
777 The file is in <filename>recipes-bsp/formfactor</filename>: 776 The file is in the layer at
777 <filename>recipes-bsp/formfactor</filename>:
778 <literallayout class='monospaced'> 778 <literallayout class='monospaced'>
779 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 779 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
780 </literallayout> 780 </literallayout>
@@ -794,12 +794,13 @@
794 </para> 794 </para>
795 795
796 <para> 796 <para>
797 The statement in this example extends the directories to include 797 The statement in this example extends the directories to
798 include
798 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>, 799 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>,
799 which resolves to a directory named 800 which resolves to a directory named
800 <filename>formfactor</filename> in the same directory 801 <filename>formfactor</filename> in the same directory
801 in which the append file resides (i.e. 802 in which the append file resides (i.e.
802 <filename>meta-raspberrypi/recipes-bsp/formfactor/formfactor</filename>. 803 <filename>meta-raspberrypi/recipes-bsp/formfactor</filename>.
803 This implies that you must have the supporting directory 804 This implies that you must have the supporting directory
804 structure set up that will contain any files or patches you 805 structure set up that will contain any files or patches you
805 will be including from the layer. 806 will be including from the layer.
@@ -807,8 +808,8 @@
807 808
808 <para> 809 <para>
809 Using the immediate expansion assignment operator 810 Using the immediate expansion assignment operator
810 <filename>:=</filename> is important because of the reference to 811 <filename>:=</filename> is important because of the reference
811 <filename>THISDIR</filename>. 812 to <filename>THISDIR</filename>.
812 The trailing colon character is important as it ensures that 813 The trailing colon character is important as it ensures that
813 items in the list remain colon-separated. 814 items in the list remain colon-separated.
814 <note> 815 <note>
@@ -6571,7 +6572,7 @@
6571 and <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> 6572 and <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
6572 statements enable the OpenEmbedded build system to find the patch file. 6573 statements enable the OpenEmbedded build system to find the patch file.
6573 For more information on using append files, see the 6574 For more information on using append files, see the
6574 "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" 6575 "<link linkend='using-bbappend-files'>Using .bbappend Files in Your Layer</link>"
6575 section. 6576 section.
6576 </para></listitem> 6577 </para></listitem>
6577 <listitem><para><emphasis>Put the patch file in your layer</emphasis>: 6578 <listitem><para><emphasis>Put the patch file in your layer</emphasis>:
@@ -7050,7 +7051,7 @@
7050 <listitem><para>Add a <filename>psplash</filename> 7051 <listitem><para>Add a <filename>psplash</filename>
7051 append file for a branded splash screen. 7052 append file for a branded splash screen.
7052 For information on append files, see the 7053 For information on append files, see the
7053 "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" 7054 "<link linkend='using-bbappend-files'>Using .bbappend Files in Your Layer</link>"
7054 section.</para></listitem> 7055 section.</para></listitem>
7055 <listitem><para>Add any other append files to make 7056 <listitem><para>Add any other append files to make
7056 custom changes that are specific to individual 7057 custom changes that are specific to individual