/usr/src/linux & /usr/src/linux-2.4.20 directories

Dagmar d'Surreal dagmar.wants at nospam.com
Mon Jan 27 13:00:09 PST 2003

On Mon, 2003-01-27 at 14:12, Tushar Teredesai wrote:
> Dagmar d'Surreal wrote:
> >On Sat, 2003-01-25 at 10:45, Ronald Hummelink wrote:
> >  
> >>Yes, and usually you compile modules for the running kernel and the path
> >>to the running kernel has been for a long long time 
> >>/lib/modules/`uname -r`/build -- hence there is no need really to
> >>symlink anything. Any apps that expect the sources in /usr/src/linux are
> >>kindof broken.
> >>
> >So you're basically saying is that instead of unreasonably expecting the
> >source of the currently running kernel to be accessible as
> >/usr/src/linux or not present, these apps should have to make a guess at
> >where your kernel source is by trying to use the uname command and then
> >hope you've actually renamed your directory to match whatever it is.
> >
> Yep, I agree with Ronald; /lib/modules/`uname -r`/build is a symlink to 
> where the kernel was compiled and that is the link the apps should 
> follow to get the kernel source for the currently running kernel.
> On my system:
>     $ file /lib/modules/`uname -r`/build
>     /lib/modules/2.4.20/build: symbolic link to /usr/src/linux-2.4.20

Two problems with that.

  The first and most obvious being the case of kernels which were
compiled monolithically being remarkably short of a /lib/modules

  The second being that this is only an indicator of where the kernel
source the modules were built with is located, which, while a difference
might be indicative of other problems, is not the same thing as the
source of the currently installed kernel.  Pcmcia-cs is just one example
of something that looks in /usr/src/linux for the source tree.

The use of /usr/src/linux as a symlink is _not_ "broken".

The email address above is just as phony as it looks, and for obvious reasons.
Instant messaging contact nfo: AIM: evilDagmar  Jabber: evilDagmar at jabber.org

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list