How do driver packages get updated with kernel update (any distribution)?
This is more of a general interest question, rather than a problem that needs solving. Any takers?
I was wondering how distributions manage to update all their driver packages when they ship a new kernel version. What I mean is: when I use a manually compiled kernel module, say, ndiswrapper wifi driver, I need to recompile it with the current kernel headers after every kernel update. However, when I'm using the ndiswrapper packages from my distribution (I'm using kubuntu but I can imagine this is similar in many distributions?), everything just works after a kernel update, even though package management doesn't seem to download a new ndiswrapper package version. Also, I can't imagine canonical is compiling new packages for every kernel update. So how do they do it? Google told me about "dynamic kernel module support", does this have anything to do with it?
The follow-up, ubuntu/debian-specific, question, would be: can I create my own package like that (since the ndiswrapper package in the official repositories is outdated and doesn't work too well).
Thank you in advance!