diff options
Diffstat (limited to 'documentation/poky-ref-manual/ref-bitbake.xml')
-rw-r--r-- | documentation/poky-ref-manual/ref-bitbake.xml | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/documentation/poky-ref-manual/ref-bitbake.xml b/documentation/poky-ref-manual/ref-bitbake.xml index 6851fbf603..930b0a23f7 100644 --- a/documentation/poky-ref-manual/ref-bitbake.xml +++ b/documentation/poky-ref-manual/ref-bitbake.xml | |||
@@ -260,8 +260,50 @@ | |||
260 | <para> | 260 | <para> |
261 | Once all the tasks have been completed BitBake exits. | 261 | Once all the tasks have been completed BitBake exits. |
262 | </para> | 262 | </para> |
263 | </section> | ||
264 | 263 | ||
264 | <para> | ||
265 | When running a task, BitBake tightly controls the execution environment | ||
266 | of the build tasks to make sure unwanted contamination from the build machine | ||
267 | cannot influence the build. | ||
268 | Consequently, if you do want something to get passed into the build | ||
269 | task's environment, you must take a few steps: | ||
270 | <orderedlist> | ||
271 | <listitem><para>Tell BitBake to load what you want from the environment | ||
272 | into the data store. | ||
273 | You can do so through the <filename>BB_ENV_WHITELIST</filename> | ||
274 | variable. | ||
275 | For example, assume you want to prevent the build system from | ||
276 | accessing your <filename>$HOME/.ccache</filename> directory. | ||
277 | The following command tells BitBake to load | ||
278 | <filename>CCACHE_DIR</filename> from the environment into the data | ||
279 | store: | ||
280 | <literallayout class='monospaced'> | ||
281 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" | ||
282 | </literallayout></para></listitem> | ||
283 | <listitem><para>Tell BitBake to export what you have loaded into the | ||
284 | environment store to the task environment of every running task. | ||
285 | Loading something from the environment into the data store | ||
286 | (previous step) only makes it available in the datastore. | ||
287 | To export it to the task environment of every running task, | ||
288 | use a command similar to the following in your | ||
289 | <filename>local.conf</filename> or distro configuration file: | ||
290 | <literallayout class='monospaced'> | ||
291 | export CCACHE_DIR | ||
292 | </literallayout></para></listitem> | ||
293 | </orderedlist> | ||
294 | </para> | ||
295 | |||
296 | <note> | ||
297 | A side effect of the previous steps is that BitBake records the variable | ||
298 | as a dependency of the build process in things like the shared state | ||
299 | checksums. | ||
300 | If doing so results in unnecessary rebuilds of tasks, you can whitelist the | ||
301 | variable so that the shared state code ignores the dependency when it creates | ||
302 | checksums. | ||
303 | For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename> | ||
304 | example in <xref linkend='checksums'>Checksums (Signatures)</xref>. | ||
305 | </note> | ||
306 | </section> | ||
265 | 307 | ||
266 | <section id='ref-bitbake-commandline'> | 308 | <section id='ref-bitbake-commandline'> |
267 | <title>BitBake Command Line</title> | 309 | <title>BitBake Command Line</title> |