dev-manual: Edits to Quilt and finding temporary source code sections

These edits help place the two sections within the new organization
that basically splits out the devtool and quilt methods as ways
of modifying your source code.

(From yocto-docs rev: 1dc2e8783d9774bb98a30e06d114f1c9bfb85b71)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2015-01-29 06:48:05 -08:00 committed by Richard Purdie
parent be7e182140
commit b2a68067f5
1 changed files with 32 additions and 27 deletions

View File

@ -2264,20 +2264,23 @@
<ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink> <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
is a powerful tool that allows you to capture source code changes without having is a powerful tool that allows you to capture source code changes without having
a clean source tree. a clean source tree.
This section outlines the typical workflow you can use to modify temporary source code, This section outlines the typical workflow you can use to modify
test changes, and then preserve the changes in the form of a patch all using Quilt. source code, test changes, and then preserve the changes in the
form of a patch all using Quilt.
</para> </para>
<para> <para>
Follow these general steps: Follow these general steps:
<orderedlist> <orderedlist>
<listitem><para><emphasis>Find the Source Code:</emphasis> <listitem><para><emphasis>Find the Source Code:</emphasis>
The temporary source code used by the OpenEmbedded build system is kept in the Temporary source code used by the OpenEmbedded build system
Build Directory. is kept in the
<link linkend='build-directory'>Build Directory</link>.
See the See the
"<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>" "<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>"
section to learn how to locate the directory that has the temporary source code for a section to learn how to locate the directory that has the
particular package.</para></listitem> temporary source code for a particular package.
</para></listitem>
<listitem><para><emphasis>Change Your Working Directory:</emphasis> <listitem><para><emphasis>Change Your Working Directory:</emphasis>
You need to be in the directory that has the temporary source code. You need to be in the directory that has the temporary source code.
That directory is defined by the That directory is defined by the
@ -2298,15 +2301,16 @@
</literallayout> </literallayout>
</para></listitem> </para></listitem>
<listitem><para><emphasis>Edit the Files:</emphasis> <listitem><para><emphasis>Edit the Files:</emphasis>
Make your changes in the temporary source code to the files you added Make your changes in the source code to the files you added
to the patch.</para></listitem> to the patch.
</para></listitem>
<listitem><para><emphasis>Test Your Changes:</emphasis> <listitem><para><emphasis>Test Your Changes:</emphasis>
Once you have modified the source code, the easiest way to Once you have modified the source code, the easiest way to
your changes is by calling the your changes is by calling the
<filename>do_compile</filename> task as shown in the <filename>do_compile</filename> task as shown in the
following example: following example:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake -c compile -f <replaceable>name_of_package</replaceable> $ bitbake -c compile -f <replaceable>package</replaceable>
</literallayout> </literallayout>
The <filename>-f</filename> or <filename>&dash;&dash;force</filename> The <filename>-f</filename> or <filename>&dash;&dash;force</filename>
option forces the specified task to execute. option forces the specified task to execute.
@ -2318,9 +2322,9 @@
or or
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>
tasks using BitBake (i.e. tasks using BitBake (i.e.
<filename>bitbake -c clean <replaceable>name_of_package</replaceable></filename> <filename>bitbake -c clean <replaceable>package</replaceable></filename>
and and
<filename>bitbake -c cleanall <replaceable>name_of_package</replaceable></filename>). <filename>bitbake -c cleanall <replaceable>package</replaceable></filename>).
Modifications will also disappear if you use the <filename>rm_work</filename> Modifications will also disappear if you use the <filename>rm_work</filename>
feature as described in the feature as described in the
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>" "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
@ -2363,20 +2367,19 @@
<title>Finding Temporary Source Code</title> <title>Finding Temporary Source Code</title>
<para> <para>
You might You might find it helpful during development to modify the
find it helpful during development to modify the temporary source code used by recipes temporary source code used by recipes to build packages.
to build packages. For example, suppose you are developing a patch and you need to
For example, suppose you are developing a patch and you need to experiment a bit experiment a bit to figure out your solution.
to figure out your solution. After you have initially built the package, you can iteratively
After you have initially built the package, you can iteratively tweak the tweak the source code, which is located in the
source code, which is located in the
<link linkend='build-directory'>Build Directory</link>, and then <link linkend='build-directory'>Build Directory</link>, and then
you can force a re-compile and quickly test your altered code. you can force a re-compile and quickly test your altered code.
Once you settle on a solution, you can then preserve your changes in the form of Once you settle on a solution, you can then preserve your changes
patches. in the form of patches.
You can accomplish these steps all within either a If you are using Quilt for development, see the
<ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink> or "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
<link linkend='git'>Git</link> workflow. section for more information.
</para> </para>
<para> <para>
@ -2432,7 +2435,7 @@
<para> <para>
As an example, assume a Source Directory top-level folder As an example, assume a Source Directory top-level folder
name <filename>poky</filename>, a default Build Directory at named <filename>poky</filename>, a default Build Directory at
<filename>poky/build</filename>, and a <filename>poky/build</filename>, and a
<filename>qemux86-poky-linux</filename> machine target <filename>qemux86-poky-linux</filename> machine target
system. system.
@ -2446,9 +2449,11 @@
</para> </para>
<para> <para>
Now that you know where to locate the directory that has the temporary source code, Now that you know where to locate the directory that has the
you can use a Quilt or Git workflow to make your edits, test the changes, temporary source code, you can use a Quilt as described in section
and preserve the changes in the form of patches. "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
to make your edits, test the changes, and preserve the changes in
the form of patches.
</para> </para>
</section> </section>
</section> </section>