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
Hi,

I'm tracking the kernel by hand (following the git tree and doing some
hacking of my own). However whenever I try and emerge a ebuild that
involves a kernel module it usually fails to work out the correct
kernel:

 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.15-git12

 * getfilevar requires 2 variables, with the second a valid file.
 *    getfilevar <VARIABLE> <CONFIGFILE>
 * Could not find a usable .config in the kernel source directory.
 * Please ensure that /usr/src/linux points to a configured set of Linux
sources.
 * If you are using KBUILD_OUTPUT, please set the environment var so
that
 * it points to the necessary object directory so that it might
find .config.

!!! ERROR: sys-fs/fuse-2.5.0 failed.
!!! Function linux-info_pkg_setup, Line 534, Exitcode 1
!!! Unable to calculate Linux Kernel version

However with all kernels you should be able to detrmine the root via
uname -r:

malory / # ls -l "/lib/modules/`uname -r`"
total 212
lrwxrwxrwx  1 root root    31 Jan 15 17:16 build
-> /home/alex/src/kernel/linux-2.6
lrwxrwxrwx  1 root root    31 Jan 15 17:16 source
-> /home/alex/src/kernel/linux-2.6

There really is no need to force people to build as root under /usr/src
so is it possible to educate portage to use the uname method to
determine the root of the kernel tree for building kernel modules?

--
Alex, homepage: http://www.bennee.com/~alex/
Blessed be those who initiate lively discussions with the hopelessly
mute, for they shall be know as Dentists. dis

-- 
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>