View previous topic :: View next topic |
Author |
Message |
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Fri Mar 05, 2004 2:22 am Post subject: gentoo creating /usr/src/linux link |
|
|
Hi -
I'm sure this is discussed somewhere but I'm not finding it. gentoo/emerge is creating "linux" link in /usr/src. From what I've seen that's a major no-no (http://www.linuxgazette.com/issue62/tag/4.html for instance). Anyone know how much of gentoo's stuff relies on this link being there?
Mike |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Fri Mar 05, 2004 2:43 am Post subject: Re: gentoo creating /usr/src/linux link |
|
|
nordic bro wrote: | Anyone know how much of gentoo's stuff relies on this link being there? |
Any time you build external kernel modules (nvidia-kernel, alsa-driver, ati-drivers, pcmcia-cs, and many more) this link is used so the modules get compiled for the correct kernel. Genkernel uses this link to know which kernel sources to compile. It may be needed for some other things too that I am not aware of.
You can always delete this link if you don't like it (the link isn't causing problems on any of my computers). |
|
Back to top |
|
|
rharvey@cox Apprentice
Joined: 14 Oct 2003 Posts: 238 Location: Victoria, Texas
|
Posted: Fri Mar 05, 2004 2:49 am Post subject: |
|
|
That's a symlink to your kernel. It makes it easier to copy bzImage, vmlinuz or other important files to /boot.
For example:
cp /usr/src/linux/arch/i386/boot/bzImage /boot is simpler to write than
cp/usr/src/linux-2.6.3-r1/arch/i386/bzImage /boot _________________ "The beatings will continue until morale improves" |
|
Back to top |
|
|
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Fri Mar 05, 2004 3:40 am Post subject: |
|
|
I'm sure there are all kinds of reasons for why it could be there but I sure wish gentoo would've stuck to how the guy that wrote Linux and the kernel developers want it done Makes me worried about some mess I end up with and not knowing how it came about.
From the 2.4/6 READMEs:
> INSTALLING the kernel:
>
<snip>
>
> 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.
Seems to me if something thinks it needs kernel headers it should be getting them
from /lib/modules/`uname -r`/build/....
Mike |
|
Back to top |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Fri Mar 05, 2004 3:51 am Post subject: |
|
|
I thought programs where moving to using
Code: |
/lib/modules/`uname -r`/build/
|
to find the source and headers of the current running kernel.
This is what the nvidia driver does. KERNEL_INCLUDE="/lib/modules/`uname -r`/build/include"
Looking at the configure for pcmcia-cs it only uses /usr/src/linux as a backup if the above fails.
This is just 2 examples.
Seems like a better way of getting the correct source tree for the current kernel then relying on /usr/src/linux which may or may not point to the correct tree. _________________ Beware the grue. |
|
Back to top |
|
|
|