</literallayout></para></listitem>
<listitem><para><emphasis>Generate the patch file</emphasis>:
This Git command creates the a patch file named
- <filename>0001-calibrate: Add printk example.patch</filename>
+ <filename>0001-calibrate-Add-printk-example.patch</filename>
in the current directory.
<literallayout class='monospaced'>
- $ git format-patch HEAD~1
+ $ git format-patch -1
</literallayout>
</para></listitem>
</orderedlist>
<literallayout class='monospaced'>
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
- SRC_URI += "file://0001-calibrate: Add printk example.patch"
+ SRC_URI += "file://0001-calibrate-Add-printk-example.patch"
PRINC := "${@int(PRINC) + 1}"
</literallayout>
statements enable the OpenEmbedded build system to find the patch file.
</para></listitem>
<listitem><para><emphasis>Put the patch file in your layer</emphasis>:
- Move the <filename>0001-calibrate: Add printk example.patch</filename> file to
+ Move the <filename>0001-calibrate-Add-printk-example.patch</filename> file to
the <filename>meta-mylayer/recipes-kernel/linux/linux-yocto</filename>
directory.</para></listitem>
</orderedlist>
<literallayout class='monospaced'>
$ git init
$ git add *
- $ git commit
+ $ git commit -m "initial revision"
</literallayout>
The above Git commands initialize a Git repository that is based on the
files in your current working directory, stage all the files, and commit
Once the changes are committed, use the <filename>git format-patch</filename>
command to generate a patch file:
<literallayout class='monospaced'>
- $ git format-patch HEAD~1
+ $ git format-patch -1
</literallayout>
- The <filename>HEAD~1</filename> part of the command causes Git to generate the
+ Specifying "-1" causes Git to generate the
patch file for the most recent commit.</para>
<para>At this point, the patch file has all your edits made
to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
of the recipe.
Here is an example:
<literallayout class='monospaced'>
- SRC_URI += "file://my_changes.patch"
+ SRC_URI += "file://0001-<commit-summary-message>.patch"
</literallayout></para></listitem>
<listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
Finally, don't forget to 'bump' the