Re: [gentoo-user] [Way OT] Kernel Symlink use or not use?
On Thursday 22 March 2007, Jakob Buchgraber wrote: It's as follows: In /etc/profile Set $KERNEL_DIR to /kernel/src/current (symlink) Set $KBUILD_OUTPUT to /dir/to/store/output/files So what's the best way and _why_? Does it even matter? Yes it does matter. And you are using docs from three sources and assuming they apply universally, which they do not. The LFS docs tell you what to do on an LFS system, the gentoo docs tell you what to do on a gentoo system, and the kernel docs are outdated and tell you to avoid making a mistake that doesn't apply to gentoo at all. Many Gentoo scripts rely on /usr/src/linux pointing to the currently *running* kernel. Without it, vmware-modules won't build for example. The kernel headers are nowhere near /usr/src so the warning in kernel docs is irrelevant. I'm not sure how LFS does these things, but you should take their docs seriously when working on one of their boxes alan -- Optimists say the glass is half full, Pessimists say the glass is half empty, Developers say wtf is the glass twice as big as it needs to be? Alan McKinnon alan at linuxholdings dot co dot za +27 82, double three seven, one nine three five -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [Way OT] Kernel Symlink use or not use?
On Fri, 23 Mar 2007 14:42:09 +0200, Alan McKinnon wrote: Many Gentoo scripts rely on /usr/src/linux pointing to the currently *running* kernel. Without it, vmware-modules won't build for example. The symlink needs to point to the target kernel, the currently running kernel can be determined from uname -r. This is important when you have built a new kernel and need to re-emerge something like nvidia-drivers (or vmware-modules as you mention, but this isn't so urgent). The running kernel already has the modules, the symlink means the new merge build for the new kernel, so you don;t lose X (or vmware) when you reboot. -- Neil Bothwick Things which must be shipped together as a set, aren't. signature.asc Description: PGP signature
Re: [gentoo-user] [Way OT] Kernel Symlink use or not use?
On Friday 23 March 2007, Neil Bothwick wrote: On Fri, 23 Mar 2007 14:42:09 +0200, Alan McKinnon wrote: Many Gentoo scripts rely on /usr/src/linux pointing to the currently *running* kernel. Without it, vmware-modules won't build for example. The symlink needs to point to the target kernel, the currently running kernel can be determined from uname -r. This is important when you have built a new kernel and need to re-emerge something like nvidia-drivers (or vmware-modules as you mention, but this isn't so urgent). The running kernel already has the modules, the symlink means the new merge build for the new kernel, so you don;t lose X (or vmware) when you reboot. Ah, my bad. You are right, of course. alan -- Optimists say the glass is half full, Pessimists say the glass is half empty, Developers say wtf is the glass twice as big as it needs to be? Alan McKinnon alan at linuxholdings dot co dot za +27 82, double three seven, one nine three five -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [Way OT] Kernel Symlink use or not use?
On Fri, 23 Mar 2007 15:24:38 +0200, Alan McKinnon wrote: Ah, my bad. You are right, of course. What I neglected to mention was that the main point of your post was absolutely correct. There is no conflict between the Gentoo and LFS documentation, both are correct when used in the only place they apply. -- Neil Bothwick ... We are Dyslexics of Borg. Your ass will be laminated. signature.asc Description: PGP signature
Re: [gentoo-user] [Way OT] Kernel Symlink use or not use?
On Thursday 22 March 2007, Jakob Buchgraber [EMAIL PROTECTED] wrote about '[gentoo-user] [Way OT] Kernel Symlink use or not use?': I considered switching to LFS a while ago as this would be the only Linux distribution fulfilling my requirements (besides Gentoo, of course). So when reading the LFS Book there was a warning saying Quote from LFS Book 6.2: I have never seen having the symlink cause a problem, unless the symlink was to the wrong kernel. I can't imagine a case where that would be true, so I'm dubious that this quote is based on any real issues. The Gentoo Documentation however says: Are you using LFS or Gentoo? I guess you should follow the documentation for what you are actually using. Or, do you regularly consult your toaster's manual for how to operate your microwave? But the $KERNEL_DIR/README says: This is an instruction for compiling userland programs. In particular userland shouldn't include headers from /usr/src/linux, EVER. Those files may change depending on what kernel is installed so they can't be accurately targeted by anything that doesn't closely track the kernel. (If it tracks the kernel that close, so that it has to be compiled for a specific kernel [and specific /configuration/ of that kernel], it should be a kernel module.) Instead your userland programs should use the /usr/include/linux area. (If they have need of linux-specific headers; standard POSIX / C99 / C++03 headers can be found elsewhere.) So after reading this I searched groups.google.com and the forums about this issue and found a different approach, which can be used instead of the /usr/src/linux symlink. Just setting KERNEL_DIR should be enough, but I'm not sure if that will be supported by Gentoo, you should just use the symlink, as the docs say (and as many proprietary, out-of-tree modules expect). So what's the best way and _why_? /usr/src/linux symlink to current (generally running) kernel. Because that's what the docs say so that's what Gentoo supports. -- Boyd Stephen Smith Jr. ,= ,-_-. =. [EMAIL PROTECTED] ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.org/ \_/ New GPG Key! Old key expires 2007-03-25. Upgrade NOW! pgpLRdS0XJCJD.pgp Description: PGP signature
Re: [gentoo-user] [Way OT] Kernel Symlink use or not use?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi ! I think that the /usr/src/linux symlink is used in Gentoo by ebuilds (as vmware-modules for example) that build kernel modules for specific hardware which aren't yet in the kernel, and so needs to know the current kernel config to see if it match their dependencies or requirements. Regards. - -- Xavier Parizet Le Jeu 22 mars 2007 20:18, Jakob Buchgraber a écrit : hi @ all I considered switching to LFS a while ago as this would be the only Linux distribution fulfilling my requirements (besides Gentoo, of course). So when reading the LFS Book there was a warning saying Quote from LFS Book 6.2: Some kernel documentation recommends creating a symlink from /usr/src/linux pointing to the kernel source directory. This is specific to kernels prior to the 2.6 series and must not be created on an LFS system as it can cause problems for packages you may wish to build once your base LFS system is complete. The Gentoo Documentation however says: Quote from http://www.gentoo.org/doc/en/kernel-upgrade.xml Gentoo requires that the /usr/src/linux symbolic link points to the sources of the kernel you are running. Quote from http://www.gentoo.org/doc/en/alsa-guide.xml Note: The above example assumes that /usr/src/linux symlink points to the kernel sources you want to use. Please ensure the same before proceeding. But the $KERNEL_DIR/README says: Quote from $KERNEL_DIR/README Do NOT use the /usr/src/linux area! This area has a (usually incomplete) set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be. So after reading this I searched groups.google.com and the forums about this issue and found a different approach, which can be used instead of the /usr/src/linux symlink. It's as follows: In /etc/profile Set $KERNEL_DIR to /kernel/src/current (symlink) Set $KBUILD_OUTPUT to /dir/to/store/output/files So what's the best way and _why_? Does it even matter? Cheers, Jay -- Join Linuxfriendlyhardware.org project on irc.freenode.org#lfh (german) Registered Linux User #373457 -- gentoo-user@gentoo.org mailing list -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.3 (GNU/Linux) iD8DBQFGAuoFmSNaOeTZvg0RAooRAKCQ3iOaogJdttZJxMKvLl8dgDDxWQCfQEzf WCwduD7yo9HfTikRiSDljM8= =8aE7 -END PGP SIGNATURE- -- gentoo-user@gentoo.org mailing list