* scripts/Configure patch for automatic module compile
@ 2001-05-07 6:34 Maciek Nowacki
2001-05-07 6:48 ` Keith Owens
0 siblings, 1 reply; 2+ messages in thread
From: Maciek Nowacki @ 2001-05-07 6:34 UTC (permalink / raw)
To: linux-kernel
Hi,
If you're like me, you build everything as modules, boot with an initrd that
loads in the disk or net driver and filesystem module, and then let kmod take
care of the rest. Here's a patch that changes Configure (make config) to
build all possible modules - in other words, to answer 'M' for every tristate
of some form y/m/n. It also allows some tristates to be built into the
kernel (y), so you can have a root filesystem and executables. This is done
by changing tristates in arch/${ARCH}/defconfig to default to 'a'. For
instance:
CONFIG_BINFMT_ELF=a
CONFIG_BLK_DEV_RAM=a
CONFIG_CRAMFS=a
I am posting the patch in the hope that someone finds it useful or uses it
perhaps as inspiration for a better solution. Eventually, I'd like to cut
down the config process to a short list of questions about CPU, bus, network,
and then get all the modules automatically.
Caveats: hmm.. well, it's only tested on i386, though I don't see why it
wouldn't work on anything else. If you're not running some kind of embedded
system, the defconfig must be changed or the kernel won't be very useful. Of
course, this only works with 'make config' - 'menuconfig' and 'xconfig' are
unchanged.
Maciek
--- Configure.old Sun May 6 22:28:07 2001
+++ Configure Mon May 7 00:07:32 2001
@@ -155,6 +155,7 @@
"m")
echo "$1=m" >>$CONFIG
+ echo "$1=m"
echo "#undef $1" >>$CONFIG_H
echo "#define $1_MODULE 1" >>$CONFIG_H
;;
@@ -207,26 +208,11 @@
old=$(eval echo "\${$2}")
def=${old:-'n'}
case "$def" in
- "y") defprompt="Y/m/n/?"
+ "a") define_tristate "$2" "y"
;;
- "m") defprompt="M/n/y/?"
- ;;
- "n") defprompt="N/y/m/?"
+ * ) define_tristate "$2" "m"
;;
esac
- while :; do
- readln "$1 ($2) [$defprompt] " "$def" "$old"
- case "$ans" in
- [yY] | [yY]es ) define_tristate "$2" "y"
- break ;;
- [nN] | [nN]o ) define_tristate "$2" "n"
- break ;;
- [mM] ) define_tristate "$2" "m"
- break ;;
- * ) help "$2"
- ;;
- esac
- done
fi
}
@@ -269,25 +255,7 @@
"n") defprompt="N/m/?"
;;
esac
- while :; do
- readln "$ques ($var) [$defprompt] " "$def" "$old"
- case "$ans" in
- [nN] | [nN]o ) define_tristate "$var" "n"
- break ;;
- [mM] ) define_tristate "$var" "m"
- break ;;
- [yY] | [yY]es ) echo
- echo " This answer is not allowed, because it is not consistent with"
- echo " your other choices."
- echo " This driver depends on another one which you chose to compile"
- echo " as a module. This means that you can either compile this one"
- echo " as a module as well (with M) or leave it out altogether (N)."
- echo
- ;;
- * ) help "$var"
- ;;
- esac
- done
+ define_tristate "$var" "m"
fi
else
tristate "$ques" "$var"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: scripts/Configure patch for automatic module compile
2001-05-07 6:34 scripts/Configure patch for automatic module compile Maciek Nowacki
@ 2001-05-07 6:48 ` Keith Owens
0 siblings, 0 replies; 2+ messages in thread
From: Keith Owens @ 2001-05-07 6:48 UTC (permalink / raw)
To: Maciek Nowacki; +Cc: linux-kernel
On Mon, 7 May 2001 00:34:13 -0600,
Maciek Nowacki <maciek@Voyager.powersurfr.com> wrote:
>If you're like me, you build everything as modules, boot with an initrd that
>loads in the disk or net driver and filesystem module, and then let kmod take
>care of the rest. Here's a patch that changes Configure (make config) to
>build all possible modules - in other words, to answer 'M' for every tristate
>of some form y/m/n.
I already have a patch from Ghozlane Toumi in my inbox that supports:
make randconfig
answers randomly to the questions .
make allyes
answers 'yes' to all questions .
make allno
answers 'no' to all questions .
make allmod
answer 'm' if avaiable, 'yes' else .
Plus you can specify defaults in .force_default which will always be
honoured. I have been using it to stress test the 2.4.4 configs and my
2.5 makefile rewrite, it works very nicely.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-07 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-07 6:34 scripts/Configure patch for automatic module compile Maciek Nowacki
2001-05-07 6:48 ` Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox