[nSLUG] The .config file for compiling a kernel

Joel Maxuel j.maxuel at gmail.com
Wed Mar 11 08:35:26 ADT 2015


Whenever I based off an existing kernel (already installed), I copied
over/used the /boot/config version.  In your case (according to the
symlink), that's the /boot/config-huge-smp-3.10.17-smp file.

Copy that file (and rename back to "config") into your /usr/src/linux tree
(or wherever your kernel source is, lowest level folder), and then run
(when I used to do it) "make xconfig".  This saves you having to answer
each question one at a time - and there are thousands (rather, jump to
which parameters you want to modify).

Alternatively, if you don;t like X, there is an ncurses config screen as
well that serves the same purpose as xconfig: "make menuconfig"

Hope this helps.

--
Cheers,
Joel Maxuel

"One should strive to achieve, not sit in bitter regret."
 - Ronan Harris / Mark Jackson

On Wed, Mar 11, 2015 at 2:28 AM, Mike Spencer <mspencer at tallships.ca> wrote:

>
> I want to compile a new kernel.  The source doesn't come with a
> ./.config file. I don't know what most of the options are/mean so
> if I do the basic "make config" command, I'll be blindly responding to
> dozens of "...if unsure, say {yes,no}" suggestions.
>
> What I'd like to to have just the same config as presently in use
> excepting for any new items.  It is, after all, in the hope that the
> newer kernel will support presently unsupported hardware that I'm
> doing this.
>
> The README says one of the config options is:
>
>      "make oldconfig"   Default all questions based on the contents of
>                         your existing ./.config file and asking about
>                         new config symbols.
>
> which sounds like what I want.
>
> Except that there is no ./.config in the root directory of the new source
> code.  I infer that I need to put one there.
>
> But where do I get it?
>
> There is a .config in /usr/src/linux-3.10.17:
>
>   /usr/src/linux-3.10.17:
>
>   -rw-r--r--   1 root root 141822 Oct 23  2013 .config
>
> But over in /boot, I have 4 versions of the kernel (owner fields
> elided for readability):
>
>     lrwxrwxrwx  1  28 Aug 16  2014 vmlinuz -> vmlinuz-huge-smp-3.10.17-smp
>     -rw-r--r--  1  3088656 Oct 23  2013 vmlinuz-generic-3.10.17
>     -rw-r--r--  1  3272208 Oct 23  2013 vmlinuz-generic-smp-3.10.17-smp
>     -rw-r--r--  1  5995104 Oct 23  2013 vmlinuz-huge-3.10.17
>     -rw-r--r--  1  6251392 Oct 23  2013 vmlinuz-huge-smp-3.10.17-smp
>
> with 4 corresponding config files:
>
>     lrwxrwxrwx  1       27 Aug  8  2014 config ->
> config-huge-smp-3.10.17-smp
>     -rw-r--r--  1   140912 Oct 23  2013 config-generic-3.10.17
>     -rw-r--r--  1   141822 Oct 23  2013 config-generic-smp-3.10.17-smp
>     -rw-r--r--  1   140912 Oct 23  2013 config-huge-3.10.17
>     -rw-r--r--  1   141822 Oct 23  2013 config-huge-smp-3.10.17-smp
>
> LILO boots /boot/vmlinuz which is a link to vmlinuz-huge-smp-3.10.17-smp.
>
> But the .config in the /usr/src tree is the same as the generic-smp
> one in /boot, not the same as the huge-smp one in /boot. So the
> .config in /usr/src seems not to match the kernel that I'm actually
> running.
>
> You can (crudely) verify that from file sizes in the listings above.
>
> So I don't understand how this works or which .config I should copy to
> the new kernel-source dir in order to use make oldconfig.
>
> Is there an obvious answer -- obvious to y'all that have presumably
> done this many times before?
>
>
> Tnx,
> - Mike
>
> --
> Michael Spencer                  Nova Scotia, Canada       .~.
>                                                            /V\
> mspencer at tallships.ca                                     /( )\
> http://home.tallships.ca/mspencer/                        ^^-^^
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20150311/cb012568/attachment.html>


More information about the nSLUG mailing list