2

Creating a debian package with a kernel module seems fairly easy as described here and elsewhere. I want to update an existing module with a patch. How would I go about this? I don't really have a source tarball to unpack, but rather I would use the module source for whatever kernel version dkms is building for.

For example let's say I have kernel version 1.2.3 installed, then I would like to build the kernelmodule uvcvideo with version 1.2.3 of the sources, with the addition of a patch. Do I get the sources before I create the dkms .deb package, or do I fetch them during build somehow?

Does the question make sense? How to do it?

vidstige
  • 12,492
  • 9
  • 66
  • 110
  • I am unsure that I get you problem correctly, but you may use `PATCH` directive in you `dkms.conf` file for apply patches for module sources before build them. – Tsyvarev Mar 07 '16 at 20:31
  • @Tsyvarev the problem is I don't know how or when to get the correct version of the sources. – vidstige Mar 08 '16 at 09:01

1 Answers1

1

DKMS was created to add drivers that are not already in the kernel. This is not your case here.

So I see 2 options:

  • You can patch the kernel, where you will find the sources of your module
  • You can blacklist the kernel module, get the sources from kernel, rename and patch the module, and add the new module with DKMS
fikr4n
  • 3,250
  • 1
  • 25
  • 46
Id2ndR
  • 113
  • 1
  • 6