diff options
-rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 50 | ||||
-rw-r--r-- | documentation/ref-manual/ref-variables.xml | 70 |
2 files changed, 120 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 3c2012cf19..5e77516144 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
@@ -2875,6 +2875,56 @@ | |||
2875 | </para> | 2875 | </para> |
2876 | </section> | 2876 | </section> |
2877 | 2877 | ||
2878 | <section id='new-sharing-files-between-recipes'> | ||
2879 | <title>Sharing Files Between Recipes</title> | ||
2880 | |||
2881 | <para> | ||
2882 | Recipes often need to use files provided by other recipes on | ||
2883 | the build host. | ||
2884 | For example, an application linking to a common library needs | ||
2885 | access to the library itself and its associated headers. | ||
2886 | The way this access is accomplished is by populating sysroot | ||
2887 | with files. | ||
2888 | One sysroot exists per "machine" for which the image is | ||
2889 | being built. | ||
2890 | In practical terms, this means a sysroot exists for the target | ||
2891 | machine, and a sysroot exists for the build host. | ||
2892 | <note> | ||
2893 | You could find the term "staging" used within the Yocto | ||
2894 | project regarding files populating sysroot. | ||
2895 | The term "staging" was used for previous releases of | ||
2896 | the Yocto Project. | ||
2897 | </note> | ||
2898 | </para> | ||
2899 | |||
2900 | <para> | ||
2901 | Recipes should never populate the sysroot directly (i.e. write | ||
2902 | files into sysroot). | ||
2903 | Instead, files should be installed into standard locations | ||
2904 | during the | ||
2905 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink> | ||
2906 | task within the | ||
2907 | <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename> | ||
2908 | directory. | ||
2909 | A subset of these files automatically populates the sysroot. | ||
2910 | The reason for this limitation is that almost all files that | ||
2911 | populate the sysroot are cataloged in manifests in order to | ||
2912 | ensure the files can be removed later when a recipe is either | ||
2913 | modified or removed. | ||
2914 | Thus, the sysroot is able to remain free from stale files. | ||
2915 | </para> | ||
2916 | |||
2917 | <para> | ||
2918 | For information on variables you can use to help control how | ||
2919 | files sysroot is populated, see the | ||
2920 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></ulink>, | ||
2921 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SYSROOT_DIRS_NATIVE'><filename>SYSROOT_DIRS_NATIVE</filename></ulink>, | ||
2922 | and | ||
2923 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SYSROOT_DIRS_BLACKLIST'><filename>SYSROOT_DIRS_BLACKLIST</filename></ulink> | ||
2924 | variables. | ||
2925 | </para> | ||
2926 | </section> | ||
2927 | |||
2878 | <section id='properly-versioning-pre-release-recipes'> | 2928 | <section id='properly-versioning-pre-release-recipes'> |
2879 | <title>Properly Versioning Pre-Release Recipes</title> | 2929 | <title>Properly Versioning Pre-Release Recipes</title> |
2880 | 2930 | ||
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 99f3e03446..1ec804d100 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml | |||
@@ -13095,6 +13095,76 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
13095 | </glossdef> | 13095 | </glossdef> |
13096 | </glossentry> | 13096 | </glossentry> |
13097 | 13097 | ||
13098 | <glossentry id='var-SYSROOT_DIRS'><glossterm>SYSROOT_DIRS</glossterm> | ||
13099 | <info> | ||
13100 | SYSROOT_DIRS[doc] = "Directories that are staged in the sysroot." | ||
13101 | </info> | ||
13102 | <glossdef> | ||
13103 | <para role="glossdeffirst"> | ||
13104 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
13105 | Directories that are staged in the sysroot. | ||
13106 | By default, the following directories are staged: | ||
13107 | <literallayout class='monospaced'> | ||
13108 | SYSROOT_DIRS = " \ | ||
13109 | ${includedir} \ | ||
13110 | ${libdir} \ | ||
13111 | ${base_libdir} \ | ||
13112 | ${nonarch_base_libdir} \ | ||
13113 | ${datadir} \ | ||
13114 | " | ||
13115 | </literallayout> | ||
13116 | </para> | ||
13117 | </glossdef> | ||
13118 | </glossentry> | ||
13119 | |||
13120 | <glossentry id='var-SYSROOT_DIRS_BLACKLIST'><glossterm>SYSROOT_DIRS_BLACKLIST</glossterm> | ||
13121 | <info> | ||
13122 | SYSROOT_DIRS_BLACKLIST[doc] = "Directories that should not be staged into sysroot." | ||
13123 | </info> | ||
13124 | <glossdef> | ||
13125 | <para role="glossdeffirst"> | ||
13126 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
13127 | Directories that should not be staged into sysroot. | ||
13128 | By default, the following directories are not staged: | ||
13129 | <literallayout class='monospaced'> | ||
13130 | SYSROOT_DIRS_BLACKLIST = " \ | ||
13131 | ${mandir} \ | ||
13132 | ${docdir} \ | ||
13133 | ${infodir} \ | ||
13134 | ${datadir}/locale \ | ||
13135 | ${datadir}/applications \ | ||
13136 | ${datadir}/fonts \ | ||
13137 | ${datadir}/pixmaps \ | ||
13138 | " | ||
13139 | </literallayout> | ||
13140 | </para> | ||
13141 | </glossdef> | ||
13142 | </glossentry> | ||
13143 | |||
13144 | <glossentry id='var-SYSROOT_DIRS_NATIVE'><glossterm>SYSROOT_DIRS_NATIVE</glossterm> | ||
13145 | <info> | ||
13146 | SYSROOT_DIRS_NATIVE[doc] = "Extra directories staged for native into sysroot." | ||
13147 | </info> | ||
13148 | <glossdef> | ||
13149 | <para role="glossdeffirst"> | ||
13150 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
13151 | Extra directories staged for native into sysroot. | ||
13152 | By default, the following directories are staged: | ||
13153 | <literallayout class='monospaced'> | ||
13154 | SYSROOT_DIRS_NATIVE = " \ | ||
13155 | ${bindir} \ | ||
13156 | ${sbindir} \ | ||
13157 | ${base_bindir} \ | ||
13158 | ${base_sbindir} \ | ||
13159 | ${libexecdir} \ | ||
13160 | ${sysconfdir} \ | ||
13161 | ${localstatedir} \ | ||
13162 | " | ||
13163 | </literallayout> | ||
13164 | </para> | ||
13165 | </glossdef> | ||
13166 | </glossentry> | ||
13167 | |||
13098 | <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm> | 13168 | <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm> |
13099 | <info> | 13169 | <info> |
13100 | SYSROOT_PREPROCESS_FUNCS[doc] = "A list of functions to execute after files are staged into the sysroot. These functions are usually used to apply additional processing on the staged files, or to stage additional files." | 13170 | SYSROOT_PREPROCESS_FUNCS[doc] = "A list of functions to execute after files are staged into the sysroot. These functions are usually used to apply additional processing on the staged files, or to stage additional files." |