Gentoo Archives: gentoo-user

From: Nick Rout <nick@×××××××.nz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] use of /usr/src/linux symlink
Date: Wed, 09 Nov 2005 20:45:26
Message-Id: 20051110093246.F26C.NICK@rout.co.nz
In Reply to: Re: [gentoo-user] use of /usr/src/linux symlink by Rumen Yotov
1 On Tue, 08 Nov 2005 19:40:59 +0200
2 Rumen Yotov wrote:
3
4 > Hi,
5 > There seems to exist at least two current kernels - one is the kernel to
6 > which /usr/src/linux points, this one is used by most (all ?)
7 > kernel-module programs (i have 3 of them: nvidia, arpstar, loop-aes; had
8 > also alsa-driver). When you compile/recompile any one of them they use
9 > the kernel sources pointed by /usr/src/linux. Patch kernel sources too
10 > (e.g. "l7-filter").
11 > The second kernel is your running kernel (available by "uname -r") this
12 > one is the one actually running at any givenn time. Don't have any
13 > examples of something using this one. Anybody here?
14 > HTH.Rumen
15
16 What i think you mean is that there are two ways of referencing what may be the correct kernel to compile against :-). However In addition to:
17
18 /usr/src/linux ; (method 1) and
19 /usr/src/linux-`uname -r` (method 2)
20
21 There are many packages out there that find the linux sources by looking for:
22
23 /lib/modules/`uname -r`/build - (method 3) which is a symlink to the
24 sources those modules were built from.
25
26 Not all ebuilds use method 1 to find the kernel version.
27
28
29 cd /usr/portage
30 grep "uname -r" * -r
31
32 reveals any number of ebuilds that refer to uname -r as a way of
33 determining the kernel version. Also many packages use either method 2
34 or method 3 in their internal config script or makefile.
35
36
37 --
38 Nick Rout <nick@×××××××.nz>
39
40 --
41 gentoo-user@g.o mailing list