[nSLUG] Re: The .config file for compiling a kernel

Mike Spencer mspencer at tallships.ca
Thu Mar 12 04:16:39 ADT 2015

Joel Maxuel <j.maxuel at gmail.com> wrote:

> Whenever I based off an existing kernel (already installed), I copied
> over/used the /boot/config version.  

Okay, good. I guessed that but was uncertain.

> In your case (according to the symlink), that's the
> /boot/config-huge-smp-3.10.17-smp file.

But there's a problem there, probably an error from (or before) install.

Baha Baydar <bbaydar at gmail.com wrote:

> There may be a copy of the current config at /proc/config.gz at
> well. Which you can uncompress and use.

Ah-ha!  That matches the huge-smp config in boot, even though
/boot/config is a symlink to generic-smp, not huge-smp. Presumably an
error crept in there somewhere, which left me confused.

So I copied `zcat /proc/config.gz` to the new kernel src dir; ran make
oldconfig; waded through guesswork about new symbols; ran make.  Which
is still churning along after more than an hour or so on a quite
modern quad-core CPU.

Dave Flogeras <dflogeras2 at gmail.com> wrote:

> I also highly recommend doing an out-of-tree build when you are
> experimenting, it makes it very easy to start over if you wish to
> get back to a known state without polluting your src tree.

Do you mean out-of /usr/src/linux-[ver]?  Oh, yes.  I have a horror of
doing things that completely trash stuff I don't understand or know
how to fix.

> ...it's nice if you keep multiple build configurations for the same
> kernel.  You only have one copy of the src/ dir, but multiple build
> dirs; one for each config.

The way I'm doing it, that should work nicely.

I'm compiling in /home/pkg/kernel/linux-3.14.17 where the /home/pkg
tree belongs to me and is used for just this sort of thing, separate
from my own user space. Also using "make O=/home/pkg/kernel/[otherdir]".

I still find the kernel src README a little unclear.  

   + Are there restrictions on what you can name kernels?
     Can't I call the new kernel Anything-I-Like,  put it in /boot and
     edit /etc/lilo.conf to offer both it and the current vmlinuz as
     boot alternatives?

   + Do the System.map and config files in /boot play any active part
     in booting or running Linux?  My only dual boot setup boots DOS
     5.0 from a separate partition. I've never done a setup with two
     versions of Linux. But it makes sense to me to have what works now
     remain available in case the new kernel fails to boot for some
     reason. Isn't that straightforward?

- Mike

Michael Spencer                  Nova Scotia, Canada       .~. 
mspencer at tallships.ca                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^

More information about the nSLUG mailing list