SF.net project page
Development Mailinglist ( subscribe)

Development Version
Older Versions

SourceForge.net Logo

What is Kautoconfigure?

Kautoconfigure is a bunch of scripts that tries to generate a Linux kernel .config file based on the installed hardware. Please note that this software is currently experimental and has not been maintained for a long time. "Current" versions work with early 2.4 and 2.5 kernels. Obviously new versions will be targeted at the upcomming 2.6 kernel.

Kautoconfigure won't really help aunt Tilly with her kernel, it is merely a guidance. You only know that all the selected hardware drivers are needed for your machine (but not vice versa!). Though that might just be enough.


A shell script that does the actual hardware probing. This program is used by the end user.
A Python script used to parse the kernel source tree and generate the appropriate hardware detection rules, this is generaly not used by the end user.

Using kautoconfigure:

First some developer, possibly a kernel maintainer, builds the database:

  1. For almost every device type there are probes to find hardware IDs. We extract such probes and the ID list from the kernel sources, and remember the filename of the corresponding driver.
  2. From the filename we can (hope to..) find the configuration option. This will not work all the time, but usually a file is compiled only if a know option is set. This doesn't work with IDE, the detection is now hardcoded in a central file.

So now we have a list of hardware probes and corresponding hardware IDs, and some other 'magic' probes (CPU, IDE). The database should then be distributed. By using these probes in the shell script we should be able to find out:

  • What architecture and CPU type is used
  • What PCI and USB hardware is available
  • If and what IDE controller is available

So we can build the .config file.


  1. Finish and improve the python code. PCI, USB and CPU are the priorities.
    The old PNP and in general ISA have lower priority.
  2. Adapt the shell script so that it can use the new db.
  3. Feed the data to Kconfig (Need some extra scripts for inverse dependence? Need a new interface)

The #1 and #2 can be made in parallel (for every new detection group)

Using probetools.py

Syntax: find prefix/ -name '*.c' | ./probetools.py [ -o outfile ] [ -l logfile ] -p prefix/

-o outfile
Sets the output rules file, defaults to rules.aconf
-l logfile
Sets the logfile, defaults to log.conf
-p prefix
Sets the directory prefix to the kernel sources, this should always be set something more usefull.

Using kautoconfigure.sh

Syntax: ./kautoconfigure.sh [ --debug ]

Turns on debugging. Outputs to autoconfig.out

1 November 2003