Documenting kernel configuration files and using the miniconfig format

03.11.2007 at 22:34

I was recently compiling a customized 2.6.23 kernel, to get a better overview what i really selected i used the miniconfig format. It only contains the config options which a user would have to select from within menuconfig if he started from an allnoconfig setup.

Rob Landley has written, a script which takes a normal kernel config file and removes all redundant symbols which are indirectly selected. This has the advantage that the resulting config file is bloat free and gives a good overview of the selected features.

First do a make menuconfig select your config options as needed, copy the .config file to a temporary location and then run the script with the temporary file name as argument. This will generated a corresponding mini.config file. Make sure that you set the ARCH variable as appropriate. Below is an example:

make ARCH=i386 menuconfig
mv .config tempfile
ARCH=i386 tempfile
cat mini.config

To expand a mini.config back into a full .config file (to build a kernel by hand, or for further editing with menuconfig), you can go:

make ARCH=i386 allnoconfig KCONFIG_ALLCONFIG=mini.config

So far so good, i now had a resonable small config file, but i still wasn't sure what each config options actually does. Furthermore i was to lazy to actually look up each symbol in the make menuconfig help system, as a consequence i wrote an script. It takes a kernel config file and documents each option with the help text as found in the various Kconfig files in the kernel source tree. So i finally had a short and documented config file which i could further fine tune.

Hope you find it useful.


Comments (0)

There are currently no comments available