From: Rob Landley <rob@landley.net>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: Re: [PATCH] Miniconfig revisited (3/3)
Date: Thu, 6 Jul 2006 21:45:54 -0400 [thread overview]
Message-ID: <200607062145.54707.rob@landley.net> (raw)
In-Reply-To: <200607061753.43518.rob@landley.net>
Documentation for miniconfig.
Signed-off-by: Rob Landley <rob@landley.net>
diff -ur linux-2.6.17.1/Documentation/kbuild/00-INDEX linux-2.6.17.new/Documentation/kbuild/00-INDEX
--- linux-2.6.17.1/Documentation/kbuild/00-INDEX 2006-06-20 05:31:55.000000000 -0400
+++ linux-2.6.17.new/Documentation/kbuild/00-INDEX 2006-07-06 13:50:35.000000000 -0400
@@ -4,5 +4,7 @@
- specification of Config Language, the language in Kconfig files
makefiles.txt
- developer information for linux kernel makefiles
+miniconfig.txt
+ - how to use miniature configuration files.
modules.txt
- how to build modules and to install them
diff -ur linux-2.6.17.1/Documentation/kbuild/miniconfig.txt linux-2.6.17.new/Documentation/kbuild/miniconfig.txt
--- linux-2.6.17.1/Documentation/kbuild/miniconfig.txt 2006-07-06 16:37:21.000000000 -0400
+++ linux-2.6.17.new/Documentation/kbuild/miniconfig.txt 2006-07-06 13:50:57.000000000 -0400
@@ -0,0 +1,103 @@
+Miniconfig documentation
+June 19, 2006
+Rob Landley <rob@landley.net>
+=============================
+
+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
+output.
+
+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:
+
+ CONFIG_THINGY=y
+
+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:
+
+ CONFIG_MODE_SKAS=y
+ CONFIG_BINFMT_ELF=y
+ CONFIG_HOSTFS=y
+ CONFIG_SYSCTL=y
+ CONFIG_STDERR_CONSOLE=y
+ CONFIG_UNIX98_PTYS=y
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_BLK_DEV_UBD=y
+ CONFIG_TMPFS=y
+ CONFIG_SWAP=y
+ CONFIG_LBD=y
+ CONFIG_EXT2_FS=y
+ CONFIG_PROC_FS=y
+
+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.
prev parent reply other threads:[~2006-07-07 1:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 21:53 [PATCH] Miniconfig revisited (0/3) Rob Landley
2006-07-07 1:43 ` [PATCH] Miniconfig revisited (1/3) Rob Landley
2006-07-07 1:44 ` [PATCH] Miniconfig revisited (2/3) Rob Landley
2006-07-07 1:45 ` Rob Landley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200607062145.54707.rob@landley.net \
--to=rob@landley.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.