2008-12-12 15:55:58

by Marcello Henrique

[permalink] [raw]
Subject: Auto generate .config.

Hello all,

Is possible to generate .config automatically, for example: I use one
distribution with many modules a default for any distribution, however
I use only some of them. I want to optimize my kernel without select
all modules with make menuconfig. I want generate this file from just
run default kernel. This is possible?

How make to generate the file .config from my distribution to compile
new optimized kernel?

Thanks for any helps!
--
Marcello Henrique
Associa??o Software Livre de Goi?s (http://www.aslgo.org.br)
Cercomp - UFG (http://www.cercomp.ufg.br)


2008-12-12 16:15:41

by Renato S. Yamane

[permalink] [raw]
Subject: Re: Auto generate .config.

Marcello Henrique wrote:
> How make to generate the file .config from my distribution to compile
> new optimized kernel?

Marcello, default .config file of your distro can be founded in /boot
directory in something like this: "config-2.6.26".

Just rename it to .config and move it to your kernel source directory.

Best regards,
Renato

2008-12-12 16:23:39

by Marcello Henrique

[permalink] [raw]
Subject: Re: Auto generate .config.

On Fri, Dec 12, 2008 at 14:14, Renato S. Yamane
<[email protected]> wrote:
> Marcello Henrique wrote:
>> How make to generate the file .config from my distribution to compile
>> new optimized kernel?
>
> Marcello, default .config file of your distro can be founded in /boot
> directory in something like this: "config-2.6.26".
>
> Just rename it to .config and move it to your kernel source directory.
>
> Best regards,
> Renato

Hello Renato,

I understand that this is possible, but would not be possible to
generate one .config of modules that are running to compile a kernel
optimized?

The idea is that the kernel of my distribution is too fat and I only
generate a kernel module that I use automatically from a kernel fat.
understand?

I thank in advance.
--
Marcello Henrique
Associa??o Software Livre de Goi?s (http://www.aslgo.org.br)
Cercomp - UFG (http://www.cercomp.ufg.br)

2008-12-12 16:36:04

by Jon Masters

[permalink] [raw]
Subject: Re: Auto generate .config.

On Fri, 2008-12-12 at 14:20 -0200, Marcello Henrique wrote:

> I understand that this is possible, but would not be possible to
> generate one .config of modules that are running to compile a kernel
> optimized?
>
> The idea is that the kernel of my distribution is too fat and I only
> generate a kernel module that I use automatically from a kernel fat.
> understand?

Several people have written scripts over the years to do this. I don't
have one handy, but I suspect the LKML (linux-kernel) archives know.

Note that module overhead is not /too/ bad these days. It used to be
that loading modules significantly affected boot time, but some recent
improvements have helped - including a few fixes to module-init-tools:
binary trie based index files (v3.5), shortened naming (v3.6), etc. I
think that, really, at this point module loading overhead is small.

Jon.

2008-12-12 16:53:36

by Renato S. Yamane

[permalink] [raw]
Subject: Re: Auto generate .config.

Jon Masters wrote:
> Marcello Henrique wrote:
>> I understand that this is possible, but would not be possible to
>> generate one .config of modules that are running to compile a kernel
>> optimized?
>>
>> The idea is that the kernel of my distribution is too fat and I only
>> generate a kernel module that I use automatically from a kernel fat.
>> understand?
>
> Several people have written scripts over the years to do this. I don't
> have one handy, but I suspect the LKML (linux-kernel) archives know.

Greg wrote a good script in book "Linux Kernel in a Nutshell" to find a
lot of modules used in your current kernel:
<http://www.kroah.com/lkn>

Take a look in chapter 07:
<http://www.kernel.org/pub/linux/kernel/people/gregkh/lkn/lkn_pdf/ch07.pdf>

Maybe I'm wrong, but I think that I see in the past an errata about this
script in O'realy.

Best regards,
Renato

2008-12-12 17:18:34

by Andi Kleen

[permalink] [raw]
Subject: Re: Auto generate .config.

"Marcello Henrique" <[email protected]> writes:
>
> The idea is that the kernel of my distribution is too fat and I only
> generate a kernel module that I use automatically from a kernel fat.
> understand?

While it sounds like a good idea initially you'll regret it once you
plug in some USB device and find that you miss its driver.

-Andi
--
[email protected]

2008-12-12 18:12:40

by Marcello Henrique

[permalink] [raw]
Subject: Re: Auto generate .config.

On Fri, Dec 12, 2008 at 15:18, Andi Kleen <[email protected]> wrote:
> "Marcello Henrique" <[email protected]> writes:
>>
>> The idea is that the kernel of my distribution is too fat and I only
>> generate a kernel module that I use automatically from a kernel fat.
>> understand?
>
> While it sounds like a good idea initially you'll regret it once you
> plug in some USB device and find that you miss its driver.
>
> -Andi
> --
> [email protected]

In this case, generic usb driver with module in default.

--
Marcello Henrique
Associa??o Software Livre de Goi?s (http://www.aslgo.org.br)
Cercomp - UFG (http://www.cercomp.ufg.br)