Linux kernel modules don't seem to be portable: they are compiled for a specific version of the kernel (that's why even binary drivers have some source files to be compiled). And you don't just need exactly the same kernel sources, you even need to compile it and use the made-by-yourself version... (pls correct me if I'm wrong somewhere).

So my question is: what is the reason behind all this? (... some binary interface that gets regenerated every time?) And is there any way to compile modules for a prebuilt kernel? (sources could be available, but not the tree it's compiled from).


You think you want a stable kernel interface, but you really do not, and you don't even know it. What you want is a stable running driver, and you get that only if your driver is in the main kernel tree. You also get lots of other good benefits if your driver is in the main kernel tree, all of which has made Linux into such a strong, stable, and mature operating system which is the reason you are using it in the first place.

(From The Linux Kernel Driver Interface (all of your questions answered and then some))

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.