SCIENTIFIC-LINUX-USERS Archives

September 2004

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Mon, 27 Sep 2004 10:54:14 -0500
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (129 lines)
On Mon, 27 Sep 2004, Perret Yannick wrote:

> Alan J. Flavell wrote:
>
> >On Mon, 27 Sep 2004, Brett Viren wrote:
> >
> >
> >
> >>The .config file is created when running "make config", "make
> >>menuconfig" or "make xconfig" (prior to actually building the kernel).
> >>
> >>
> >
> >Sure, it *would* be - *if* I had intended building a kernel.
> >
> >
> >
> >>It needs to be there and correctly reflect how the kernel is
> >>actually built for most out-of-kernel drivers to work.
> >>
> >>
> >
> >Exactly.  Which is why I'm asking whether we get the corresponding
> >config file supplied when we install a pre-built SL kernel...
> >
> >
> >
> >>Some kernels store their config in /proc/config.gz,
> >>
> >>
> >
> >Thanks - I don't see anything like that on this SL installation.
> >
> >
> I'm not sure, but isn't it a 2.6+ feature of kernels ?
>
> >However, that prompted me to look around some more, and I found
> >
> >   /boot/config-2.4.21-20.EL
> >
> >which seems as if it's the SL answer to the earlier question.
> >
> >
> >
> >>mkdir /usr/src/linux
> >>zcat /proc/config.gz > /usr/src/linux/.config
> >>
> >>
> >
> >Well, the additional kernel module that I'm playing with, has a
> >Makefile which derives the running kernel version (KVERS) from
> >$(shell uname -r) , and then constructs a kernel source location
> >(KSRC) as /lib/modules/$(KVERS)/build i.e currently for me that's
> >/lib/modules/2.4.21-20.EL/build
> >
> >When I check that out on SL, I find that it's a symlink to
> >../../../usr/src/linux-2.4.21-20.EL   (typical hall of mirrors!)
> >
> >There's actually a symlink /usr/src/linux-2.4 pointing to that.
> >
> >But your /usr/src/linux doesn't exist - nor would this Makefile
> >be looking for it even if it did.
> >
> >As I said before - I had actually located a whole box of config files,
> >they're in  /usr/src/linux.../configs/kernel-...-.config
> >
> >And I had identified the appropriate one and copied it to
> >/usr/src/linux-2.4/.config , and thus completed the original task.
> >
> >However, it now seems that this file /boot/config-2.4.21-20.EL would
> >have been just as good as the starting point.

The /boot/config* files are coming from the actual kernel rpms that are
installed.  The ones in /usr/src/linux.../configs/kernel-...-.config are
coming from the kernel-source rpm.  They should be same .

 > >
> >
> >
> You should also beware of some other problems:
> in most cases, you will have to put the '.config' file so that modules
> can compile,
> but you also have to do a 'make dep' so that many computed files are
> generated.

And a

make oldconfig

  This actully fixes things up to use a .config from "these saved areas"

-Connie Sieh

> Beware in this case that in 'Makefile' the EXTRAVERSION flag is set to
> -15ELcustom! For a new module you may want to have the same kernel version
> than the one running (i.e. -15EL or -15ELsmp).
>
> In fact the way kernel sources are managed is not usefull in redhat.
> For each _installed_ kernel the /lib/module/<kernel_version>/build
> should point
> to the full set of kernel files (.config, version, headers) that
> correspond exactly to
> the installed version.
> And this should be totally separated from the kernel sources, as someone
> may want
> to build a kernel without loosing the possibility to build new modules
> for the
> existing one.
> I often compile kernels on a machine for an other machine... After that
> I always have
> to rebuild properly the /usr/src/linux-2.4/ tree so that I can compile
> new modules.
>
> Maybe it should be a SL improvement for future release ?
> It is not really difficult, as the only things to do are:
> - remove the symlink 'build'
> - create a directory with the generated headers and the .config for the
> kernel
> And that for each compiled kernel.
>
> --
> Yannick Perret
>
>
> >cheers
> >
> >
>

ATOM RSS1 RSS2