HowTo convert a diff to a debian kernel-patch?

Discussion in 'HOWTO-Related Questions' started by BjoKa, Dec 18, 2005.

  1. BjoKa

    BjoKa New Member

    Hallo!

    As the topic says, I am looking for an "HowTo" on how to convert an existing patch file to a kernel patch compatible which make-kpkg "--added-patches" option.

    I have successfully installed the debian 2.6.8 kernel sources, make-kpkg, the debian "atop" kernel patches and build an kernel-image package using make-kpkg. That local kernel package installs and boots fine.

    I've used the prepatched kernel source tree (as left behind from make-kpkg) to put in some local changes (using traditional "make bzImage" and then copy arch/i386/boot/bzImage to /boot because make-kpkg refused to build a new kernel without "clean" in between).

    Now I have a "diff -u" file which applies cleanly to a fully debian-patched 2.6.8 kernel, but I failed in makeing make-kpkg recognize this file.


    What I tried is to put the patch file in /usr/src/kernel-patches/diffs/mypatch/01patch-2.6.8_mypatch.gz (just like the "atop" files in there) and did a "make-kpkg --added-patches=mypatch". Did not work.

    Reading "/usr/share/kernel-package/rules" it seems there should be files in "/usr/sr/kernel-patches/all/{apply,unpatch}" however it is unclear to me what should go in this files (the atop-files looks like a complicated shell-script doing various version-checks etc.).

    I know about the "/usr/share/doc/dh-kpatches/" ReadMe, but it is unclear how this is supposed to work, as there seems to be no dh-kpatches script or binary which creates the mentioned "kpatch" files or reads such a hand-edited file to somehow create the needed files under "/usr/src/kernel-patches".


    At this point I am lost: How to convert an existing "diff -u" file to something that can be used with "make-kpkg --added-patches"? Any help or pointers to more/better documentation than "dh-kpatches.html" wellcome.


    BjoKa
     

Share This Page