3 # This script is used to configure the linux kernel.
5 # It was inspired by a desire to not have to hit <enter> 9 million times
6 # or startup the X server just to change a single kernel parameter.
8 # This script attempts to parse the configuration files, which are
9 # scattered throughout the kernel source tree, and creates a temporary
10 # set of mini scripts which are in turn used to create nested menus and
13 # It uses a very modified/mutilated version of the "dialog" utility
14 # written by Savio Lam (lam836@cs.cuhk.hk). Savio is not responsible
15 # for this script or the version of dialog used by this script.
16 # Please do not contact him with questions. The official version of
17 # dialog is available at sunsite.unc.edu or a sunsite mirror.
19 # Portions of this script were borrowed from the original Configure
22 # William Roadcap was the original author of Menuconfig.
23 # Michael Elizabeth Chastain (mec@shout.net) is the current maintainer.
25 # 070497 Bernhard Kaindl (bkaindl@netway.at) - get default values for
26 # new bool, tristate and dep_tristate parameters from the defconfig file.
27 # new configuration parameters are marked with '(NEW)' as in make config.
29 # 180697 Bernhard Kaindl (bkaindl@netway.at) - added the needed support
30 # for string options. They are handled like the int and hex options.
32 # 081297 Pavel Machek (pavel@atrey.karlin.mff.cuni.cz) - better error
35 # 131197 Michael Chastain (mec@shout.net) - output all lines for a
36 # choice list, not just the selected one. This makes the output
37 # the same as Configure output, which is important for smart config
40 # 101297 Michael Chastain (mec@shout.net) - remove sound driver cruft.
42 # 221297 Michael Chastain (mec@shout.net) - make define_bool actually
43 # define its arguments so that later tests on them work right.
45 # 160198 Michael Chastain (mec@shout.net) - fix bug with 'c' command
46 # (complement existing value) when used on virgin uninitialized variables.
48 # 090398 Axel Boldt (boldt@math.ucsb.edu) - allow for empty lines in help
51 # 12 Dec 1998, Michael Elizabeth Chastain (mec@shout.net)
52 # Remove a /tmp security hole in get_def (also makes it faster).
53 # Give uninitialized variables canonical values rather than null value.
54 # Change a lot of places to call set_x_info uniformly.
55 # Take out message about preparing version (old sound driver cruft).
57 # 13 Dec 1998, Riley H Williams (rhw@bigfoot.com)
58 # When an error occurs, actually display the error message as well as
59 # our comments thereon.
61 # 31 Dec 1998, Michael Elizabeth Chastain (mec@shout.net)
62 # Fix mod_bool to honor $CONFIG_MODULES.
63 # Fix dep_tristate to call define_bool when dependency is "n".
65 # 02 January 1999, Michael Elizabeth Chastain (mec@shout.net)
66 # Blow away lxdialog.scrltmp on entry to activate_menu. This protects
67 # against people who use commands like ' ' to select menus.
69 # 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
70 # - Improve the exit message (Jeff Ronne).
72 # 06 July 1999, Andrzej M. Krzysztofowicz, <ankry@mif.pg.gda.pl>
73 # - Support for multiple conditions in dep_tristate().
74 # - Implemented new functions: define_tristate(), define_int(), define_hex(),
75 # define_string(), dep_bool().
80 # Change this to TRUE if you prefer all kernel options listed
81 # in a single menu rather than the standard menu hierarchy.
86 # Make sure we're really running bash.
88 [ -z "$BASH" ] && { echo "Menuconfig requires bash" 1>&2; exit 1; }
91 # Cache function definitions, turn off posix compliance
97 # Given a configuration variable, set the global variable $x to its value,
98 # and the global variable $info to the string " (NEW)" if this is a new
101 # This function looks for: (1) the current value, or (2) the default value
102 # from the arch-dependent defconfig file, or (3) a default passed by the caller.
104 function set_x_info
() {
107 eval `sed -n -e 's/# \(.*\) is not set.*/\1=n/' -e "/^$1=/p" arch/$ARCH/defconfig`
110 eval INFO_
$1="' (NEW)'"
112 eval info
="\$INFO_$1"
116 # Load the functions used by the config.in files.
118 # I do this because these functions must be redefined depending
119 # on whether they are being called for interactive use or for
120 # saving a configuration to a file.
122 # Thank the heavens bash supports nesting function definitions.
127 # Additional comments
129 function comment
() {
130 comment_ctr
=$
[ comment_ctr
+ 1 ]
131 echo -ne "': $comment_ctr' '--- $1' " >>MCmenu
135 # Define a boolean to a specific value.
137 function define_bool
() {
141 function define_tristate
() {
145 function define_hex
() {
149 function define_int
() {
153 function define_string
() {
158 # Create a boolean (Yes/No) function for our current menu
159 # which calls our local bool function.
169 echo -ne "'$2' '[$flag] $1$info' " >>MCmenu
171 echo -e "function $2 () { l_bool '$2' \"\$1\" ;}\n" >>MCradiolists
175 # Create a tristate (Yes/No/Module) radiolist function
176 # which calls our local tristate function.
178 # Collapses to a boolean (Yes/No) if module support is disabled.
180 function tristate
() {
181 if [ "$CONFIG_MODULES" != "y" ]
193 echo -ne "'$2' '<$flag> $1$info' " >>MCmenu
196 function $2 () { l_tristate '$2' \"\$1\" ;}" >>MCradiolists
201 # Create a tristate radiolist function which is dependent on
202 # another kernel configuration option.
204 # Quote from the original configure script:
206 # If the option we depend upon is a module,
207 # then the only allowable options are M or N. If Y, then
208 # this is a normal tristate. This is used in cases where modules
209 # are nested, and one module requires the presence of something
210 # else in the kernel.
212 function dep_tristate
() {
217 while [ $# -gt 0 ]; do
218 if [ "$1" = y
]; then
220 elif [ "$1" = m
]; then
228 if [ "$dep" = y
]; then
229 tristate
"$ques" "$var"
230 elif [ "$dep" = m
]; then
231 mod_bool
"$ques" "$var"
233 define_tristate
"$var" n
238 # Same as above, but now only Y and N are allowed as dependency
239 # (i.e. third and next arguments).
241 function dep_bool
() {
246 while [ $# -gt 0 ]; do
247 if [ "$1" = y
]; then
254 if [ "$dep" = y
]; then
262 # Add a menu item which will call our local int function.
267 echo -ne "'$2' '($x) $1$info' " >>MCmenu
269 echo -e "function $2 () { l_int '$1' '$2' '$3' '$x' ;}" >>MCradiolists
273 # Add a menu item which will call our local hex function.
279 echo -ne "'$2' '($x) $1$info' " >>MCmenu
281 echo -e "function $2 () { l_hex '$1' '$2' '$3' '$x' ;}" >>MCradiolists
285 # Add a menu item which will call our local string function.
290 echo -ne "'$2' ' $1: \"$x\"$info' " >>MCmenu
292 echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists
296 # Add a menu item which will call our local One-of-Many choice list.
300 # Need to remember params cause they're gonna get reset.
308 # Find out if one of the choices is already set.
309 # If it's not then make it the default.
316 if eval [ "_\$$2" = "_y" ]
324 : ${current:=$default}
326 echo -ne "'$firstchoice' '($current) $title' " >>MCmenu
329 function $firstchoice () \
330 { l_choice '$title' \"$choices\" $current ;}" >>MCradiolists
333 } # END load_functions()
340 # Extract available help for an option from Configure.help
341 # and send it to standard output.
343 # Most of this function was borrowed from the original kernel
346 function extract_help
() {
347 if [ -f Documentation
/Configure.
help ]
349 #first escape regexp special characters in the argument:
350 var
=$
(echo "$1"|
sed 's/[][\/.^$*]/\\&/g')
351 #now pick out the right help text:
352 text
=$
(sed -n "/^$var[ ]*\$/,\${
360 }" Documentation
/Configure.
help)
364 echo "There is no help available for this kernel option."
370 echo "There is no help available for this kernel option."
376 # Activate a help dialog.
379 if extract_help
$1 >help.out
381 $DIALOG --backtitle "$backtitle" --title "$2"\
382 --textbox help.out
$ROWS $COLS
384 $DIALOG --backtitle "$backtitle" \
385 --textbox help.out
$ROWS $COLS
391 # Show the README file.
393 function show_readme
() {
394 $DIALOG --backtitle "$backtitle" \
395 --textbox scripts
/README.Menuconfig
$ROWS $COLS
399 # Begin building the dialog menu command and Initialize the
400 # Radiolist function file.
402 function menu_name
() {
403 echo -ne "$DIALOG --title '$1'\
404 --backtitle '$backtitle' \
405 --menu '$menu_instructions' \
406 $ROWS $COLS $((ROWS-10)) \
412 # Add a submenu option to the menu currently under construction.
414 function submenu
() {
415 echo -ne "'activate_menu $2' '$1 --->' " >>MCmenu
419 # Handle a boolean (Yes/No) option.
440 # Same as bool() except options are (Module/No)
442 function mod_bool
() {
443 if [ "$CONFIG_MODULES" != "y" ]; then
453 echo -ne "'$2' '<$flag> $1$info' " >>MCmenu
455 echo -e "function $2 () { l_mod_bool '$2' \"\$1\" ;}" >>MCradiolists
460 # Same as l_bool() except options are (Module/No)
462 function l_mod_bool
() {
467 ${DIALOG} --backtitle "$backtitle" \
469 This feature depends on another which has been configured as a module. \
470 As a result, this feature will be built as a module." 4 70
488 # Handle a tristate (Yes/No/Module) option.
490 function l_tristate
() {
513 # Create a dialog for entering an integer into a kernel option.
518 if $DIALOG --title "$1" \
519 --backtitle "$backtitle" \
520 --inputbox "$inputbox_instructions_int" \
521 10 75 "$4" 2>MCdialog.out
523 answer
="`cat MCdialog.out`"
524 answer
="${answer:-$3}"
526 # Semantics of + and ? in GNU expr changed, so
528 if expr "$answer" : '0$\|-[1-9][0-9]*$\|[1-9][0-9]*$' >/dev
/null
534 ${DIALOG} --backtitle "$backtitle" \
535 --infobox "You have made an invalid entry." 3 43
547 # Create a dialog for entering a hexadecimal into a kernel option.
552 if $DIALOG --title "$1" \
553 --backtitle "$backtitle" \
554 --inputbox "$inputbox_instructions_hex" \
555 10 75 "$4" 2>MCdialog.out
557 answer
="`cat MCdialog.out`"
558 answer
="${answer:-$3}"
559 answer
="${answer##*[x,X]}"
561 if expr "$answer" : '[0-9a-fA-F][0-9a-fA-F]*$' >/dev
/null
567 ${DIALOG} --backtitle "$backtitle" \
568 --infobox "You have made an invalid entry." 3 43
580 # Create a dialog for entering a string into a kernel option.
582 function l_string
() {
585 if $DIALOG --title "$1" \
586 --backtitle "$backtitle" \
587 --inputbox "$inputbox_instructions_string" \
588 10 75 "$4" 2>MCdialog.out
590 answer
="`cat MCdialog.out`"
591 answer
="${answer:-$3}"
594 # Someone may add a nice check for the entered
608 # Handle a one-of-many choice list.
610 function l_choice
() {
612 # Need to remember params cause they're gonna get reset.
619 # Scan current value of choices and set radiolist switches.
627 "$current") list
="$list $2 $1 ON " ;;
628 *) list
="$list $2 $1 OFF " ;;
636 if $DIALOG --title "$title" \
637 --backtitle "$backtitle" \
638 --radiolist "$radiolist_instructions" \
639 15 70 6 $list 2>MCdialog.out
641 choice
=`cat MCdialog.out`
645 help "$firstchoice" "$title"
649 # Now set the boolean value of each option based on
650 # the selection made from the radiolist.
655 if [ "$2" = "$choice" ]
667 # Call awk, and watch for error codes, etc.
669 function callawk
() {
670 awk "$1" ||
echo "Awk died with error code $?. Giving up." ||
exit 1
674 # A faster awk based recursive parser. (I hope)
676 function parser1
() {
680 comment_is_option = 0
681 parser("'$CONFIG_IN'","MCmenu0")
684 function parser(ifile,menu) {
686 while (getline <ifile) {
687 if ($1 == "mainmenu_option") {
688 comment_is_option = "1"
690 else if ($1 == "comment" && comment_is_option == "1") {
691 comment_is_option= "0"
695 printf("submenu %s MCmenu%s\n", $0, menu_no) >>menu
697 newmenu = sprintf("MCmenu%d", menu_no);
698 printf( "function MCmenu%s () {\n"\
701 menu_no, $0) >newmenu
703 parser(ifile, newmenu)
705 else if ($1 ~ "endmenu") {
709 else if ($0 ~ /^#|\$MAKE|mainmenu_name/) {
712 else if ($1 == "source") {
723 # Secondary parser for single menu mode.
725 function parser2
() {
728 parser("'$CONFIG_IN'","MCmenu0")
731 function parser(ifile,menu) {
733 while (getline <ifile) {
734 if ($1 ~ /mainmenu_option|endmenu/) {
737 else if ($0 ~ /^#|$MAKE|mainmenu_name/) {
740 else if ($1 == "source") {
751 # Parse all the config.in files into mini scripts.
753 function parse_config_files
() {
756 echo "function MCmenu0 () {" >MCmenu0
757 echo 'default=$1' >>MCmenu0
758 echo "menu_name 'Main Menu'" >>MCmenu0
760 if [ "_$single_menu_mode" = "_TRUE" ]
767 echo "comment ''" >>MCmenu0
768 echo "g_alt_config" >>MCmenu0
769 echo "s_alt_config" >>MCmenu0
774 # These mini scripts must be sourced into the current
775 # environment in order for all of this to work. Leaving
776 # them on the disk as executables screws up the recursion
777 # in activate_menu(), among other things. Once they are
778 # sourced we can discard them.
789 # This is the menu tree's bootstrap.
791 # Executes the parsed menus on demand and creates a set of functions,
792 # one per configuration option. These functions will in turn execute
793 # dialog commands or recursively call other menus.
795 function activate_menu
() {
796 rm -f lxdialog.scrltmp
799 comment_ctr
=0 #So comment lines get unique tags
801 $1 "$default" 2> MCerror
#Create the lxdialog menu & functions
808 Menuconfig has encountered a possible error in one of the kernel's
809 configuration files and is unable to continue. Here is the error
813 sed 's/^/ Q> /' MCerror
816 Please report this to the maintainer <mec@shout.net>. You may also
817 send a problem report to <linux-kernel@vger.rutgers.edu>.
819 Please indicate the kernel version you are trying to configure and
820 which menu you were trying to enter when this error occurred.
828 . .
/MCradiolists
#Source the menu's functions
830 . .
/MCmenu
2>MCdialog.out
#Activate the lxdialog menu
833 read selection
<MCdialog.out
837 defaults
="$selection\x12$defaults" #pseudo stack
839 0) eval $selection ;;
840 3) eval $selection y
;;
841 4) eval $selection n
;;
842 5) eval $selection m
;;
843 6) eval $selection c
;;
845 default
="${defaults%%\x12*}" defaults
="${defaults#*\x12}"
848 default
="${selection%%\ *}"
851 *"-->"*|
*"alt_config"*)
854 eval help $selection ;;
865 There seems to be a problem with the lxdialog companion utility which is
866 built prior to running Menuconfig. Usually this is an indicator that you
867 have upgraded/downgraded your ncurses libraries and did not remove the
868 old ncurses header file(s) in /usr/include or /usr/include/ncurses.
870 It is VERY important that you have only one set of ncurses header files
871 and that those files are properly version matched to the ncurses libraries
872 installed on your machine.
874 You may also need to rebuild lxdialog. This can be done by moving to
875 the /usr/src/linux/scripts/lxdialog directory and issuing the
876 "make clean all" command.
878 If you have verified that your ncurses install is correct, you may email
879 the maintainer <mec@shout.net> or post a message to
880 <linux-kernel@vger.rutgers.edu> for additional assistance.
891 # Create a menu item to load an alternate configuration file.
894 echo -n "get_alt_config 'Load an Alternate Configuration File' "\
899 # Get alternate config file name and load the
900 # configuration from it.
903 set -f ## Switch file expansion OFF
907 ALT_CONFIG
="${ALT_CONFIG:-$DEFAULTS}"
909 $DIALOG --backtitle "$backtitle" \
911 Enter the name of the configuration file you wish to load. \
912 Accept the name shown to restore the configuration you \
913 last retrieved. Leave blank to abort."\
914 11 55 "$ALT_CONFIG" 2>MCdialog.out
918 ALT_CONFIG
=`cat MCdialog.out`
920 [ "_" = "_$ALT_CONFIG" ] && break
922 if eval [ -r "$ALT_CONFIG" ]
924 eval load_config_file
"$ALT_CONFIG"
928 $DIALOG --backtitle "$backtitle" \
929 --infobox "File does not exist!" 3 38
935 For various reasons, one may wish to keep several different kernel
936 configurations available on a single machine.
938 If you have saved a previous configuration in a file other than the
939 kernel's default, entering the name of the file here will allow you
940 to modify that configuration.
942 If you are uncertain, then you have probably never used alternate
943 configuration files. You should therefor leave this blank to abort.
946 $DIALOG --backtitle "$backtitle"\
947 --title "Load Alternate Configuration"\
948 --textbox help.out
$ROWS $COLS
952 set +f
## Switch file expansion ON
953 rm -f help.out MCdialog.out
957 # Create a menu item to store an alternate config file.
960 echo -n "save_alt_config 'Save Configuration to an Alternate File' "\
965 # Get an alternate config file name and save the current
966 # configuration to it.
969 set -f ## Switch file expansion OFF
973 $DIALOG --backtitle "$backtitle" \
975 Enter a filename to which this configuration should be saved \
976 as an alternate. Leave blank to abort."\
977 10 55 "$ALT_CONFIG" 2>MCdialog.out
981 ALT_CONFIG
=`cat MCdialog.out`
983 [ "_" = "_$ALT_CONFIG" ] && break
985 if eval touch $ALT_CONFIG 2>/dev
/null
987 eval save_configuration
$ALT_CONFIG
988 load_functions
## RELOAD
992 $DIALOG --backtitle "$backtitle" \
993 --infobox "Can't create file! Probably a nonexistent directory." 3 60
999 For various reasons, one may wish to keep different kernel
1000 configurations available on a single machine.
1002 Entering a file name here will allow you to later retrieve, modify
1003 and use the current configuration as an alternate to whatever
1004 configuration options you have selected at that time.
1006 If you are uncertain what all this means then you should probably
1009 $DIALOG --backtitle "$backtitle"\
1010 --title "Save Alternate Configuration"\
1011 --textbox help.out
$ROWS $COLS
1015 set +f
## Switch file expansion ON
1016 rm -f help.out MCdialog.out
1020 # Load config options from a file.
1021 # Converts all "# OPTION is not set" lines to "OPTION=n" lines
1023 function load_config_file
() {
1025 /# .* is not set.*/ { printf("%s=n\n", $2) }
1026 ! /# .* is not set.*/ { print }
1034 # Just what it says.
1036 save_configuration
() {
1038 echo -n "Saving your kernel configuration."
1041 # Now, let's redefine the configuration functions for final
1042 # output to the config files.
1044 # Nested function definitions, YIPEE!
1048 eval define_bool
"$2" "$x"
1051 function tristate
() {
1053 eval define_tristate
"$2" "$x"
1056 function dep_tristate
() {
1060 while [ $# -gt 0 ]; do
1061 if [ "$1" = y
]; then
1063 elif [ "$1" = m
-a "$x" != n
]; then
1069 define_tristate
"$var" "$x"
1072 function dep_bool
() {
1076 while [ $# -gt 0 ]; do
1077 if [ "$1" = y
]; then
1083 define_bool
"$var" "$x"
1087 set_x_info
"$2" "$3"
1088 echo "$2=$x" >>$CONFIG
1089 echo "#define $2 ($x)" >>$CONFIG_H
1093 set_x_info
"$2" "$3"
1094 echo "$2=$x" >>$CONFIG
1095 echo "#define $2 0x${x##*[x,X]}" >>$CONFIG_H
1098 function string
() {
1099 set_x_info
"$2" "$3"
1100 echo "$2=\"$x\"" >>$CONFIG
1101 echo "#define $2 \"$x\"" >>$CONFIG_H
1104 function define_hex
() {
1106 echo "$1=$2" >>$CONFIG
1107 echo "#define $1 0x${2##*[x,X]}" >>$CONFIG_H
1110 function define_int
() {
1112 echo "$1=$2" >>$CONFIG
1113 echo "#define $1 ($2)" >>$CONFIG_H
1116 function define_string
() {
1118 echo "$1=\"$2\"" >>$CONFIG
1119 echo "#define $1 \"$2\"" >>$CONFIG_H
1122 function define_bool
() {
1123 define_tristate
"$1" "$2"
1126 function define_tristate
() {
1131 echo "$1=y" >>$CONFIG
1132 echo "#define $1 1" >>$CONFIG_H
1136 if [ "$CONFIG_MODULES" = "y" ]
1138 echo "$1=m" >>$CONFIG
1139 echo "#undef $1" >>$CONFIG_H
1140 echo "#define $1_MODULE 1" >>$CONFIG_H
1142 echo "$1=y" >>$CONFIG
1143 echo "#define $1 1" >>$CONFIG_H
1148 echo "# $1 is not set" >>$CONFIG
1149 echo "#undef $1" >>$CONFIG_H
1154 function choice
() {
1156 # Find the first choice that's already set to 'y'
1165 if eval [ "_\$$2" = "_y" ]
1174 # Use the default if none were set.
1176 : ${current:=$default}
1179 # Output all choices (to be compatible with other configs).
1184 if eval [ "$1" = "$current" ]
1186 define_bool
"$2" "y"
1188 define_bool
"$2" "n"
1194 function mainmenu_name
() {
1198 function mainmenu_option
() {
1199 comment_is_option
=TRUE
1202 function endmenu
() {
1206 function comment
() {
1207 if [ "$comment_is_option" ]
1212 echo "# $1" >>$CONFIG
1216 echo "/*" >>$CONFIG_H
1217 echo " * $1" >>$CONFIG_H
1218 echo " */" >>$CONFIG_H
1224 DEF_CONFIG
="${1:-.config}"
1225 DEF_CONFIG_H
="include/linux/autoconf.h"
1228 CONFIG_H
=.tmpconfig.h
1231 echo "# Automatically generated by make menuconfig: don't edit" >>$CONFIG
1234 echo "/*" >$CONFIG_H
1235 echo " * Automatically generated by make menuconfig: don't edit" >>$CONFIG_H
1236 echo " */" >>$CONFIG_H
1237 echo "#define AUTOCONF_INCLUDED" >> $CONFIG_H
1240 if .
$CONFIG_IN >>.menuconfig.log
2>&1
1242 if [ "$DEF_CONFIG" = ".config" ]
1244 mv $CONFIG_H $DEF_CONFIG_H
1247 if [ -f "$DEF_CONFIG" ]
1249 rm -f ${DEF_CONFIG}.old
1250 mv $DEF_CONFIG ${DEF_CONFIG}.old
1253 mv $CONFIG $DEF_CONFIG
1262 # Remove temporary files
1270 rm -f MCmenu
* MCradiolists MCdialog.out
help.out
1274 rm -f .tmpconfig .tmpconfig.h
1278 # Some distributions export these with incorrect values
1279 # which can really screw up some ncurses programs.
1282 ROWS
=${1:-24} COLS
=${2:-80}
1284 # Just in case the nasty rlogin bug returns.
1286 [ $ROWS = 0 ] && ROWS
=24
1287 [ $COLS = 0 ] && COLS
=80
1289 if [ $ROWS -lt 19 -o $COLS -lt 80 ]
1291 echo -e "\n\007Your display is too small to run Menuconfig!"
1292 echo "It must be at least 19 lines by 80 columns."
1296 ROWS
=$
((ROWS-4
)) COLS
=$
((COLS-5
))
1300 set_geometry
`stty size 2>/dev/null`
1302 menu_instructions
="\
1303 Arrow keys navigate the menu. \
1304 <Enter> selects submenus --->. \
1305 Highlighted letters are hotkeys. \
1306 Pressing <Y> includes, <N> excludes, <M> modularizes features. \
1307 Press <Esc><Esc> to exit, <?> for Help. \
1308 Legend: [*] built-in [ ] excluded <M> module < > module capable"
1310 radiolist_instructions
="\
1311 Use the arrow keys to navigate this window or \
1312 press the hotkey of the item you wish to select \
1313 followed by the <SPACE BAR>.
1314 Press <?> for additional information about this option."
1316 inputbox_instructions_int
="\
1317 Please enter a decimal value. \
1318 Fractions will not be accepted. \
1319 Use the <TAB> key to move from the input field to the buttons below it."
1321 inputbox_instructions_hex
="\
1322 Please enter a hexadecimal value. \
1323 Use the <TAB> key to move from the input field to the buttons below it."
1325 inputbox_instructions_string
="\
1326 Please enter a string value. \
1327 Use the <TAB> key to move from the input field to the buttons below it."
1329 DIALOG
="./scripts/lxdialog/lxdialog"
1331 kernel_version
="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}"
1333 backtitle
="Linux Kernel v$kernel_version Configuration"
1335 trap "cleanup ; exit 1" 1 2 15
1339 # Locate default files.
1341 CONFIG_IN
=.
/config.
in
1342 if [ "$1" != "" ] ; then
1346 DEFAULTS
=arch
/$ARCH/defconfig
1347 if [ -f .config
]; then
1353 echo "Using defaults found in" $DEFAULTS
1354 load_config_file
$DEFAULTS
1356 echo "No defaults found"
1363 # Load the functions used by the config.in files.
1364 echo -n "Preparing scripts: functions"
1367 if [ ! -e $CONFIG_IN ]
1369 echo "Your main config.in file ($CONFIG_IN) does not exist"
1375 echo "Your lxdialog utility does not exist"
1380 # Read config.in files and parse them into one shell function per menu.
1383 parse_config_files
$CONFIG_IN
1387 # Start the ball rolling from the top.
1389 activate_menu MCmenu0
1399 if $DIALOG --backtitle "$backtitle" \
1400 --yesno "Do you wish to save your new kernel configuration?" 5 60
1405 echo "*** End of Linux kernel configuration."
1406 echo "*** Check the top-level Makefile for additional configuration."
1407 if [ ! -f .hdepend
-o "$CONFIG_MODVERSIONS" = "y" ] ; then
1408 echo "*** Next, you must run 'make dep'."
1410 echo "*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo.'"
1416 echo Your kernel configuration changes were NOT saved.