- Download and install quilt. (
emerge quilt
, of course) cd linux-2.6.21
(or whatever release you are creating a patch for)- Tell quilt you want to start making a patch
quilt new patchname-does-something-version.patch
- Tell quilt which files you are going to be modifying
quilt add drivers/modify_this_one.c
- Do this for all files, BEFORE you modify any of them
- Now make your changes to the files
- At this point, running
quilt diff
will show you the patch so far - When done, run
quilt refresh
and a patch will be created at patches/patchname-does-something-version.patch"
- make sure there isn’t a patches directory in the current path
- patch a clean version of a kernel and then compile to test it out.
Thanks to dsd for the quick tutorial.