Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Fri, 25 Jul 1997 00:13:22 +0200 | From | Pavel Machek <> | Subject | Menuconfig & scripts patches |
| |
Hi!
This is patch which
a) cleans up pnp handling in Config.in
b) moves items a little bit - it looks like nonsense to me to have menu with just one item
c) adds scripts unpatch-kernel, diff-tree (which is non-trivial, if you do not want to make distclean before every patch), chkver (which should be there for people like me to check versions automagicaly)
d) makes menuconfig a bit more verbose - I do not like watching blue screen with text 'preparing config scripts' - reminds me of NT :-)
Pavel
(Please someone test this with xconfig & report me. Please someone include this in mainstream kernel :-)
diff -uNr -x .dep* -x .hdep* -x *.[oas] -x *~ -x #* -x *CVS* -x *.orig -x *.rej -x *.old -x .menu* -x asm -x local.h -x System.map -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x *RCS* -x conmakehash -x map -x build -x build -x configure -x *target* clean/arch/i386/config.in linux/arch/i386/config.in --- clean/arch/i386/config.in Tue Jun 17 14:28:13 1997 +++ linux/arch/i386/config.in Thu Jul 24 23:35:31 1997 @@ -4,23 +4,16 @@ # mainmenu_name "Linux Kernel Configuration" -mainmenu_option next_comment -comment 'Code maturity level options' bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL -endmenu mainmenu_option next_comment -comment 'Loadable module support' -bool 'Enable loadable module support' CONFIG_MODULES +comment 'General setup' + +bool 'Loadable modules' CONFIG_MODULES if [ "$CONFIG_MODULES" = "y" ]; then bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS bool 'Kernel daemon support (e.g. autoload of modules)' CONFIG_KERNELD fi -endmenu - -mainmenu_option next_comment -comment 'General setup' - bool 'Kernel math emulation' CONFIG_MATH_EMULATION bool 'Networking support' CONFIG_NET bool 'PCI bios support' CONFIG_PCI @@ -50,7 +43,15 @@ endmenu -source drivers/pnp/Config.in +mainmenu_option next_comment +comment 'Plug and Play support' + +bool 'Plug and Play support' CONFIG_PNP + +if [ "$CONFIG_PNP" = "y" ]; then + source drivers/pnp/Config.in +fi +endmenu source drivers/block/Config.in diff -uNr -x .dep* -x .hdep* -x *.[oas] -x *~ -x #* -x *CVS* -x *.orig -x *.rej -x *.old -x .menu* -x asm -x local.h -x System.map -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x *RCS* -x conmakehash -x map -x build -x build -x configure -x *target* clean/drivers/pnp/Config.in linux/drivers/pnp/Config.in --- clean/drivers/pnp/Config.in Fri Apr 11 21:16:47 1997 +++ linux/drivers/pnp/Config.in Thu Jul 24 23:35:28 1997 @@ -2,15 +2,6 @@ # Plug and Play configuration # -mainmenu_option next_comment -comment 'Plug and Play support' - -bool 'Plug and Play support' CONFIG_PNP - -if [ "$CONFIG_PNP" = "y" ]; then - if [ "$CONFIG_PNP_PARPORT" != "n" ]; then +if [ "$CONFIG_PNP_PARPORT" != "n" ]; then bool ' Auto-probe for parallel devices' CONFIG_PNP_PARPORT_AUTOPROBE - fi fi - -endmenu diff -uNr -x .dep* -x .hdep* -x *.[oas] -x *~ -x #* -x *CVS* -x *.orig -x *.rej -x *.old -x .menu* -x asm -x local.h -x System.map -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x *RCS* -x conmakehash -x map -x build -x build -x configure -x *target* clean/scripts/Menuconfig linux/scripts/Menuconfig --- clean/scripts/Menuconfig Fri Apr 11 21:16:52 1997 +++ linux/scripts/Menuconfig Thu Jul 24 23:28:21 1997 @@ -629,12 +629,14 @@ # Parse all the config.in files into mini scripts. # function parse_config_files () { + echo -n "." rm -f MCmenu* echo "function MCmenu0 () {" >MCmenu0 echo 'default=$1' >>MCmenu0 echo "menu_name 'Main Menu'" >>MCmenu0 + echo -n "." if [ "_$single_menu_mode" = "_TRUE" ] then parser2 @@ -657,6 +659,7 @@ # for i in MCmenu* do + echo -n "." source ./$i done @@ -1188,22 +1191,17 @@ if [ -f $DEFAULTS ] then - echo "#" - echo "# Using defaults found in" $DEFAULTS - echo "#" + echo "Using defaults found in" $DEFAULTS load_config_file $DEFAULTS else - echo "#" - echo "# No defaults found" - echo "#" + echo "No defaults found" fi # Fresh new log. >.menuconfig.log -$DIALOG --backtitle "$backtitle" \ - --infobox "Preparing configuration scripts..." 3 40 +echo -n "Preparing configuration scripts: version" # # Check kernel version of previous menuconfig build. @@ -1222,6 +1220,7 @@ if [ "$rebuildsound" ] then + echo -n ", sound" # Activate the Linux compatible sound configuration. # This may not work for all sound cards. (See sound docs) # @@ -1231,13 +1230,16 @@ fi # Load the functions used by the config.in files. +echo -n ", functions" load_functions # # Read config.in files and parse them into one shell function per menu. # +echo -n " , parsing" parse_config_files $CONFIG_IN +echo "done." # # Start the ball rolling from the top. # diff -uNr -x .dep* -x .hdep* -x *.[oas] -x *~ -x #* -x *CVS* -x *.orig -x *.rej -x *.old -x .menu* -x asm -x local.h -x System.map -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x *RCS* -x conmakehash -x map -x build -x build -x configure -x *target* clean/scripts/chkver linux/scripts/chkver --- clean/scripts/chkver Thu Jan 1 01:00:00 1970 +++ linux/scripts/chkver Thu Jul 24 23:46:31 1997 @@ -0,0 +1,85 @@ +#!/bin/bash +# +# This script was created by Pavel Machek <machek@atrey.karlin.mff.cuni.cz> +# to check versions of critical pieces of software (mostly for compatibility +# with new and new kernel versions). I decided to write this after I hunted +# bug in linux memory managment, which was not there. It was too old linker +# causing problems. +# +# I would like Linus to include this to kernel distribution ;-) +# +# Imagine how nice & simple this program could be if every other program +# responded to <name> --version with exactly one line containing version +# in form AA.BB.CC... The dirtiest piece here is getting version out of +# sysvinit... +# + +function getnum + { + head -1 | sed 's/.*[^0-9.]\([0-9][0-9]*\.[0-9][0-9.]*\)[^0-9.].*/\1/g' + } + +function cmp + { + echo -n $1 " " + VER=start`eval $2`end + VER=`echo $VER | getnum` + T1=${VER}. + T2=${3}. + echo -n "... " +# echo "($T1), ($T2)" + while [ "x$T1" != "x" -a "x$T2" != "x" ] + do + H1=${T1%%.*} + H2=${T2%%.*} + T1=${T1#*.} + T2=${T2#*.} + if [ $H1 -gt $H2 ]; then echo ok.; return; fi + if [ $H1 -lt $H2 ]; then + echo "OLD: $VER present, $3 required"; + if [ .$HALT = .y ]; then + echo "***" + echo "*** Using old gcc and/or old binutils, you can build" + echo "*** nicely looking, partly-running kernels crashing" + echo "*** after 30minutes after boot (happend to me)." + echo "***" + exit 1 + fi + return; + fi + done + echo ok. + } + +echo Checking versions of some utilities... +if [ ".$1" = ".s" ]; then HALT=y; fi +cmp gcc 'gcc --version' 2.7.2 +cmp binutils "ld --version" 2.7.0.9 +if [ ".$1" != ".s" ] + then + cmp libc 'ls -l /lib/libc.so.* | sed s/.*libc.so.// | sort -r | head -1' 5.4.23 + if [ -e /usr/lib/libg++.so ] + then + cmp libc++ 'ls -l /usr/lib/libg++.so.* | sed s/.*libg++.so.// | sort -r | head -1' 2.7.2.1 + else + echo libc++ - not present here + fi + cmp 'dynamic linker' "ldd -v | getnum" 1.8.5 + cmp procps "ps --version | getnum" 1.01 + if [ "$USER" = root ] + then + cmp sysvinit 'strings `egrep -li INIT_VERSION=sysvinit- /proc/*/environ | head -1` | egrep -i INIT_VERSION=sysvinit-' 2.69 + else + echo "sysvinit - must be root" + fi + cmp mount 'mount --version 2>&1' 2.6 + cmp loadkeys 'loadkeys -h 2>&1' 0.91 + cmp "modules" "/sbin/insmod -V 2>&1 | grep -i version" 2.1.34 + fi +# New Changes no longer mention rpm +#if which rpm > /dev/null +# then +# cmp "rpm" 'rpm --version | getnum' +# else +# echo rpm - not present here +# fi diff -uNr -x .dep* -x .hdep* -x *.[oas] -x *~ -x #* -x *CVS* -x *.orig -x *.rej -x *.old -x .menu* -x asm -x local.h -x System.map -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x *RCS* -x conmakehash -x map -x build -x build -x configure -x *target* clean/scripts/diff-tree linux/scripts/diff-tree --- clean/scripts/diff-tree Thu Jan 1 01:00:00 1970 +++ linux/scripts/diff-tree Thu Jul 24 23:46:31 1997 @@ -0,0 +1,3 @@ +#!/bin/bash +diff -uNr -x '.dep*' -x '.hdep*' -x '*.[oas]' -x '*~' -x '#*' -x '*CVS*' -x '*.orig' -x '*.rej' -x '*.old' -x '.menu*' -x asm -x local.h -x 'System.map' -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x '*RCS*' -x conmakehash -x map -x build -x build -x configure -x '*target*' $1 $2 + Binary files clean/scripts/lxdialog/lxdialog and linux/scripts/lxdialog/lxdialog differ diff -uNr -x .dep* -x .hdep* -x *.[oas] -x *~ -x #* -x *CVS* -x *.orig -x *.rej -x *.old -x .menu* -x asm -x local.h -x System.map -x autoconf.h -x compile.h -x version.h -x .version -x defkeymap.c -x uni_hash.tbl -x zImage -x vmlinu?* -x TAGS -x bootsect -x *RCS* -x conmakehash -x map -x build -x build -x configure -x *target* clean/scripts/unpatch-kernel linux/scripts/unpatch-kernel --- clean/scripts/unpatch-kernel Thu Jan 1 01:00:00 1970 +++ linux/scripts/unpatch-kernel Thu Jul 24 23:46:31 1997 @@ -0,0 +1,2 @@ +#!/bin/bash +find . -name "*.orig" -exec sh -c 'mv {} `echo {} | sed s/\.orig//`' \; -- I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).
| ![\](/images/icornerr.gif) |