summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2011-12-14 15:36:47 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-16 16:58:41 +0000
commitc7d27875880bd5b33efbec55947ac9e1c66b3d0e (patch)
tree7d9e5f38ef24410d20fe368fcfdecd5becfa94f0 /documentation
parent64d51768657c5d85e325338c38183398bb8bb64e (diff)
downloadast2050-yocto-poky-c7d27875880bd5b33efbec55947ac9e1c66b3d0e.zip
ast2050-yocto-poky-c7d27875880bd5b33efbec55947ac9e1c66b3d0e.tar.gz
documentation/poky-ref-manual/ref-bitbake.xml: Updated BitBake Running a Task
I added more information about how BitBake actually runs a task. The information has to do with how tightly BB controls the execution environment of the build tasks to prevent contamination from the build machine from leaking into the task execution environment. This tight control actually causes some unexpected behavior during builds. For example, when a user exports and BB_ENV_EXTRAWHITE an environment item such as CCACHE_DIR, the effects of the environment item never make it to the BB task execution environment. They only make it to the data store. The user actually has to take some extra steps to export that environment item into the task execution environment. The added information I put into the "Running a Task" section describes these extra steps. Fixes [YOCTO #689] Reported-by: Wolfgang Denk <wd@denx.de> (From yocto-docs rev: 182aa61693c2c7de8331569c30cbb8f41dad2315) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/poky-ref-manual/ref-bitbake.xml44
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 16c5137..6b05800 100644
--- a/documentation/poky-ref-manual/ref-bitbake.xml
+++ b/documentation/poky-ref-manual/ref-bitbake.xml
@@ -260,8 +260,50 @@
<para>
Once all the tasks have been completed BitBake exits.
</para>
- </section>
+ <para>
+ When running a task, BitBake tightly controls the execution environment
+ of the build tasks to make sure unwanted contamination from the build machine
+ cannot influence the build.
+ Consequently, if you do want something to get passed into the build
+ task's environment, you must take a few steps:
+ <orderedlist>
+ <listitem><para>Tell BitBake to load what you want from the environment
+ into the data store.
+ You can do so through the <filename>BB_ENV_WHITELIST</filename>
+ variable.
+ For example, assume you want to prevent the build system from
+ accessing your <filename>$HOME/.ccache</filename> directory.
+ The following command tells BitBake to load
+ <filename>CCACHE_DIR</filename> from the environment into the data
+ store:
+ <literallayout class='monospaced'>
+ export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
+ </literallayout></para></listitem>
+ <listitem><para>Tell BitBake to export what you have loaded into the
+ environment store to the task environment of every running task.
+ Loading something from the environment into the data store
+ (previous step) only makes it available in the datastore.
+ To export it to the task environment of every running task,
+ use a command similar to the following in your
+ <filename>local.conf</filename> or distro configuration file:
+ <literallayout class='monospaced'>
+ export CCACHE_DIR
+ </literallayout></para></listitem>
+ </orderedlist>
+ </para>
+
+ <note>
+ A side effect of the previous steps is that BitBake records the variable
+ as a dependency of the build process in things like the shared state
+ checksums.
+ If doing so results in unnecessary rebuilds of tasks, you can whitelist the
+ variable so that the shared state code ignores the dependency when it creates
+ checksums.
+ For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
+ example in <xref linkend='checksums'>Checksums (Signatures)</xref>.
+ </note>
+ </section>
<section id='ref-bitbake-commandline'>
<title>BitBake Command Line</title>
OpenPOWER on IntegriCloud