From f7fb723548f7c89173cb92e36262ecf4e2264ebb Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 17 Feb 2012 13:01:21 -0600 Subject: documentation/dev-manual/dev-manual-common-tasks.xml: review comments added Paul Eggleton's review comments on the "Modifying Temporary Source Code" section have been applied. (From yocto-docs rev: 8f17f9e556e7027d8aba1fe69d614d17cdbcc054) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 76 ++++++++++++++-------- 1 file changed, 48 insertions(+), 28 deletions(-) (limited to 'documentation/dev-manual') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 5fcc69cbd0..9a5160cd9e 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -860,16 +860,16 @@ so that there are some definite steps on how to do this. I need more detail her That directory is defined by the S variable. - Notify Quilt: - Before modifying source code, it is important to notify Quilt so it can track changes - into a new patch file. + 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 - Add Files: - After creating the patch, add the files you will be modifying into that patch - as follows: + Notify Quilt and Add Files: + After creating the patch, you need to notify Quilt about the files you will + be changing. + Add the files you will be modifying into the patch you just created: $ quilt add file1.c file2.c file3.c @@ -905,9 +905,11 @@ so that there are some definite steps on how to do this. I need more detail her You can find the resulting patch file in the patches/ subdirectory of the source (S) directory. Copy the Patch File: - For future builds, you should copy the patch file into the - Yocto Project Files metadata and add it - into the + For simplicity, copy the patch file into a directory named files, + which you can create in the same directory as the recipe. + Placing the patch here guarantees that the Yocto Project build system will find + the patch. + Next, add the patch into the SRC_URI of the recipe. Here is an example: @@ -933,15 +935,11 @@ so that there are some definite steps on how to do this. I need more detail her "Git" section. - - The steps in this section assume that you have already created a local Git repository of - the Yocto Project Files and have checked them - out into an appropriate local working branch. - If you need more explanation on setting up the Yocto Project Files, see the - "Getting Setup" section. - Also, if you need information on Git workflows in general, see the - Workflows section. - + + This workflow uses Git only for its ability to manage local changes to the source code + and produce patches independent of any version control used on the Yocto Project + Files. + Follow these general steps: @@ -958,6 +956,26 @@ so that there are some definite steps on how to do this. I need more detail her That directory is defined by the S variable. + Initialize a Git Repository: + Use the git init command to initialize a new local repository + that is based on your source code directory: + + $ git init + + Stage all the files: + Use the git add * command to stage all the files in the source + code directory so that they can be committed: + + $ git add * + + Commit the Source Files: + Use the git commit command to initially commit all the files in + the source code directory: + + $ git commit + + At this point, your Git repository is aware of all the source code files. + Any edits you now make to files will be tracked by Git. Edit the Files: Make the changes to the temporary source code. Test Your Changes: @@ -979,7 +997,7 @@ so that there are some definite steps on how to do this. I need more detail her section of the Yocto Project Quick Start. See the List of Files You Changed: - Use the Git status command to see what files you have actually edited. + Use the git status command to see what files you have actually edited. The ability to have Git track the files you have changed is an advantage that this workflow has over the Quilt workflow. Here is the Git command to list your changed files: @@ -987,22 +1005,22 @@ so that there are some definite steps on how to do this. I need more detail her $ git status Stage the Modified Files: - Use the Git add command to stage the changed files so they + Use the git add command to stage the changed files so they can be committed as follows: $ git add file1.c file2.c file3.c Commit the Staged Files and View Your Changes: - Use the Git commit command to commit the changes to the + Use the git commit command to commit the changes to the local repository. - Once you have committed the files, you can use the Git log + Once you have committed the files, you can use the git log command to see your changes: $ git commit $ git log Generate the Patch: - Once the changes are committed, you use the Git format-patch + Once the changes are committed, use the git format-patch command to generate a patch file: $ git format-patch HEAD~1 @@ -1012,12 +1030,14 @@ so that there are some definite steps on how to do this. I need more detail her At this point, the 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. + You can find the resulting patch file in the current directory. + The patch file ends with .patch. Copy the Patch File: - For future builds, you should copy the patch file into the - Yocto Project Files metadata and add it - into the + For simplicity, copy the patch file into a directory named files, + which you can create in the same directory as the recipe. + Placing the patch here guarantees that the Yocto Project build system will find + the patch. + Next, add the patch into the SRC_URI of the recipe. Here is an example: -- cgit v1.2.3-54-g00ecf