summaryrefslogtreecommitdiffstats
path: root/documentation
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
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')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml105
-rw-r--r--documentation/dev-manual/dev-manual-model.xml94
2 files changed, 103 insertions, 96 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>
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
index b1b5efa82c..8f0e5b1d9b 100644
--- a/documentation/dev-manual/dev-manual-model.xml
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -826,100 +826,6 @@
826 </orderedlist> 826 </orderedlist>
827 </para> 827 </para>
828 </section> 828 </section>
829
830 <section id='finding-the-temporary-source-code'>
831 <title>Finding Temporary Source Code</title>
832
833 <para>
834 You might find it helpful during development to modify the
835 temporary source code used by recipes to build packages.
836 For example, suppose you are developing a patch and you need to
837 experiment a bit to figure out your solution.
838 After you have initially built the package, you can iteratively
839 tweak the source code, which is located in the
840 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
841 and then you can force a re-compile and quickly test your altered code.
842 Once you settle on a solution, you can then preserve your changes
843 in the form of patches.
844 If you are using Quilt for development, see the
845 "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
846 section for more information.
847 </para>
848
849 <para>
850 During a build, the unpacked temporary source code used by recipes
851 to build packages is available in the Build Directory as
852 defined by the
853 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> variable.
854 Below is the default value for the <filename>S</filename> variable as defined in the
855 <filename>meta/conf/bitbake.conf</filename> configuration file in the
856 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>:
857 <literallayout class='monospaced'>
858 S = "${WORKDIR}/${BP}"
859 </literallayout>
860 You should be aware that many recipes override the <filename>S</filename> variable.
861 For example, recipes that fetch their source from Git usually set
862 <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
863 <note>
864 The
865 <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
866 represents the base recipe name, which consists of the name and version:
867 <literallayout class='monospaced'>
868 BP = "${BPN}-${PV}"
869 </literallayout>
870 </note>
871 </para>
872
873 <para>
874 The path to the work directory for the recipe
875 (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>)
876 is defined as follows:
877 <literallayout class='monospaced'>
878 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
879 </literallayout>
880 The actual directory depends on several things:
881 <itemizedlist>
882 <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
883 The top-level build output directory</listitem>
884 <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>:
885 The target system identifier</listitem>
886 <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
887 The recipe name</listitem>
888 <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTENDPE'><filename>EXTENDPE</filename></ulink>:
889 The epoch - (if
890 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>
891 is not specified, which is usually the case for most
892 recipes, then <filename>EXTENDPE</filename> is blank)</listitem>
893 <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
894 The recipe version</listitem>
895 <listitem><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
896 The recipe revision</listitem>
897 </itemizedlist>
898 </para>
899
900 <para>
901 As an example, assume a Source Directory top-level folder
902 named <filename>poky</filename>, a default Build Directory at
903 <filename>poky/build</filename>, and a
904 <filename>qemux86-poky-linux</filename> machine target
905 system.
906 Furthermore, suppose your recipe is named
907 <filename>foo_1.3.0.bb</filename>.
908 In this case, the work directory the build system uses to
909 build the package would be as follows:
910 <literallayout class='monospaced'>
911 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
912 </literallayout>
913 </para>
914
915 <para>
916 Now that you know where to locate the directory that has the
917 temporary source code, you can use Quilt as described in section
918 "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
919 to make your edits, test the changes, and preserve the changes in
920 the form of patches.
921 </para>
922 </section>
923</section> 829</section>
924 830
925<section id="platdev-appdev-devshell"> 831<section id="platdev-appdev-devshell">