Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23969 - External kernel modules and the /usr/src/linux symlink
Summary: External kernel modules and the /usr/src/linux symlink
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-05 11:00 UTC by Ronald Hummelink
Modified: 2003-08-31 14:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Hummelink 2003-07-05 11:00:24 UTC
For a long time now linux has been making a symlink /lib/modules/`uname
-r`/build when doing the make modules_install step. Most of the time you indeed
build modules for the currently running kernel so using this link is the right
way then since this saves you from manually administering anything like the
/usr/src/linux symlink. However currently gentoo policy is to force modules to
use /usr/src/linux.
The only time where you can not to build verses the running kernel is when you
need an external module to boot your system in which case you are usually forced
to use initrd. The other case where you preferably build verses a non-running
kernel is when you rely on an external module to get network (eg. nvnet users)
In my experience you more often build for the running kernel then for some
other, hence utilising the kernels very own symlink seems most oppropriate to me.

Now, during instalation things should not grow even more complicated then it
already is which could happen if the policy changes to use the build symlink.
A pretty decent solution could be to search for the /lib/modules/`uname
-r`/build build symlink first, and if it is not available revert to using
/usr/src/linux in ebuilds. If an ebuild falls back to /usr/src/linux it could
display a warning. If /usr/src/linux is not the running kernel (easily found if
you parse the easily parsable include/linux/version.h) then the ebuild probably
should warn the user.
If a user wants to force an ebuild to build for another kernel an environment
variable could tell the ebuild where to use kernel sources from.

Reproducible: Always
Steps to Reproduce:
Comment 1 Luca Barbato gentoo-dev 2003-08-31 14:02:00 UTC
Was explained too many time the reason why gentoo uses the target kernel and not the running kernel for external modules.
Please search bugzilla or the mailing list -dev/-user for further explanations.
to make short explanation shorter, that way works, otherways would not.