Re: How to check if kernel sources are installed on a system?

From: Brian F. G. Bidulock
Date: Mon May 29 2006 - 03:29:17 EST


Arjan,

On Mon, 29 May 2006, Arjan van de Ven wrote:
> eh dude what are you thinking? Documentation/kbuild very much gives you
> a FULLY standardized way of doing this. On all distributions.
> The only tricky part is finding the build tree, for the current kernel
> that is
> /lib/modules/`uname -r`/build
> (as per Linus' decree from like 4 to 5 years ago)
> for non-current kernels that's a bit more complex, so just ask the user.
> Once you have that the rest comes for free.

kbuild is fine for small isolated kernel modules that export no symbols
(esp. little ones that nobody supports any more or were recently kicked
out of a kernel), but for building large subsystems of kernel modules
and multiple interdependent packages that export symbols and headers it
is rather lacking.

An, of course, if you want to build kernel modules for 2.4 and 2.6 as
well, kbuild does not help you.

Also, while checking for kernel version on the fine kernel.org kernels
is quite sufficient, it is next to useless on hacked production distro
kernels. Therefore, one has to locate configured sources and headers
to perform checks to adapt to them.

--brian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/