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 <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
452d2764c9
commit
f7fb723548
|
@ -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
|
That directory is defined by the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink>
|
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink>
|
||||||
variable.</para></listitem>
|
variable.</para></listitem>
|
||||||
<listitem><para><emphasis>Notify Quilt:</emphasis>
|
<listitem><para><emphasis>Create a New Patch:</emphasis>
|
||||||
Before modifying source code, it is important to notify Quilt so it can track changes
|
Before modifying source code, you need to create a new patch.
|
||||||
into a new patch file.
|
|
||||||
To create a new patch file, use <filename>quilt new</filename> as below:
|
To create a new patch file, use <filename>quilt new</filename> as below:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ quilt new my_changes.patch
|
$ quilt new my_changes.patch
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Add Files:</emphasis>
|
<listitem><para><emphasis>Notify Quilt and Add Files:</emphasis>
|
||||||
After creating the patch, add the files you will be modifying into that patch
|
After creating the patch, you need to notify Quilt about the files you will
|
||||||
as follows:
|
be changing.
|
||||||
|
Add the files you will be modifying into the patch you just created:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ quilt add file1.c file2.c file3.c
|
$ quilt add file1.c file2.c file3.c
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
|
@ -905,9 +905,11 @@ so that there are some definite steps on how to do this. I need more detail her
|
||||||
<para>You can find the resulting patch file in the <filename>patches/</filename>
|
<para>You can find the resulting patch file in the <filename>patches/</filename>
|
||||||
subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
|
subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
|
||||||
<listitem><para><emphasis>Copy the Patch File:</emphasis>
|
<listitem><para><emphasis>Copy the Patch File:</emphasis>
|
||||||
For future builds, you should copy the patch file into the
|
For simplicity, copy the patch file into a directory named <filename>files</filename>,
|
||||||
<link linkend='yocto-project-files'>Yocto Project Files</link> metadata and add it
|
which you can create in the same directory as the recipe.
|
||||||
into the
|
Placing the patch here guarantees that the Yocto Project build system will find
|
||||||
|
the patch.
|
||||||
|
Next, add the patch into the
|
||||||
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>
|
||||||
of the recipe.
|
of the recipe.
|
||||||
Here is an example:
|
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
|
||||||
"<link linkend='git'>Git</link>" section.
|
"<link linkend='git'>Git</link>" section.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<note>
|
||||||
The steps in this section assume that you have already created a local Git repository of
|
This workflow uses Git only for its ability to manage local changes to the source code
|
||||||
the <link linkend='yocto-project-files'>Yocto Project Files</link> and have checked them
|
and produce patches independent of any version control used on the Yocto Project
|
||||||
out into an appropriate local working branch.
|
Files.
|
||||||
If you need more explanation on setting up the Yocto Project Files, see the
|
</note>
|
||||||
"<link linkend='getting-setup'>Getting Setup</link>" section.
|
|
||||||
Also, if you need information on Git workflows in general, see the
|
|
||||||
<link linkend='workflows'>Workflows</link> section.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Follow these general steps:
|
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
|
That directory is defined by the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink>
|
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink>
|
||||||
variable.</para></listitem>
|
variable.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Initialize a Git Repository:</emphasis>
|
||||||
|
Use the <filename>git init</filename> command to initialize a new local repository
|
||||||
|
that is based on your source code directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git init
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para><emphasis>Stage all the files:</emphasis>
|
||||||
|
Use the <filename>git add *</filename> command to stage all the files in the source
|
||||||
|
code directory so that they can be committed:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git add *
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para><emphasis>Commit the Source Files:</emphasis>
|
||||||
|
Use the <filename>git commit</filename> command to initially commit all the files in
|
||||||
|
the source code directory:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git commit
|
||||||
|
</literallayout>
|
||||||
|
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.</para></listitem>
|
||||||
<listitem><para><emphasis>Edit the Files:</emphasis>
|
<listitem><para><emphasis>Edit the Files:</emphasis>
|
||||||
Make the changes to the temporary source code.</para></listitem>
|
Make the changes to the temporary source code.</para></listitem>
|
||||||
<listitem><para><emphasis>Test Your Changes:</emphasis>
|
<listitem><para><emphasis>Test Your Changes:</emphasis>
|
||||||
|
@ -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.
|
section of the Yocto Project Quick Start.
|
||||||
</note></para></listitem>
|
</note></para></listitem>
|
||||||
<listitem><para><emphasis>See the List of Files You Changed:</emphasis>
|
<listitem><para><emphasis>See the List of Files You Changed:</emphasis>
|
||||||
Use the Git <filename>status</filename> command to see what files you have actually edited.
|
Use the <filename>git status</filename> 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
|
The ability to have Git track the files you have changed is an advantage that this
|
||||||
workflow has over the Quilt workflow.
|
workflow has over the Quilt workflow.
|
||||||
Here is the Git command to list your changed files:
|
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
|
$ git status
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Stage the Modified Files:</emphasis>
|
<listitem><para><emphasis>Stage the Modified Files:</emphasis>
|
||||||
Use the Git <filename>add</filename> command to stage the changed files so they
|
Use the <filename>git add</filename> command to stage the changed files so they
|
||||||
can be committed as follows:
|
can be committed as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git add file1.c file2.c file3.c
|
$ git add file1.c file2.c file3.c
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Commit the Staged Files and View Your Changes:</emphasis>
|
<listitem><para><emphasis>Commit the Staged Files and View Your Changes:</emphasis>
|
||||||
Use the Git <filename>commit</filename> command to commit the changes to the
|
Use the <filename>git commit</filename> command to commit the changes to the
|
||||||
local repository.
|
local repository.
|
||||||
Once you have committed the files, you can use the Git <filename>log</filename>
|
Once you have committed the files, you can use the <filename>git log</filename>
|
||||||
command to see your changes:
|
command to see your changes:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git commit
|
$ git commit
|
||||||
$ git log
|
$ git log
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Generate the Patch:</emphasis>
|
<listitem><para><emphasis>Generate the Patch:</emphasis>
|
||||||
Once the changes are committed, you use the Git <filename>format-patch</filename>
|
Once the changes are committed, use the <filename>git format-patch</filename>
|
||||||
command to generate a patch file:
|
command to generate a patch file:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git format-patch HEAD~1
|
$ 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
|
||||||
<para>At this point, the patch file has all your edits made
|
<para>At this point, the patch file has all your edits made
|
||||||
to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
|
to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
|
||||||
<filename>file3.c</filename> files.
|
<filename>file3.c</filename> files.
|
||||||
You can find the resulting patch file in the <filename>patches/</filename>
|
You can find the resulting patch file in the current directory.
|
||||||
subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
|
The patch file ends with <filename>.patch</filename>.</para></listitem>
|
||||||
<listitem><para><emphasis>Copy the Patch File:</emphasis>
|
<listitem><para><emphasis>Copy the Patch File:</emphasis>
|
||||||
For future builds, you should copy the patch file into the
|
For simplicity, copy the patch file into a directory named <filename>files</filename>,
|
||||||
<link linkend='yocto-project-files'>Yocto Project Files</link> metadata and add it
|
which you can create in the same directory as the recipe.
|
||||||
into the
|
Placing the patch here guarantees that the Yocto Project build system will find
|
||||||
|
the patch.
|
||||||
|
Next, add the patch into the
|
||||||
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>
|
||||||
of the recipe.
|
of the recipe.
|
||||||
Here is an example:
|
Here is an example:
|
||||||
|
|
Loading…
Reference in New Issue