Re: problems upgrading standard kernel to 2.2.17-ide
On Fri, Aug 18, 2000 at 02:14:06PM -0400, Dave Bresson wrote
> On Fri, 18 Aug 2000, David Wright wrote:
>
> >
> > a) If you're compiling a kernel module, you need kernel headers.
> > When people write /usr/src/linux, they really mean "the kernel headers
> > for the running kernel".
>
>
> Okay, i *do* have the kernel headers in /usr/src,
> (/usr/src/kernel-headers-2.2.17/include) however, i have
> /usr/src/linux linked to the kernel source in
> /usr/src/kernel-source-2.2.17. What's the difference between the
> kernel-header
> include/ and the kernel-source include/ ?
>
>
> And, also, before i untar'ed the entire kernel-source package into
> /usr/src, the /usr/src/ directory only contained the kernel headers and i
> tried compiling the 3c90x driver module using the those headers. I was
> able to get a good compile, however, i still got the stupid version
> problem when trying to do a 'insmod 3c90x'. The error it gives is
> basically that the module was compiled for kernel 2.2.17 (the version
> given in /usr/src/kernel-headers-2.2.17/include/linux/version.h) and that
> it could not install the module since the running kernel was 2.2.17-ide.
> I know i could force the insmod with the -f option, however, i would like
> a better solution. I mean, the running kernel is *still* a 2.2.17 kernel
> + the dma66 stuff, so shouldn't the version for it still be 2.2.17? After
> all, i'm sure the stock 2.2.17 kernel and the 2.2.17-ide kernel came from
> the same source. How do i solve this?
>
>
> >
> > b) The kernel-source tarball/debian package is installed into
> > /usr/src as it's "owned" by Debian. However, Debian practice is
> > to unpack it wheresoever you like. When you compile it, the
> > Makefile's TOPDIR looks after all the path adjustments.
> > That way you can have multiple versions around, and can build
> > everything as an ordinary user with fakeroot.
> >
>
> Ah, right, thanks for the info. So, when compiling programs, alot of them
> need to know where to get the includes and they usually want to get them
> at /usr/src/linux/include, am i to assume that i *should* be sym linking
> /usr/src/linux to the kernel headers i have in
> /usr/src/kernel-headers-2.2.17? That makes sense i guess.
>
Actually, no. Applications that link against kernel headers
usually do so because they need to share datatypes and other
declarations with the C library; the important thing there is
that they use the same version of kernel headers as was used
to build the C library. In the days when most people built
their own C library this wasn't a big issue, but it is more
of one now. For the views of LT himself on this, search
the linux-kernel archives for /usr/include/linux; the short
version is that he considers symlinking /usr/include/linux
into /usr/src/linux wrong, and building the kernel as root
or in /usr/src as, at best, unnecessary.
The way that Debian handles this is to place linux headers
at /usr/include/linux in the libc6-dev package. There are times
(like building stuff that really does talk to the kernel, not
the C library) when you may have to massage things a bit, but
it's really not up to Debian to predict and deal with the
idiosyncrasies of individual pieces of third-party software.
In your particular case, you could try editing version.h
to contain whatever version the running kernel thinks it is.
John P.
--
huiac@camtech.net.au
john@huiac.apana.org.au
http://www.mdt.net.au/~john Debian Linux admin & support:technical services
Reply to: