Gentoo Archives: gentoo-user

From: "Bo Ørsted Andreses" <bo.andresen@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Building Kernel Modules with custom kernel trees
Date: Fri, 27 Jan 2006 14:45:02
Alex Bennee wrote:

> Hi, > > 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?
You could add the following command to /etc/conf.d/local.start: ln -sf /lib/modules/`uname -r`/build /usr/src/linux In this way the symbolic link will be updated to point at the kernel you are currently running every time your computer starts up. /Bo -- gentoo-user@g.o mailing list