diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 55a2995519..39ce2a2497 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -2891,9 +2891,9 @@ machine, and a sysroot exists for the build host. You could find the term "staging" used within the Yocto - project regarding files populating sysroot. - The term "staging" was used for previous releases of - the Yocto Project. + project regarding files populating sysroot (e.g. the + STAGING_DIR + variable). @@ -2906,7 +2906,12 @@ task within the ${D} directory. - A subset of these files automatically populates the sysroot. + + + + A subset of these files, as defined by the + the SYSROOT_DIRS + variable, automatically populates the sysroot. The reason for this limitation is that almost all files that populate the sysroot are cataloged in manifests in order to ensure the files can be removed later when a recipe is either @@ -2914,6 +2919,17 @@ Thus, the sysroot is able to remain free from stale files. + + It is possible to modify the list of directories that populate + the sysroot. + The following example shows how you could add the + /opt directory to the list of + directories: + + SYSROOT_DIRS += "/opt" + + + For information on variables you can use to help control how files sysroot is populated, see the diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 9d6fab0c94..af1ed8408b 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -12692,9 +12692,22 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" Specifies the path to the top-level sysroots directory (i.e. ${TMPDIR}/sysroots). + + + + STAGING_DIR contains the directories + that are staged into the sysroot by the + do_populate_sysroot + task. + See the + SYSROOT_DIRS + variable and the + "Sharing Files Between Recipes" + section for more information. Recipes should never write files directly under - this directory because the OpenEmbedded build system + the STAGING_DIR directory because + the OpenEmbedded build system manages the directory automatically. Instead, files should be installed to ${D}