Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo creating /usr/src/linux link
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Fri Mar 05, 2004 2:22 am    Post subject: gentoo creating /usr/src/linux link Reply with quote

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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Fri Mar 05, 2004 2:43 am    Post subject: Re: gentoo creating /usr/src/linux link Reply with quote

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
View user's profile Send private message
rharvey@cox
Apprentice
Apprentice


Joined: 14 Oct 2003
Posts: 238
Location: Victoria, Texas

PostPosted: Fri Mar 05, 2004 2:49 am    Post subject: Reply with quote

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
View user's profile Send private message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Fri Mar 05, 2004 3:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 239
Location: Toowoomba/Australia

PostPosted: Fri Mar 05, 2004 3:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum