LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-19-2007, 04:58 AM   #1
nacnud
LQ Newbie
 
Registered: Mar 2006
Location: NW London
Distribution: Debian Etch
Posts: 5

Rep: Reputation: 0
Linux Kernel upgrade and driver recompilation


hi there,

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.

Hopefully that makes some sense!

Thanks for the help
 
Old 02-20-2007, 02:08 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
Old 02-21-2007, 04:01 AM   #3
nacnud
LQ Newbie
 
Registered: Mar 2006
Location: NW London
Distribution: Debian Etch
Posts: 5

Original Poster
Rep: Reputation: 0
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?

Many thanks again!
 
Old 02-21-2007, 10:10 AM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
Old 02-22-2007, 09:21 AM   #5
nacnud
LQ Newbie
 
Registered: Mar 2006
Location: NW London
Distribution: Debian Etch
Posts: 5

Original Poster
Rep: Reputation: 0
excellent! its all beggining to make sense! time to do some proper reading i think
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel recompilation shrishailnk Linux - Networking 2 04-30-2006 10:05 PM
Get agpgart as a loadalbe kernel module, without kernel recompilation? TruongAn Linux - Software 3 03-28-2006 10:44 AM
kernel recompilation: /usr/src/linux orca Linux - Distributions 5 03-04-2003 08:53 AM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration