They can! Loot at the number of kernels laying around!
Kernel doesn't know anything about device. It is very generic. Memory, process management, security etc. To work with hardware it needs proprietary drivers. I'm not 100% sure, but I guess in Linux is pretty monolithic system which require compilation. So, if driver is linked to particular version it possibly might work with this version only. I do not remember that C/C++ have some sort of build-in versioning, but it might be simply hardcoded at the points where modules need to be loaded, or something like this. But as always there are workarounds.
All this things that people do with kernels here leave me curious up to how system stability is insured. Everyone is free to change code, even whole parts and compile his own version. No wonder that later something doesn't work as expected.
I can understand developer who knows what he does and has his own sources, but it is definitely not for regular user.
Sorry, I went off topic a little bit.
Kernel doesn't know anything about device. It is very generic. Memory, process management, security etc. To work with hardware it needs proprietary drivers. I'm not 100% sure, but I guess in Linux is pretty monolithic system which require compilation. So, if driver is linked to particular version it possibly might work with this version only. I do not remember that C/C++ have some sort of build-in versioning, but it might be simply hardcoded at the points where modules need to be loaded, or something like this. But as always there are workarounds.
All this things that people do with kernels here leave me curious up to how system stability is insured. Everyone is free to change code, even whole parts and compile his own version. No wonder that later something doesn't work as expected.
I can understand developer who knows what he does and has his own sources, but it is definitely not for regular user.
Sorry, I went off topic a little bit.