From 81add6e460ec9802e78e3bcb89637b2cfdd41ce2 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 3 Jul 2017 09:32:19 -0700 Subject: 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 Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 134 +++++++++++++++++++++ documentation/dev-manual/dev-manual-model.xml | 110 ----------------- 2 files changed, 134 insertions(+), 110 deletions(-) diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 2510d6e2d4..b01871bfe7 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -4068,6 +4068,140 @@ +
+ Using Quilt in Your Workflow + + + Quilt + is a powerful tool that allows you to capture source code changes + without having a clean source tree. + This section outlines the typical workflow you can use to modify + source code, test changes, and then preserve the changes in the + form of a patch all using Quilt. + Tip + With regard to preserving changes to source files, if you + clean a recipe or have rm_work enabled, + the workflow described in the + "Using devtool in Your Workflow" + section is a safer development flow than the flow that + uses Quilt. + + + + + Follow these general steps: + + + Find the Source Code: + Temporary source code used by the OpenEmbedded build system + is kept in the + Build Directory. + See the + "Finding Temporary Source Code" + section to learn how to locate the directory that has the + temporary source code for a particular package. + + + Change Your Working Directory: + You need to be in the directory that has the temporary + source code. + That directory is defined by the + S + variable. + + Create a New Patch: + Before modifying source code, you need to create a new + patch. + To create a new patch file, use + quilt new as below: + + $ quilt new my_changes.patch + + + + Notify Quilt and Add Files: + After creating the patch, you need to notify Quilt about + the files you plan to edit. + You notify Quilt by adding the files to the patch you + just created: + + $ quilt add file1.c file2.c file3.c + + + + Edit the Files: + Make your changes in the source code to the files you added + to the patch. + + + Test Your Changes: + Once you have modified the source code, the easiest way to + test your changes is by calling the + do_compile task as shown in the + following example: + + $ bitbake -c compile -f package + + The -f or --force + option forces the specified task to execute. + If you find problems with your code, you can just keep + editing and re-testing iteratively until things work + as expected. + + All the modifications you make to the temporary + source code disappear once you run the + do_clean + or + do_cleanall + tasks using BitBake (i.e. + bitbake -c clean package + and + bitbake -c cleanall package). + Modifications will also disappear if you use the + rm_work feature as described + in the + "Building Images" + section of the Yocto Project Quick Start. + + + + Generate the Patch: + Once your changes work as expected, you need to use Quilt + to generate the final patch that contains all your + modifications. + + $ quilt refresh + + At this point, the my_changes.patch + file has all your edits made to the + file1.c, file2.c, + and file3.c files. + + You can find the resulting patch file in the + patches/ subdirectory of the source + (S) directory. + + + Copy the Patch File: + For simplicity, copy the patch file into a directory + named files, which you can create + in the same directory that holds the recipe + (.bb) file or the append + (.bbappend) file. + Placing the patch here guarantees that the OpenEmbedded + build system will find the patch. + Next, add the patch into the + SRC_URI + of the recipe. + Here is an example: + + SRC_URI += "file://my_changes.patch" + + + + +
+
Building Targets with Multiple Configurations 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 @@
- -
- Using Quilt in Your Workflow - - - Quilt - is a powerful tool that allows you to capture source code changes - without having a clean source tree. - This section outlines the typical workflow you can use to modify - source code, test changes, and then preserve the changes in the - form of a patch all using Quilt. - Tip - With regard to preserving changes to source files if you - clean a recipe or have rm_work enabled, - the workflow described in the - "Using devtool in Your Workflow" - section is a safer development flow than the flow that - uses Quilt. - - - - - Follow these general steps: - - Find the Source Code: - Temporary source code used by the OpenEmbedded build system - is kept in the - Build Directory. - See the - "Finding Temporary Source Code" - section to learn how to locate the directory that has the - temporary source code for a particular package. - - Change Your Working Directory: - You need to be in the directory that has the temporary source code. - That directory is defined by the - S - variable. - Create a New Patch: - Before modifying source code, you need to create a new patch. - To create a new patch file, use quilt new as below: - - $ quilt new my_changes.patch - - Notify Quilt and Add Files: - After creating the patch, you need to notify Quilt about the files - you plan to edit. - You notify Quilt by adding the files to the patch you just created: - - $ quilt add file1.c file2.c file3.c - - - Edit the Files: - Make your changes in the source code to the files you added - to the patch. - - Test Your Changes: - Once you have modified the source code, the easiest way to - test your changes is by calling the - do_compile task as shown in the - following example: - - $ bitbake -c compile -f package - - The -f or --force - option forces the specified task to execute. - If you find problems with your code, you can just keep editing and - re-testing iteratively until things work as expected. - All the modifications you make to the temporary source code - disappear once you run the - do_clean - or - do_cleanall - tasks using BitBake (i.e. - bitbake -c clean package - and - bitbake -c cleanall package). - Modifications will also disappear if you use the rm_work - feature as described in the - "Building Images" - section of the Yocto Project Quick Start. - - Generate the Patch: - Once your changes work as expected, you need to use Quilt to generate the final patch that - contains all your modifications. - - $ quilt refresh - - At this point, the my_changes.patch file has all your edits made - to the file1.c, file2.c, and - file3.c files. - You can find the resulting patch file in the patches/ - subdirectory of the source (S) directory. - Copy the Patch File: - For simplicity, copy the patch file into a directory named files, - which you can create in the same directory that holds the recipe - (.bb) file or the - append (.bbappend) file. - Placing the patch here guarantees that the OpenEmbedded build system will find - the patch. - Next, add the patch into the - SRC_URI - of the recipe. - Here is an example: - - SRC_URI += "file://my_changes.patch" - - - -
-- cgit v1.2.3-54-g00ecf