summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-model.xml
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2017-07-03 09:32:19 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-12 00:28:15 +0100
commit81add6e460ec9802e78e3bcb89637b2cfdd41ce2 (patch)
treec1f02048ccb00b83ed9a894a4d38e2901cb64d8b /documentation/dev-manual/dev-manual-model.xml
parentb171aea8369c38231c5e9c70f78c9403173e7cb6 (diff)
downloadpoky-81add6e460ec9802e78e3bcb89637b2cfdd41ce2.tar.gz
dev-manual: Moved "Using Quilt in Your Workflow" to tasks
Fixes [YOCTO #11630] The section on useing Quilt can be a stand-alone task. I moved it to the "Common Tasks" chapter. (From yocto-docs rev: bb84b88fc8fc7f82e7bbe580d408ae7880f38d8b) 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-model.xml')
-rw-r--r--documentation/dev-manual/dev-manual-model.xml110
1 files changed, 0 insertions, 110 deletions
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
index 8f0e5b1d9b..173871a843 100644
--- a/documentation/dev-manual/dev-manual-model.xml
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -716,116 +716,6 @@
716 </para> 716 </para>
717 </section> 717 </section>
718 </section> 718 </section>
719
720 <section id="using-a-quilt-workflow">
721 <title>Using Quilt in Your Workflow</title>
722
723 <para>
724 <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
725 is a powerful tool that allows you to capture source code changes
726 without having a clean source tree.
727 This section outlines the typical workflow you can use to modify
728 source code, test changes, and then preserve the changes in the
729 form of a patch all using Quilt.
730 <note><title>Tip</title>
731 With regard to preserving changes to source files if you
732 clean a recipe or have <filename>rm_work</filename> enabled,
733 the workflow described in the
734 "<link linkend='using-devtool-in-your-workflow'>Using <filename>devtool</filename> in Your Workflow</link>"
735 section is a safer development flow than the flow that
736 uses Quilt.
737 </note>
738 </para>
739
740 <para>
741 Follow these general steps:
742 <orderedlist>
743 <listitem><para><emphasis>Find the Source Code:</emphasis>
744 Temporary source code used by the OpenEmbedded build system
745 is kept in the
746 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
747 See the
748 "<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>"
749 section to learn how to locate the directory that has the
750 temporary source code for a particular package.
751 </para></listitem>
752 <listitem><para><emphasis>Change Your Working Directory:</emphasis>
753 You need to be in the directory that has the temporary source code.
754 That directory is defined by the
755 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
756 variable.</para></listitem>
757 <listitem><para><emphasis>Create a New Patch:</emphasis>
758 Before modifying source code, you need to create a new patch.
759 To create a new patch file, use <filename>quilt new</filename> as below:
760 <literallayout class='monospaced'>
761 $ quilt new my_changes.patch
762 </literallayout></para></listitem>
763 <listitem><para><emphasis>Notify Quilt and Add Files:</emphasis>
764 After creating the patch, you need to notify Quilt about the files
765 you plan to edit.
766 You notify Quilt by adding the files to the patch you just created:
767 <literallayout class='monospaced'>
768 $ quilt add file1.c file2.c file3.c
769 </literallayout>
770 </para></listitem>
771 <listitem><para><emphasis>Edit the Files:</emphasis>
772 Make your changes in the source code to the files you added
773 to the patch.
774 </para></listitem>
775 <listitem><para><emphasis>Test Your Changes:</emphasis>
776 Once you have modified the source code, the easiest way to
777 test your changes is by calling the
778 <filename>do_compile</filename> task as shown in the
779 following example:
780 <literallayout class='monospaced'>
781 $ bitbake -c compile -f <replaceable>package</replaceable>
782 </literallayout>
783 The <filename>-f</filename> or <filename>--force</filename>
784 option forces the specified task to execute.
785 If you find problems with your code, you can just keep editing and
786 re-testing iteratively until things work as expected.
787 <note>All the modifications you make to the temporary source code
788 disappear once you run the
789 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-clean'><filename>do_clean</filename></ulink>
790 or
791 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>
792 tasks using BitBake (i.e.
793 <filename>bitbake -c clean <replaceable>package</replaceable></filename>
794 and
795 <filename>bitbake -c cleanall <replaceable>package</replaceable></filename>).
796 Modifications will also disappear if you use the <filename>rm_work</filename>
797 feature as described in the
798 "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
799 section of the Yocto Project Quick Start.
800 </note></para></listitem>
801 <listitem><para><emphasis>Generate the Patch:</emphasis>
802 Once your changes work as expected, you need to use Quilt to generate the final patch that
803 contains all your modifications.
804 <literallayout class='monospaced'>
805 $ quilt refresh
806 </literallayout>
807 At this point, the <filename>my_changes.patch</filename> file has all your edits made
808 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
809 <filename>file3.c</filename> files.</para>
810 <para>You can find the resulting patch file in the <filename>patches/</filename>
811 subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
812 <listitem><para><emphasis>Copy the Patch File:</emphasis>
813 For simplicity, copy the patch file into a directory named <filename>files</filename>,
814 which you can create in the same directory that holds the recipe
815 (<filename>.bb</filename>) file or the
816 append (<filename>.bbappend</filename>) file.
817 Placing the patch here guarantees that the OpenEmbedded build system will find
818 the patch.
819 Next, add the patch into the
820 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
821 of the recipe.
822 Here is an example:
823 <literallayout class='monospaced'>
824 SRC_URI += "file://my_changes.patch"
825 </literallayout></para></listitem>
826 </orderedlist>
827 </para>
828 </section>
829</section> 719</section>
830 720
831<section id="platdev-appdev-devshell"> 721<section id="platdev-appdev-devshell">