root/Configure

/* [previous][next][first][last][top][bottom][index][help] */
#! /bin/sh
#
# This script is used to configure the linux kernel.
# It's a fast hack - feel free to do something better.
CONFIG=.config~
CONFIG_H=include/linux/autoconf.h
> config.new
echo "#" > $CONFIG
echo "# Automatically generated make config: don't edit" >> $CONFIG
echo "#" >> $CONFIG

echo "/*" > $CONFIG_H
echo " * Automatically generated C config: don't edit" >> $CONFIG_H
echo " */" >> $CONFIG_H

next="y"
old="y"

while read i
do
        echo $i >> config.new
        echo >> $CONFIG
        echo >> $CONFIG_H
        echo
        echo "#" >> $CONFIG
        echo "/*" >> $CONFIG_H
        echo "**"
        while [ "$i" != "." -a "$i" != ":" ]
        do
                echo "# "$i >> $CONFIG
                echo " * "$i >> $CONFIG_H
                echo "**" $i
                read i || break
                echo $i >> config.new
        done
        echo "#" >> $CONFIG
        echo " */" >> $CONFIG_H
        echo "**"
        read i || break
        echo $i >> config.new
        while [ "$i" != "." -a "$i" != ":" ]
        do
                read j ques def || break
                if [ "$old" = "n" ]
                then
                        echo No $i
                        ans="n"
                else
                        echo -n $i '('$ques', default='$def')? '
                        read ans < /dev/tty
                        if [ "$ans" = "" ]
                        then
                                ans=$def
                        fi
                fi
                echo $j $ques $ans >> config.new
                if [ "$ans" = "y" ]
                then
                        echo $j = $j >> $CONFIG
                        echo "#define" $j 1 >> $CONFIG_H
                        next="y";
                fi
                read i || break
                echo $i >> config.new
        done
        old=$next
        next="y"
        if [ "$i" = ":" ]
        then
                next="n"
        fi
done

mv config.new config.in

echo
echo "The linux kernel is now hopefully configured for your setup."
echo "Check the top-level Makefile for additional configuration,"
echo "and do a 'make dep ; make clean' if you want to be sure all"
echo "the files are correctly re-made"
echo

exit 0

/* [previous][next][first][last][top][bottom][index][help] */