kernel 2.6.6 - was Re: [plug] Sound card problem

Denis Brown dsbrown at cyllene.uwa.edu.au
Thu Jun 17 12:18:42 WST 2004


At 11:39 17/06/2004 +0800, Ian Kent wrote:
>On Thu, 17 Jun 2004, Jim wrote:
>
> >
> > So - make config, make all, make modules_install, make install
> >       run lilo
>
>Isn't that just:
>
>make menuconfig
>make

Mustn't we have a "make modules" in here otherwise no modules to be 
installed (or possibly worse in the case that a make mrproper was not done, 
stale modules would be installed.)

>make module_install
>copy kernel and system map to location you will use in bootloader.

It strikes me as possible that Jim's system is getting confused, possibly, 
by stale modules from previous builds.   At the risk of repeating others' 
wisdom, the full thing I use is (as a normal user, cd'd to the kernel source):

cp .config config.bak      [not for the very first build of a kernel since 
.config will not exist]
make mrproper   %%%
cp config.bak .config      [this reinstates your precious and hard-won 
settings]
edit the Makeconfig file to set the EXTRAVERSION variable to your 
kernelflavour ***
make menuconfig or make xconfig or whatever depending on your system's 
resources
make dep
make bzImage
make modules
then su to root and...
make modules_install
cp System.map /boot/System.map-kernelvers-kernelflavour
cp arch/whatever/booot/bzImage /boot/kernel-kernelvers-kernelflavour
cp .config /boot/config-kernelvers-kernelflavour
edit /etc/lilo.conf to allow for the new kernel
lilo
then reboot and select the new kernel from the list of available 
kernels.   If it works, great.   If not, reboot and select your previous 
trusty kernel so you can try again :-)

%%% if the changes you intend to make are trivial, there is probably no 
need for a make mrproper.   I would value others' wisdom on that point 
though.   With a fast machine, where kernel compiles are not painfully 
slow, I usually do the Full Monty a la above.

*** kernelflavour...   to prevent confusion when you have several different 
kernels being explored, I set up a "kernelflavour".   For example "smp" or 
"smp-e1000" or simply date/time "0406170900".   Set this in the Makefile's 
EXTRAVERSION parameter, preceded by a "-" dash.   Using a real-World 
example, here are the first few lines from a recent kernel on a Gentoo system.

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 25
EXTRAVERSION = -gentoo-r1-ibm6230

When I come to copy the files into the /boot partition I then have
cp .config /boot/config-2.4.25-gentoo-r1-ibm6230
cp arch/i386/boot/bzImage /boot/kernel-2.4.25-gentoo-r1-ibm6230
and
cp System.map /boot/System.map-2.4.25-gentoo-r1-ibm6230

While this may seem cumbersome, the advantages when you have several 
experimental kernels on the go, are tremendous.   More importantly (I 
suspect so in your case) is that the /lib/modules directory will have 
specific entries for each kernel - no chance of things getting 
confused.   So in the above example I would have a subdirectory
2.4.25-gentoo-r1-ibm6230   and all of the relevant subdirectories under 
that.   If I also have a 2.4.26 kernel then I'll also see the subdirectory
2.4.26-kernelflavour   and all of its relevant files and subdirectories 
will be in their appointed places.

Then in /etc/lilo.conf you would specify the kernel name in full.   I use 
grub so my /boot/grub/grub.conf looks like

default 0
timeout 30
title=Gentoo Linux 2.4.25
root (hd0,0)
kernel /kernel-2.4.25-gentoo-r1-ibm6230 root=/dev/sda3
title=Gentoo Linux 2.4.26
root (hd0,0)
kernel /kernel-2.4.26-kernelflavour root=/dev/sda3

I'm not sure if lilo.conf will object to too-long a kernel name 
string.   Grub seems quite happy with long strings.

Hope this helps.
Denis






More information about the plug mailing list