Gentoo Archives: gentoo-user

From: Alex Bennee <alex@××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Building Kernel Modules with custom kernel trees
Date: Wed, 25 Jan 2006 00:06:54
Message-Id: 1138147201.29450.4.camel@malory
1 Hi,
2
3 I'm tracking the kernel by hand (following the git tree and doing some
4 hacking of my own). However whenever I try and emerge a ebuild that
5 involves a kernel module it usually fails to work out the correct
6 kernel:
7
8 * Determining the location of the kernel source code
9 * Found kernel source directory:
10 * /usr/src/linux
11 * Found sources for kernel version:
12 * 2.6.15-git12
13
14 * getfilevar requires 2 variables, with the second a valid file.
15 * getfilevar <VARIABLE> <CONFIGFILE>
16 * Could not find a usable .config in the kernel source directory.
17 * Please ensure that /usr/src/linux points to a configured set of Linux
18 sources.
19 * If you are using KBUILD_OUTPUT, please set the environment var so
20 that
21 * it points to the necessary object directory so that it might
22 find .config.
23
24 !!! ERROR: sys-fs/fuse-2.5.0 failed.
25 !!! Function linux-info_pkg_setup, Line 534, Exitcode 1
26 !!! Unable to calculate Linux Kernel version
27
28 However with all kernels you should be able to detrmine the root via
29 uname -r:
30
31 malory / # ls -l "/lib/modules/`uname -r`"
32 total 212
33 lrwxrwxrwx 1 root root 31 Jan 15 17:16 build
34 -> /home/alex/src/kernel/linux-2.6
35 lrwxrwxrwx 1 root root 31 Jan 15 17:16 source
36 -> /home/alex/src/kernel/linux-2.6
37
38 There really is no need to force people to build as root under /usr/src
39 so is it possible to educate portage to use the uname method to
40 determine the root of the kernel tree for building kernel modules?
41
42 --
43 Alex, homepage: http://www.bennee.com/~alex/
44 Blessed be those who initiate lively discussions with the hopelessly
45 mute, for they shall be know as Dentists. dis
46
47 --
48 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Building Kernel Modules with custom kernel trees Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Building Kernel Modules with custom kernel trees Richard Fish <bigfish@××××××××××.org>