Re: Automatic Configuration of a Kernel

Roman Zippel
2005-09-15T11:21:43Z

Hi,

On Wed, 14 Sep 2005, Ahmad Reza Cheraghi wrote:

> I wrote this Framework for making a .config based on
> the System Hardwares. It would be a great help if some
> people would give me their opinion about it.

How interested are you in finishing this project?
I'm asking because the major part is still ahead of you and I'm not sure
how much further you want to take it take it beyond your university
project.

The basic problem is that maintaining the bulk of autoconfig information
in a separate file is not feasible, it would be a nightmare to maintain.
This means it would be better to integrate this information into Kconfig
and define interface so that external program/scripts (preferably shell
instead of perl) can use that to configure the kernel.

A simple example could look like this:

config FOO
bool "foo"
def_auto y

Internally this would become:

config FOO
bool "foo" if !AUTO_CONFIG
default y if AUTO_CONFIG

AUTO_CONFIG could also be used to ask some simple questions for things
that can't be automatically configured and these answers can be used to
adjust other parameters, e.g.:

config AUTO_SERVER
bool "Configure for a server"
depends on AUTO_CONFIG

config BAR
bool "blah"
def_auto AUTO_SERVER

Driver configuration might look something like this:

module foo
tristate "foo support"

Kconfig would generate a config symbol FOO and a Makefile entry for this.
Autoconfiguration could now either look like this:

module foo
pci_map VENDOR DEVICE [...]

or we just an option and extract the data from the source:

module foo
option pci

In either case Kconfig would feed this data an to external program which
matches it with the existing data and returns the matching config symbols
(the matching process would be pretty much like what hotplug already
does).

As you can see a proper integration would require a bit of work, I can
help with Kconfig related parts, but it needs integration into several
systems. The end result would be much more useful. Instead of maintaining
another file, the data is shared and automatically updated by the relevant
system.

bye, Roman