From 2480e011888e59969d603257bdf623e6ffd9282d Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 4 Jan 2019 10:17:03 -0800 Subject: ref-manual: Updates to FILESPATH and IMAGE_FSTYPES variables. 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 Signed-off-by: Richard Purdie --- documentation/ref-manual/ref-variables.xml | 95 ++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 26 deletions(-) (limited to 'documentation') diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 9e51b7591c..ed65727fc7 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -5041,16 +5041,44 @@ - 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 - FILESPATH 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. + + + + During the build process, BitBake searches each directory + in FILESPATH in the specified order + when looking for files and patches specified by each file:// URI in a recipe's SRC_URI statements. + + 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: + + files/defconfig + files/MACHINEA/defconfig + files/MACHINEB/defconfig + + Also in the example, the SRC_URI + statement contains "file://defconfig". + Given this scenario, you can set + MACHINE + to "MACHINEA" and cause the build system to use files + from files/MACHINEA. + Set MACHINE to "MACHINEB" and the + build system uses files from + files/MACHINEB. + Finally, for any machine other than "MACHINEA" and + "MACHINEB", the build system uses files from + files/defconfig. + + The default value for the FILESPATH variable is defined in the base.bbclass @@ -5060,23 +5088,37 @@ FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" - - Do not hand-edit the FILESPATH - variable. - If you want the build system to look in directories - other than the defaults, extend the - FILESPATH variable by using the - FILESEXTRAPATHS - variable. + The FILESPATH variable is automatically + extended using the overrides from the + FILESOVERRIDES + variable. + Notes + + + Do not hand-edit the + FILESPATH variable. + If you want the build system to look in + directories other than the defaults, extend the + FILESPATH variable by + using the + FILESEXTRAPATHS + variable. + + + Be aware that the default + FILESPATH directories do + not map to directories in custom layers + where append files + (.bbappend) are used. + If you want the build system to find patches + or files that reside with your append files, + you need to extend the + FILESPATH variable by + using the FILESEXTRAPATHS + variable. + + - Be aware that the default FILESPATH - directories do not map to directories in custom layers - where append files (.bbappend) - are used. - If you want the build system to find patches or files - that reside with your append files, you need to extend - the FILESPATH variable by using - the FILESEXTRAPATHS variable. @@ -6076,11 +6118,12 @@ Notes - If you add "live" to - IMAGE_FSTYPES 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 + IMAGE_FSTYPES inside the + recipe, you must set + IMAGE_FSTYPES prior to + using the "inherit image" line. Due to the way the OpenEmbedded build system -- cgit v1.2.3-54-g00ecf