diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2016-08-08 14:13:06 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-18 23:50:47 +0100 |
commit | 1a1fc42e9f0c609d9c57e6a0a68a67f03db6acbf (patch) | |
tree | 370e4c5dfca8c14b7b3f46effd8a1c3c800d48f0 /documentation/ref-manual | |
parent | 813be27f8cb1726866c98686d4dcec5a683cad44 (diff) | |
download | poky-1a1fc42e9f0c609d9c57e6a0a68a67f03db6acbf.tar.gz |
ref-manual: Clarify and flesh out debugging using bitbake -e
Fixes [YOCTO #10099]
Renamed the log file section to better describe what the user
is accomplishing.
Renamed and repositioned the variables section to better describe
and emphasize the task. Also fleshed out the variables section with
more information.
(From yocto-docs rev: 0606fe481416a07bf98fc8ae79a30c1d62e75e6d)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r-- | documentation/ref-manual/usingpoky.xml | 75 |
1 files changed, 54 insertions, 21 deletions
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml index 99912ff14e..f70c1966e1 100644 --- a/documentation/ref-manual/usingpoky.xml +++ b/documentation/ref-manual/usingpoky.xml | |||
@@ -163,9 +163,8 @@ | |||
163 | <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>. | 163 | <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>. |
164 | </note> | 164 | </note> |
165 | 165 | ||
166 | 166 | <section id='usingpoky-debugging-viewing-logs-from-failed-tasks'> | |
167 | <section id='usingpoky-debugging-taskfailures'> | 167 | <title>Viewing Logs from Failed Tasks</title> |
168 | <title>Task Failures</title> | ||
169 | 168 | ||
170 | <para>The log file for shell tasks is available in | 169 | <para>The log file for shell tasks is available in |
171 | <filename>${WORKDIR}/temp/log.do_<replaceable>taskname</replaceable>.pid</filename>. | 170 | <filename>${WORKDIR}/temp/log.do_<replaceable>taskname</replaceable>.pid</filename>. |
@@ -183,6 +182,58 @@ | |||
183 | </para> | 182 | </para> |
184 | </section> | 183 | </section> |
185 | 184 | ||
185 | <section id='usingpoky-debugging-viewing-variable-values'> | ||
186 | <title>Viewing Variable Values</title> | ||
187 | <para> | ||
188 | BitBake's <filename>-e</filename> option is used to display | ||
189 | variable values after parsing. | ||
190 | The following command displays the variable values after the | ||
191 | configuration files (i.e. <filename>local.conf</filename>, | ||
192 | <filename>bblayers.conf</filename>, and so forth) have been | ||
193 | parsed: | ||
194 | <literallayout class='monospaced'> | ||
195 | $ bitbake -e | ||
196 | </literallayout> | ||
197 | The following command displays variable values after a specific | ||
198 | recipe has been parsed. | ||
199 | The variables include those from the configuration as well: | ||
200 | <literallayout class='monospaced'> | ||
201 | $ bitbake -e recipename | ||
202 | </literallayout> | ||
203 | <note><para> | ||
204 | Each recipe has its own private set of variables (datastore). | ||
205 | Internally, after parsing the configuration, a copy of the | ||
206 | resulting datastore is made prior to parsing each recipe. | ||
207 | This copying implies that variables set in one recipe will | ||
208 | not be visible to other recipes.</para> | ||
209 | |||
210 | <para>Likewise, each task within a recipe gets a private | ||
211 | datastore based on the recipe datastore, which means that | ||
212 | variables set within one task will not be visible to | ||
213 | other tasks.</para> | ||
214 | </note> | ||
215 | </para> | ||
216 | |||
217 | <para> | ||
218 | In the output of <filename>bitbake -e</filename>, each variable is | ||
219 | preceded by a description of how the variable got its value, | ||
220 | including temporary values that were later overriden. | ||
221 | This description also includes variable flags (varflags) set on | ||
222 | the variable. | ||
223 | The output can be very helpful during debugging. | ||
224 | </para> | ||
225 | |||
226 | <para> | ||
227 | Variables that are exported to the environment are preceded by | ||
228 | <filename>export</filename> in the output of | ||
229 | <filename>bitbake -e</filename>. | ||
230 | See the following example: | ||
231 | <literallayout class='monospaced'> | ||
232 | export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86" | ||
233 | </literallayout> | ||
234 | </para> | ||
235 | </section> | ||
236 | |||
186 | <section id='usingpoky-debugging-taskrunning'> | 237 | <section id='usingpoky-debugging-taskrunning'> |
187 | <title>Running Specific Tasks</title> | 238 | <title>Running Specific Tasks</title> |
188 | 239 | ||
@@ -319,7 +370,6 @@ | |||
319 | 370 | ||
320 | </section> | 371 | </section> |
321 | 372 | ||
322 | |||
323 | <section id='usingpoky-debugging-dependencies'> | 373 | <section id='usingpoky-debugging-dependencies'> |
324 | <title>Dependency Graphs</title> | 374 | <title>Dependency Graphs</title> |
325 | 375 | ||
@@ -410,23 +460,6 @@ | |||
410 | </para> | 460 | </para> |
411 | </section> | 461 | </section> |
412 | 462 | ||
413 | <section id='usingpoky-debugging-variables'> | ||
414 | <title>Variables</title> | ||
415 | <para> | ||
416 | You can use the <filename>-e</filename> BitBake option to | ||
417 | display the parsing environment for a configuration. | ||
418 | The following displays the general parsing environment: | ||
419 | <literallayout class='monospaced'> | ||
420 | $ bitbake -e | ||
421 | </literallayout> | ||
422 | This next example shows the parsing environment for a specific | ||
423 | recipe: | ||
424 | <literallayout class='monospaced'> | ||
425 | $ bitbake -e <replaceable>recipename</replaceable> | ||
426 | </literallayout> | ||
427 | </para> | ||
428 | </section> | ||
429 | |||
430 | <section id='recipe-logging-mechanisms'> | 463 | <section id='recipe-logging-mechanisms'> |
431 | <title>Recipe Logging Mechanisms</title> | 464 | <title>Recipe Logging Mechanisms</title> |
432 | <para> | 465 | <para> |