All of lore.kernel.org
 help / color / mirror / Atom feed
* Quick and dirty miniconfig howto, with feature suggestions.
@ 2005-11-17 12:29 Rob Landley
  2005-11-20  3:08 ` Roman Zippel
  2005-11-20  3:25 ` Quick and dirty miniconfig howto, with feature suggestions Rob Landley
  0 siblings, 2 replies; 42+ messages in thread
From: Rob Landley @ 2005-11-17 12:29 UTC (permalink / raw)
  To: linux-kernel, Roman Zippel, Sam Ravnborg

--- What is a miniconfig?

A new feature of 2.6.15 lets you use miniature configuration files, listing 
just the symbols you want to enable and letting the configurator enable any 
dependencies to give you a valid configuration.

To make it work, create a mini.config file and run allnoconfig (to create 
a .config file with all unspecified symbols switched off) with the extra 
argument "KCONFIG_ALLCONFIG=mini.config".

--- Advantages of miniconfigs

Miniconfigs have several advantages over conventional configuration files:

 * They're portable between versions.  A miniconfig from linux 2.6.15 will
   probably build an equivalent 2.6.16 kernel.

 * It's easy to see exactly what features have been specified.

 * Miniconfigs are flexible and human editable, while generated .config files
   are brittle and easy to break if you try to edit them.  (And if you
   redirect the output > /dev/null so you just see stderr, it'll show you
   any unrecognized symbols it couldn't set due to typos.)

--- 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 KCONFIG_ALLCONFIG=~/mini.config ARCH=um O=../linux-umlbuild allnoconfig

# 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
$ exit

--- Suggestions.

1) Add a "make miniconfig" which works like allnoconfig but A) takes 
mini.config as its' default name, B) redirects stdout to /dev/null to make it 
easier to spot typoed symbols, C) aborts (exits with an error, does not write 
new .config) if mini.config isn't found or if it contains an unrecognized 
symbol.

2) Fix the interaction with O= so that it looks for the mini.config file in 
the O= directory and not the source directory, so people don't _have_ to 
specify KCONFIG_ALLCONFIG when building out of tree.

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2005-11-30  2:30 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-17 12:29 Quick and dirty miniconfig howto, with feature suggestions Rob Landley
2005-11-20  3:08 ` Roman Zippel
2005-11-20  5:54   ` Rob Landley
2005-11-21  6:15   ` [PATCH] make miniconfig Rob Landley
2005-11-21 16:06     ` [PATCH] make miniconfig (take 2) Rob Landley
2005-11-21 17:26       ` Pavel Machek
2005-11-21 17:46         ` Rob Landley
2005-11-21 17:36       ` Pavel Machek
2005-11-21 17:50         ` Rob Landley
2005-11-21 18:28           ` Pavel Machek
2005-11-21 18:53             ` Rob Landley
2005-11-21 19:24               ` Pavel Machek
2005-11-22  5:14                 ` Rob Landley
2005-11-22 22:54                   ` Pavel Machek
2005-11-23  8:58                     ` Rob Landley
2005-11-23 13:21                       ` Pavel Machek
2005-11-24  3:19                         ` Rob Landley
2005-11-25 19:45                           ` Pavel Machek
2005-11-25 21:45                             ` Rob Landley
2005-11-25 22:09                               ` Pavel Machek
2005-11-25 22:20                                 ` Rob Landley
2005-11-26  2:34                                   ` Kyle Moffett
2005-11-26 12:25                                     ` Rob Landley
2005-11-26 14:19                                       ` Pavel Machek
2005-11-26 15:51                                         ` Rob Landley
2005-11-24  4:02                         ` Rob Landley
2005-11-25 19:46                           ` Pavel Machek
2005-11-26  1:53                             ` Andre Noll
2005-11-22  5:17                 ` Rob Landley
2005-11-24 13:56       ` Roman Zippel
2005-11-24 17:45         ` Rob Landley
2005-11-25  1:48           ` Roman Zippel
2005-11-25  8:18             ` Rob Landley
2005-11-25 15:02               ` Roman Zippel
2005-11-25 16:47                 ` Rob Landley
2005-11-25 21:12             ` Rob Landley
2005-11-27 23:20               ` Roman Zippel
2005-11-28  0:59                 ` Rob Landley
2005-11-29  1:00                   ` Roman Zippel
2005-11-29  2:26                     ` Rob Landley
2005-11-30  2:29                       ` Roman Zippel
2005-11-20  3:25 ` Quick and dirty miniconfig howto, with feature suggestions Rob Landley

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.