summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-common-tasks.xml
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2017-07-03 09:20:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-12 00:28:15 +0100
commitb171aea8369c38231c5e9c70f78c9403173e7cb6 (patch)
tree5d12259931c9dd72d72d7508d259cb1bbbec8c48 /documentation/dev-manual/dev-manual-common-tasks.xml
parent925f2b2fc231b3b4976a476aa93adabbcf6974f6 (diff)
downloadpoky-b171aea8369c38231c5e9c70f78c9403173e7cb6.tar.gz
dev-manual: Moved "Finding Temporary Source Code"
Fixes [YOCTO #11630] This section can stand as a separate task. I have moved it to the Common Tasks chapter. (From yocto-docs rev: e4fb1ce8b160528aae0f192add614a595b2560a3) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml105
1 files changed, 103 insertions, 2 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 0879d0d3e0..2510d6e2d4 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -3967,6 +3967,107 @@
3967 </section> 3967 </section>
3968 </section> 3968 </section>
3969 3969
3970 <section id='finding-the-temporary-source-code'>
3971 <title>Finding Temporary Source Code</title>
3972
3973 <para>
3974 You might find it helpful during development to modify the
3975 temporary source code used by recipes to build packages.
3976 For example, suppose you are developing a patch and you need to
3977 experiment a bit to figure out your solution.
3978 After you have initially built the package, you can iteratively
3979 tweak the source code, which is located in the
3980 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
3981 and then you can force a re-compile and quickly test your altered
3982 code.
3983 Once you settle on a solution, you can then preserve your changes
3984 in the form of patches.
3985 </para>
3986
3987 <para>
3988 During a build, the unpacked temporary source code used by recipes
3989 to build packages is available in the Build Directory as
3990 defined by the
3991 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
3992 variable.
3993 Below is the default value for the <filename>S</filename> variable
3994 as defined in the
3995 <filename>meta/conf/bitbake.conf</filename> configuration file
3996 in the
3997 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>:
3998 <literallayout class='monospaced'>
3999 S = "${WORKDIR}/${BP}"
4000 </literallayout>
4001 You should be aware that many recipes override the
4002 <filename>S</filename> variable.
4003 For example, recipes that fetch their source from Git usually set
4004 <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
4005 <note>
4006 The
4007 <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
4008 represents the base recipe name, which consists of the name
4009 and version:
4010 <literallayout class='monospaced'>
4011 BP = "${BPN}-${PV}"
4012 </literallayout>
4013 </note>
4014 </para>
4015
4016 <para>
4017 The path to the work directory for the recipe
4018 (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>)
4019 is defined as follows:
4020 <literallayout class='monospaced'>
4021 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
4022 </literallayout>
4023 The actual directory depends on several things:
4024 <itemizedlist>
4025 <listitem><para>
4026 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
4027 The top-level build output directory.
4028 </para></listitem>
4029 <listitem><para>
4030 <ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>:
4031 The target system identifier.
4032 </para></listitem>
4033 <listitem><para>
4034 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
4035 The recipe name.
4036 </para></listitem>
4037 <listitem><para>
4038 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTENDPE'><filename>EXTENDPE</filename></ulink>:
4039 The epoch - (if
4040 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>
4041 is not specified, which is usually the case for most
4042 recipes, then <filename>EXTENDPE</filename> is blank).
4043 </para></listitem>
4044 <listitem><para>
4045 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
4046 The recipe version.
4047 </para></listitem>
4048 <listitem><para>
4049 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
4050 The recipe revision.
4051 </para></listitem>
4052 </itemizedlist>
4053 </para>
4054
4055 <para>
4056 As an example, assume a Source Directory top-level folder
4057 named <filename>poky</filename>, a default Build Directory at
4058 <filename>poky/build</filename>, and a
4059 <filename>qemux86-poky-linux</filename> machine target
4060 system.
4061 Furthermore, suppose your recipe is named
4062 <filename>foo_1.3.0.bb</filename>.
4063 In this case, the work directory the build system uses to
4064 build the package would be as follows:
4065 <literallayout class='monospaced'>
4066 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
4067 </literallayout>
4068 </para>
4069 </section>
4070
3970 <section id='platdev-building-targets-with-multiple-configurations'> 4071 <section id='platdev-building-targets-with-multiple-configurations'>
3971 <title>Building Targets with Multiple Configurations</title> 4072 <title>Building Targets with Multiple Configurations</title>
3972 4073
@@ -6532,8 +6633,8 @@
6532 <title>Finding the Kernel Source Code</title> 6633 <title>Finding the Kernel Source Code</title>
6533 6634
6534 <para> 6635 <para>
6535 Each time you build a kernel image, the kernel source code is fetched 6636 Each time you build a kernel image, the kernel source code
6536 and unpacked into the following directory: 6637 is fetched and unpacked into the following directory:
6537 <literallayout class='monospaced'> 6638 <literallayout class='monospaced'>
6538 ${S}/linux 6639 ${S}/linux
6539 </literallayout> 6640 </literallayout>