[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compiling kernel module question



On Sat, Nov 26, 2005 at 12:51:55AM -0500, Amish Rughoonundon wrote:
> lemme see if I understand what you meant: The kernel-source files that I 
> downloaded is common to all linux distribution while the kernel-header 
> files is particular to a certain version and distribution.

...not so much the distribution, but rather the _configuration_, i.e.
the specific combination of switches that were selected while running
one of "make menuconfig", "make xconfig" (or even "make config" -- for
those die-hards, who don't mind wading through hundreds of questions).
This leaves behind a customized kernel source/header tree describing
the specific kernel that will be (or has been) built from these sources.

Think of it this way: when you buy a new PC, you make decisions as to
which CPU, mobo, network- and graphics-card, etc. you want or need.
Out of all conceivable combinations, you create a personalised
configuration.  Now, if you want to add another of piece hardware (a
'module') later, it's important (or at least useful) to know what your
specific PC looks like.
For example, if you were to ask here whether your favorite new geek
gadget would work, and all you say is "I have a computer", you'd get
nothing more than one of those "you'll need to tell us which ..."
replies :)  (Of course, analogies don't ever match 100%, but this is
about the idea...)

When you build a custom kernel yourself, you'll automatically be left
behind with configured kernel sources, but when you use a stock kernel,
someone else has done this step for you.  So, rather than starting with
the pristine kernel sources and having to reproduce the exact settings
that were used, it's easier to just get the preconfigured header packages.

Cheers,
Almut



Reply to: