Re: include

Richard B. Johnson (root@chaos.analogic.com)
Fri, 20 Aug 1999 14:01:19 -0400 (EDT)


On Fri, 20 Aug 1999, Sergio A. Sotelo wrote:

> Hello..
>
> I've installed Debian 2.1 (Slink) that includes kernel 2.0.36. Later, I've
> installed kernel 2.2.10. Then, when I tried to compile some software (ie:
> vmware), this legend appears:
>
> "You have kernel 2.2.10 but include files are from kernel 2.0.36".
>
> The question is: When upgrading kernel, do I need to upgrade include files
> of /usr/include with new kernel files on /usr/src/linux/include? do I need
> to make some symbolic links? which ones? Can somebody send me specific
> information about what I need to "upgrade"?

Assume /usr/src/linux-1.2.3
/usr/src/linux-4.5.6

If I want to compile linux-4.5.6, I remove any symbolic link called:
/usr/src/linux (rm /usr/src/linux)

Then I create a symbolic link:

ln -s /usr/src/linux-4.5.6 /usr/src/linux

If I want to compile linux-2.3.6, I remove any symboloc link called:
/usr/src/linux (rm /usr/src/linux)

Then I create a symbolic link:

ln -s /usr/src/linux-1.2.3 /usr/src/linux

Header files that refer to the kernel (in /usr/include) are supposed
to be symbolic links through /usr/src/linux so they never have to be
changed. There are two of them:

/usr/include/linux
/usr/include/asm

They should have been created as:

ln -s /usr/src/linux/include/asm /usr/include/asm
ln -s /usr/src/linux/include/linux /usr/include/linux

Once these are set properly, they never have to be changed. The
kernel, itself, will compile without setting any links at all.
However, many system utilities like "mount", depend on kernel
headers so they won't compile if the links haven't been set properly.

When you untar a new tarball for the kernel source, this makes a
directory called "linux". Therefore you do not want to untar it
into /usr/src. Instead, if /tmp is on the same file-system as /usr/src,
you can do:

cd /tmp
tar -xzf ~/linux-1.2.3.tar.gz
mv linux /usr/src/linux-1.2.3

Otherwise, untar it into some dummy directory:

mkdir /usr/src/foo
cd /usr/src/foo
tar -xzf ~/linux-1.2.3.tar.gz
mv linux ../linux-1.2.3
cd ..
rmdir foo

Note: None of this syntax has been checked. Don't blindly follow it.
Follow the logic instead.

Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

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