[lkml]   [2006]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] Miniconfig revisited (3/3)
Documentation for miniconfig.

Signed-off-by: Rob Landley <>

diff -ur linux-
--- linux- 2006-06-20 05:31:55.000000000 -0400
+++ 2006-07-06 13:50:35.000000000 -0400
@@ -4,5 +4,7 @@
- specification of Config Language, the language in Kconfig files
- developer information for linux kernel makefiles
+ - how to use miniature configuration files.
- how to build modules and to install them
diff -ur linux-
--- linux- 2006-07-06 16:37:21.000000000 -0400
+++ 2006-07-06 13:50:57.000000000 -0400
@@ -0,0 +1,103 @@
+Miniconfig documentation
+June 19, 2006
+Rob Landley <>
+What is a miniconfig?
+Current Linux kernels support miniature configuration files, listing just
+the symbols you want to enable and letting the configurator enable any
+dependencies needed to give you a valid configuration.
+The "make miniconfig" command will expand a mini.config file into a full-sized
+.config for use by the build process. By default this expects to read
+configuration data from "mini.config" in the current directory. Add the
+argument "MINICONFIG=/path/to/filename" to specify a different file. Either
+way, it creates a new ".config" file.
+Advantages of miniconfig:
+Miniconfigs have several advantages over conventional configuration files:
+ * They're more portable between versions.  A miniconfig from linux 2.6.15 will
+   most likely build an equivalent 2.6.18 kernel.
+ * It's easy to see exactly what features have been specified.
+ * Miniconfigs are human editable, human readable, and provide informative
+ error messages identifying any unrecognized (typoed) symbols.
+Creating a mini.config automatically:
+Configure your kernel as usual, then run "scripts/shrinkconfig filename"
+to create a new miniconfig file (called "filename") from that .config file.
+This will take a long time; the current script reloads the config file once
+for each line in the file to determine if that line is needed in the resulting
+To specify an architecture other than x86, set the ARCH environment variable
+before running the script, ala:
+ ARCH=arm script/shrinkconfig mini.config
+Creating a mini.config by hand:
+Open your favorite text editor starting with a blank file, and also open a
+command line window. At the command line run "make allnoconfig" followed by
+"make menuconfig". Go through menuconfig enabling each feature you want, and
+for each feature you enable look at the help entry to find the symbol name for
+that feature, and add a line to mini.config setting that symbol to the
+appropriate value, such as:
+When you've got your list of symbols, save the file and run "make miniconfig"
+on it to make sure you get the results you want.
+Real-world example:
+Here's the mini.config I use to build User Mode Linux:
+And here's how I build and test it (as a normal user, not as root):
+# Configure, building in an external directory and using a mini.config file in
+# my home directory.
+ make miniconfig MINICONFIG=~/uml-config ARCH=um O=../linux-umlbuild
+# change to build directory and build User Mode Linux
+ cd ../linux-umlbuild
+ make ARCH=um
+# Test run
+ ./linux rootfstype=hostfs rw init=/bin/sh
+ $ whoami
+ $ mount -t proc /proc /proc
+ $ cat /proc/cpuinfo
+ $ halt -f
+# And if I want to regenerate the mini.config from the .config, I do this.
+ ARCH=um scripts/shrinkconfig uml-config

Never bet against the cheap plastic solution.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-07-07 03:49    [W:0.040 / U:3.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site