diff options
author | Nicholas Chin <nic.c3.14@gmail.com> | 2022-11-11 14:28:46 -0700 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2022-12-01 22:12:29 +0000 |
commit | 9eab93168d26b6a459bf59a7a4f0344ada9872b3 (patch) | |
tree | a073e3caa80452ce7db74ffa8a705644f9eefd29 /util/kconfig | |
parent | a7f669049daadf6e7c6b3c66ec6b8fc973c7bd46 (diff) |
util/kconfig/README.md: Add notes about adding a new quilt patch
The patches for kconfig need to be in a format compatible with the quilt
tool, and usually also contain a header with some additional info like
the git commit. This header is in the same format as patches produced by
`git format-patch`, but the diff style git uses is incompatible with
quilt and there does not seem to be a straightforward way to format the
diff section to work.
Add some documentation for a method I found to go from a git commit to a
quilt compatible patch with git headers.
Change-Id: I7a8bbe41e0864be1d28116742b6b8b3fc440cc31
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69458
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/kconfig')
-rw-r--r-- | util/kconfig/README.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/util/kconfig/README.md b/util/kconfig/README.md index 1350e04300..4d508a5e19 100644 --- a/util/kconfig/README.md +++ b/util/kconfig/README.md @@ -37,3 +37,44 @@ Linux. Check that kconfig still works, `git add` and `git commit` the changes and write a meaningful commit message that documents what Linux kconfig version the tree has been upreved to. + +## Adding a new patch +The format of the patches to kconfig is a mix of the headers produced by `git +format-patch` and the patch format of quilt. However neither git nor quilt +seems to have any functionality to directly produce a file in such a format + +To add a patch in this format: +1. Add your changes to the sources and `git commit` them +2. Generate a git patch for the commit: + + $ git format-patch HEAD~ + +3. Reverse apply the newly created patch file to restore the tree back to the + state quilt thinks it is in: + + $ git apply -R <the patch file> + +4. Import the patch info quilt: + + $ quilt import <the patch file> + +5. Force push the change to the top of quilt's patch stack (quilt won't like + the git diff style and would normally refuse to apply the patch): + + $ quilt push -f <the patch file> + +6. Add the changed files to be tracked against the quilt: + + $ quilt add <the files you changed> + +7. Re-apply your changes from the patch file: + + $ git apply <the patch file> + +8. Add the changes to quilt to regenerate the patch file in a quilt compatible + format while keeping the git header: + + $ quilt refresh + +9. The new patch file and updated patches/series files can now be added to the + git commit |