[nSLUG] The .config file for compiling a kernel

Oliver Doepner odoepner at gmail.com
Thu Mar 12 15:44:13 ADT 2015


If this is on Debian, you can use the Debian toolchain to build the kernel:
http://kernel-handbook.alioth.debian.org/

On Thu, Mar 12, 2015 at 9:18 AM, Dave Flogeras <dflogeras2 at gmail.com> wrote:

> On Thu, Mar 12, 2015 at 4:16 AM, Mike Spencer <mspencer at tallships.ca>
> wrote:
> > 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.
>
> If you want to assign more horsepower to make, you can use 'make -jN'
> where N is the number of concurrent compiles.  The kernel parallelizes
> very well (some project's dependencies are too tight for a realizable
> speedup).  For maximum advantage, set N to the number of cores you
> have + 1.  So 5 for you.  If you have a hyperthreading CPU, you may
> see 8 "cores".  You probably want to stick to make -j5 though.  If
> your system needs to be responsive while building, decrease it to say
> make -j3 for a happy medium.
>
> Most of this huge compile stems from the fact that your kernel config
> is designed to boot anything. It probably includes all but the most
> esoteric features and drivers.  If your custom kernel is a long term
> goal, I'd highly recommend paring it down over time.  Just be
> cautious; only remove features/hardware support for things you know
> you don't have.  Work iteratively, booting once in a while to make
> sure you didn't remove a useful feature.
>
> >    + 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?
> >
>
> That should be fine.  Again useful if you botch a build and get an
> oops, you can just select your known good kernel and still boot.
> Otherwise, keep systemrescuecd handy :)
>
>
> >    + 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?
> >
>
> Yup, if you have it, /sbin/installkernel will copy and make symlinks
> for you, including keeping the old one around.  It's a debian script,
> but it is even included with Gentoo.  It is what gets called if you
> run "make install" from your kernel build.
>
> At the end of the day, you can also manage the files and symlinks
> yourself if you have a naming scheme you like better than what make
> install creates.
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
>



-- 
Oliver Doepner
http://oliver.doepner.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20150312/656d2857/attachment.html>


More information about the nSLUG mailing list