Creating a patch for the linux kernel using quilt

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

Thanks to dsd for the quick tutorial.

Leave a Comment

Your email address will not be published. Required fields are marked *