]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
ref-manual: Updates to FILESPATH and IMAGE_FSTYPES variables.
authorScott Rifenbark <srifenbark@gmail.com>
Fri, 4 Jan 2019 18:17:03 +0000 (10:17 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Jan 2019 15:35:57 +0000 (15:35 +0000)
Fixes [YOCTO #13112]
Fixes [YOCTO #13115]

* FILESPATH: Added a detailed example of how to use the variable
  to set machine-specific configurations.  Also, noted the default
  behavior of using FILESOVERRIDES to automatically extend
  FILESPATH. Did some rewriting as well.

* IMAGE_FSTYPES: Updated the note to not be exclusive to "live"
  images.  The behavior applies to many images.

(From yocto-docs rev: 46e3f2545c45ba5391603f9ffa1c87896d472df6)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation/ref-manual/ref-variables.xml

index 9e51b7591c0a9a7e1c53da41350b8772b9887309..ed65727fc7f6e1e930ea13770e2ae3b2729e3171 100644 (file)
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    The default set of directories the OpenEmbedded build system
-                    uses when searching for patches and files.
-                    During the build process, BitBake searches each directory in
-                    <filename>FILESPATH</filename> in the specified order when
-                    looking for files and patches specified by each
+                    The default set of directories the OpenEmbedded build
+                    system uses when searching for patches and files.
+                </para>
+
+                <para>
+                    During the build process, BitBake searches each directory
+                    in <filename>FILESPATH</filename> in the specified order
+                    when looking for files and patches specified by each
                     <filename>file://</filename> URI in a recipe's
                     <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
                     statements.
                 </para>
 
+                <para>
+                    You can take advantage of this searching behavior in
+                    useful ways.
+                    For example, consider a case where the following
+                    directory structure exists for general and machine-specific
+                    configurations:
+                    <literallayout class='monospaced'>
+     files/defconfig
+     files/MACHINEA/defconfig
+     files/MACHINEB/defconfig
+                    </literallayout>
+                    Also in the example, the <filename>SRC_URI</filename>
+                    statement contains "file://defconfig".
+                    Given this scenario, you can set
+                    <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
+                    to "MACHINEA" and cause the build system to use files
+                    from <filename>files/MACHINEA</filename>.
+                    Set <filename>MACHINE</filename> to "MACHINEB" and the
+                    build system uses files from
+                    <filename>files/MACHINEB</filename>.
+                    Finally, for any machine other than "MACHINEA" and
+                    "MACHINEB", the build system uses files from
+                    <filename>files/defconfig</filename>.
+                </para>
+
                 <para>
                     The default value for the <filename>FILESPATH</filename>
                     variable is defined in the <filename>base.bbclass</filename>
      FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
         "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
                     </literallayout>
-                    <note>
-                        Do not hand-edit the <filename>FILESPATH</filename>
-                        variable.
-                        If you want the build system to look in directories
-                        other than the defaults, extend the
-                        <filename>FILESPATH</filename> variable by using the
-                        <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
-                        variable.
+                    The <filename>FILESPATH</filename> variable is automatically
+                    extended using the overrides from the
+                    <link linkend='var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></link>
+                    variable.
+                    <note><title>Notes</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                Do not hand-edit the
+                                <filename>FILESPATH</filename> variable.
+                                If you want the build system to look in
+                                directories other than the defaults, extend the
+                                <filename>FILESPATH</filename> variable by
+                                using the
+                                <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
+                                variable.
+                                </para></listitem>
+                            <listitem><para>
+                                Be aware that the default
+                                <filename>FILESPATH</filename> directories do
+                                not map to directories in custom layers
+                                where append files
+                                (<filename>.bbappend</filename>) are used.
+                                If you want the build system to find patches
+                                or files that reside with your append files,
+                                you need to extend the
+                                <filename>FILESPATH</filename> variable by
+                                using the <filename>FILESEXTRAPATHS</filename>
+                                variable.
+                                </para></listitem>
+                        </itemizedlist>
                     </note>
-                    Be aware that the default <filename>FILESPATH</filename>
-                    directories do not map to directories in custom layers
-                    where append files (<filename>.bbappend</filename>)
-                    are used.
-                    If you want the build system to find patches or files
-                    that reside with your append files, you need to extend
-                    the <filename>FILESPATH</filename> variable by using
-                    the <filename>FILESEXTRAPATHS</filename> variable.
                 </para>
 
                 <para>
                 <note><title>Notes</title>
                     <itemizedlist>
                         <listitem><para>
-                            If you add "live" to
-                            <filename>IMAGE_FSTYPES</filename> inside an image
-                            recipe, be sure that you do so prior to the
-                            "inherit image" line of the recipe or the live
-                            image will not build.
+                            If an image recipe uses the "inherit image" line
+                            and you are setting
+                            <filename>IMAGE_FSTYPES</filename> inside the
+                            recipe, you must set
+                            <filename>IMAGE_FSTYPES</filename> prior to
+                            using the "inherit image" line.
                             </para></listitem>
                         <listitem><para>
                             Due to the way the OpenEmbedded build system