Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Could anyone explain to me the reason it is necessary to recompile drivers after upgrading to a new kernel.
My understanding is that because the driver uses kernel libraries and subroutines, it must be compiled against the libraries of the current kernel, in order to work. I'm trying to understand the mechanisms by which this happens.
If the old kernel version isn't much different to the new version, and kernel libraries used by the driver haven't changed, why is it still necessary? Is it a question of "linking" the driver, or pointing the driver to the new libraries? What does linking the driver to the kernel actually mean and involve.
The kernel doesn't have libraries (like an application) but it does have header (.h) files that define structures used in the kernel, as well as the interface modules use to communicate with other parts of the kernel. In each kernel the addresses defined by these structures move around slightly, as a result of code changes. These slight changes are resolved when the kernel is rebuilt.
Attempting to use an old kernel module would result in failures, as some of the addresses would be pointing to the wrong place. To prevent that from happening, the kernel module loader has a mechanism that detects that the kernel module was built for a different kernel, and will refuse to use it.
hi, thanks for your clear and concise reply. another quick question if i may, regarding the kernel's addressing system. do these addresses relate to physical addressing (ie memory locations allocated to kernel structures at boot time, or disk locations, where structures have been installed) or is it an internal scheme used by the kernel to map and track itself correctly? Is this related to the System.map file found in the boot directory, for which each kernel has one?
They are memory locations. The System.map is related; Wikipedia has a clear description. It is rebuilt each time the kernel is built, for they same reason; the addresses change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.