How to make a dkms module out of a git of an experimental forked driver

I am using a wacom graphical tablet as a mouse replacement and have had a great trouble with making it work acceptably. I had to resort to having patches be done to the official source code of the driver to address some issues with my particular tablet. These patches work, but every time the kernel gets updated i need to recompile and install the drivers, as apparently they are built against a certain kernel version.
I am trying to come up with a method to not have to recompile the driver every time a kernel update occurs, or at least have this happen automatically, as it does with dkms modules for example.
Any idea how I can accomplish this?

@nate

Maybe these threads can help a little …

https://bbs.archlinux.org/viewtopic.php?id=241506

https://bbs.archlinux.org/viewtopic.php?id=233313

https://aur.archlinux.org/packages/input-wacom-dkms/

1 Like

Thanks judd, I had a look at those but I don’t think they help. I’ve sorted out the issues regarding the functioning of the tablet. My problem was i don’t know how to launch the make install for the patched driver at every kernel update. I was looking for something like DKMS, but after even more google i learned that in fact it’s DKMS I actually need. I thought it’s only for packages, but apparently it can be used directly with a source directory.

I guess you’re thinkig about adding a personalized hook, so everytime a kernel is updated, a specific hook can run pushed by mkinitcpio. I’ve never done anything like this, hope this can help:

https://bbs.archlinux.org/viewtopic.php?id=208276

You’ll need to adpat this to the necessary instructions.

2 Likes

EndeavourOS has a pacman hook at https://github.com/endeavouros-team/PKGBUILDS/blob/master/grub-tools/grub-update-after-kernel.hook.

Why not use that as an example of how to create a pacman hook for your purposes.

2 Likes

Interesting I think I will follow this path as I’m not having great success with dkms.
thanks

2 Likes