Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Building Kernel Modules with custom kernel trees
Date: Wed, 25 Jan 2006 01:29:48
Message-Id: 7573e9640601241721x7ecd7e60ne10d394c4891f67@mail.gmail.com
In Reply to: [gentoo-user] Building Kernel Modules with custom kernel trees by Alex Bennee
1 On 1/24/06, Alex Bennee <alex@××××××.com> wrote:
2 <snip>
3 > * If you are using KBUILD_OUTPUT, please set the environment var so
4 > that
5 > * it points to the necessary object directory so that it might
6 > find .config.
7 >
8 > However with all kernels you should be able to detrmine the root via
9 > uname -r:
10 >
11 > malory / # ls -l "/lib/modules/`uname -r`"
12 > total 212
13 > lrwxrwxrwx 1 root root 31 Jan 15 17:16 build
14 > -> /home/alex/src/kernel/linux-2.6
15 > lrwxrwxrwx 1 root root 31 Jan 15 17:16 source
16 > -> /home/alex/src/kernel/linux-2.6
17
18 The problem here is that this only points to the running kernel. You
19 really need a way to specify what kernel to build against.
20
21 > There really is no need to force people to build as root under /usr/src
22 > so is it possible to educate portage to use the uname method to
23 > determine the root of the kernel tree for building kernel modules?
24
25 Just a guess, haven't tried this myself, but does this work?
26
27 KBUILD_OUTPUT=/home/alex/src/kernel/linux-2.6 emerge sys-fs/fuse
28
29 -Richard
30
31 --
32 gentoo-user@g.o mailing list