I've recently applied a one-line patch to
drivers/bluetooth/btusb.c in order to enable compatibility with my Bluetooth device. However, whenever I get a kernel upgrade, the patch will be lost until someone backports it (which isn't likely). Is there a way for me to run a script and patch each new kernel upgrade automatically?
DKMS seems like a good solution, but I'm not sure how to set things up. I don't want to recompile the entire Linux kernel every time I get an update, but I'd like to apply that patch to the btusb module, recompile it, and insert it into my kernel on every update. How can I do this using the source obtained from
apt-get source linux-source-3.2.0? What files do I need to copy over? The critical
make call is
make M=drivers/bluetooth modules, but this depends on other kernel utilities to be built first. How can I assemble a DKMS module for this?
Details on how to apply the patch can be found here on Ask Ubuntu.