summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-06-12 18:02:32 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-18 10:30:48 +0100
commit7755de2532d76ba3998f52a76a986a581d97c852 (patch)
treed9a185c59ed4aed7aa056ef194d1f27d4a977184 /documentation/dev-manual
parent1daa2c0e9ee2f27c9c14e9e4553f7e97e3b6b74a (diff)
downloadpoky-7755de2532d76ba3998f52a76a986a581d97c852.tar.gz
dev-manual: Second draft of make race section.
Fixes [YOCTO #6390] Edits to the "Debugging Parallel Make Races" section. Changes originating from trying the procedure. (From yocto-docs rev: 537f5bd8918450e30ea87465025f0069232cb229) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml55
1 files changed, 45 insertions, 10 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 70cf6adf33..a507dc0efc 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -7328,7 +7328,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7328 And, during the build, BitBake runs into problems and 7328 And, during the build, BitBake runs into problems and
7329 creates the following output. 7329 creates the following output.
7330 <note> 7330 <note>
7331 This example log file has longer lines artifically 7331 This example log file has longer lines artificially
7332 broken to make the listing easier to read. 7332 broken to make the listing easier to read.
7333 </note> 7333 </note>
7334 If you examine the output or the log file, you see the 7334 If you examine the output or the log file, you see the
@@ -7422,7 +7422,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7422 Before you start the build, set the 7422 Before you start the build, set the
7423 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> 7423 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
7424 variable in your <filename>local.conf</filename> file to 7424 variable in your <filename>local.conf</filename> file to
7425 a high number (e.g. 20). 7425 a high number (e.g. "-j 20").
7426 Using a high value for <filename>PARALLEL_MAKE</filename> 7426 Using a high value for <filename>PARALLEL_MAKE</filename>
7427 increases the chances of the race condition showing up: 7427 increases the chances of the race condition showing up:
7428 <literallayout class='monospaced'> 7428 <literallayout class='monospaced'>
@@ -7452,6 +7452,22 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7452 to clearly be visible. 7452 to clearly be visible.
7453 In this case, a missing dependency exists for the "neard" 7453 In this case, a missing dependency exists for the "neard"
7454 Makefile target. 7454 Makefile target.
7455 Here is some abbreviated, sample output with the
7456 missing dependency clearly visible at the end:
7457 <literallayout class='monospaced'>
7458 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/......
7459 .
7460 .
7461 .
7462 tools/snep-send.c
7463 In file included from tools/snep-send.c:16:0:
7464 tools/../src/near.h:41:23: fatal error: near/dbus.h: No such file or directory
7465 #include &lt;near/dbus.h&gt;
7466 ^
7467 compilation terminated.
7468 make: *** [tools/snep-send.o] Error 1
7469 $
7470 </literallayout>
7455 </para> 7471 </para>
7456 </section> 7472 </section>
7457 7473
@@ -7466,7 +7482,9 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7466 You can use Quilt to create the patch: 7482 You can use Quilt to create the patch:
7467 <literallayout class='monospaced'> 7483 <literallayout class='monospaced'>
7468 $ quilt new parallelmake.patch 7484 $ quilt new parallelmake.patch
7485 Patch patches/parallelmake.patch is now on top
7469 $ quilt add Makefile.am 7486 $ quilt add Makefile.am
7487 File Makefile.am added to patch patches/parallelmake.patch
7470 </literallayout> 7488 </literallayout>
7471 For more information on using Quilt, see the 7489 For more information on using Quilt, see the
7472 "<link linkend='using-a-quilt-workflow'>Using a Quilt Workflow</link>" 7490 "<link linkend='using-a-quilt-workflow'>Using a Quilt Workflow</link>"
@@ -7477,9 +7495,11 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7477 At this point you need to make the edits to 7495 At this point you need to make the edits to
7478 <filename>Makefile.am</filename> to add the missing 7496 <filename>Makefile.am</filename> to add the missing
7479 dependency. 7497 dependency.
7480 For our example, you have to add the a 7498 For our example, you have to add the following line
7481 <filename>"tools/snep-send.$(OBJEXT): include/near/dbus.h"</filename> 7499 to the file:
7482 line. 7500 <literallayout class='monospaced'>
7501 tools/snep-send.$(OBJEXT): include/near/dbus.h
7502 </literallayout>
7483 </para> 7503 </para>
7484 7504
7485 <para> 7505 <para>
@@ -7487,17 +7507,31 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7487 <filename>refresh</filename> command to create the patch: 7507 <filename>refresh</filename> command to create the patch:
7488 <literallayout class='monospaced'> 7508 <literallayout class='monospaced'>
7489 $ quilt refresh 7509 $ quilt refresh
7510 Refreshed patch patches/parallelmake.patch
7490 </literallayout> 7511 </literallayout>
7491 Once the patch file exists, you need to add it back to the 7512 Once the patch file exists, you need to add it back to the
7492 originating recipe folder: 7513 originating recipe folder.
7514 Here is an example assuming a top-level
7515 <link linkend='source-directory'>Source Directory</link>
7516 named <filename>poky</filename>:
7493 <literallayout class='monospaced'> 7517 <literallayout class='monospaced'>
7494 $ cp patches/parallemake.patch &lt;location-of-neard-0.14-recipe-folder&gt; 7518 $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard
7495 </literallayout> 7519 </literallayout>
7496 The final thing you need to do to implement the fix in the 7520 The final thing you need to do to implement the fix in the
7497 build is to add the patch to the 7521 build is to update the "neard" recipe (i.e.
7522 <filename>neard-0.14.bb</filename> so that the
7498 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> 7523 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
7499 statement in the "neard" recipe 7524 statement includes the patch file.
7500 (<filename>neard-0.14.bb</filename>). 7525 The recipe file is in the folder above the patch.
7526 Here is what the edited <filename>SRC_URI</filename>
7527 statement would look like:
7528 <literallayout class='monospaced'>
7529 SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \
7530 file://neard.in \
7531 file://neard.service.in \
7532 file://parallelmake.patch \
7533 "
7534 </literallayout>
7501 </para> 7535 </para>
7502 7536
7503 <para> 7537 <para>
@@ -7526,6 +7560,7 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
7526 Now you can open up a <filename>devshell</filename> again 7560 Now you can open up a <filename>devshell</filename> again
7527 and repeat the clean and make operations as follows: 7561 and repeat the clean and make operations as follows:
7528 <literallayout class='monospaced'> 7562 <literallayout class='monospaced'>
7563 $ bitbake neard -c devshell
7529 $ make clean 7564 $ make clean
7530 $ make tools/snep-send.o 7565 $ make tools/snep-send.o
7531 </literallayout> 7566 </literallayout>