From: Heiko Z. <smi...@us...> - 2004-07-11 14:35:36
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30421/scripts Modified Files: ebtables functions i2c lm_sensors openswan patch-o-matic util-linux Log Message: - more changes to the build system to get everything working in with kernel 2.6 - replaced patch-o-matic with patch-o-matic-ng v20040704 - updated iptables to v1.2.11 - use kernel prism54 driver on kernel 2.6 Index: functions =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/functions,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- functions 16 Mar 2004 15:29:13 -0000 1.53 +++ functions 11 Jul 2004 14:35:20 -0000 1.54 @@ -455,6 +455,44 @@ else echo "$1=$2" >>$KERNELDIR/.config fi + + echo "setting $1 to $2" } +# go through all kernel config files in the specified directory (relative to the kernel path) and all subdirectories +# will set all 'tristate' to 'm' and all 'bool' to 'yes' +function set_all_kernel_options () { + if [ -d $KERNELDIR/$1 ]; then + if [ "$CONFIG_LINUX_VERSION" = "2.6" ]; then + for FILE in $( find $KERNELDIR/$1 -name Kconfig ); do + # anybody who know awk could probably shorten the next line quite a bit.... + # don't remove the 'sort' command, we use it to add a necessary newline before 'column' + for CFG in $( grep -s -v "^#" $FILE | grep ^config -A 1 | sed -e s/config/""/g | tr -d "\n" | sed -e s/--/"\n"/g | sort | column -t 2> /dev/null | fmt -u -s -w 9999 | cut -f -2 -d " " | sed -e s/" "/#/g ); do + CFGOPTION="CONFIG_"${CFG%%#*} + case ${CFG##*#} in + tristate) set_kernel_option $CFGOPTION m + ;; + bool) set_kernel_option $CFGOPTION y + ;; + *) + echo "ignoring unkown config type '${CFG##*#}' for '$CFGOPTION'" + #exit 1 + ;; + esac + done + done + fi + + if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then + for FILE in $( find $KERNELDIR/$1 -name Config.in ); do + for CFG in $( grep -s tristate $FILE | cut -d "'" -f 3 | cut -d " " -f 2 ); do + set_kernel_option $CFG m + done + for CFG in $( grep -s bool $FILE | cut -d "'" -f 3 | cut -d " " -f 2 ); do + set_kernel_option $CFG y + done + done + fi + fi +} Index: util-linux =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/util-linux,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- util-linux 7 Jun 2004 03:11:35 -0000 1.23 +++ util-linux 11 Jul 2004 14:35:25 -0000 1.24 @@ -25,7 +25,8 @@ case $1 in build ) - disable_et_dyn + disable_et_dyn + test "$CONFIG_LINUX_VERSION" = "2.6" && old_kernel_includes if [ ! -f util-linux-patch.done ]; then if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then echo "patch 2.4 " Index: openswan =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/openswan,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- openswan 25 Jun 2004 01:39:20 -0000 1.1 +++ openswan 11 Jul 2004 14:35:25 -0000 1.2 @@ -50,12 +50,17 @@ set_kernel_option CONFIG_IPSEC_DEBUG n set_kernel_option CONFIG_IPSEC_ALG_NON_LIBRE n set_kernel_option CONFIG_IPSEC_ALG_CRYPTOAPI n - - replace_str Makefile.inc /usr/local /usr - replace_str Makefile.inc /usr/src/linux $KERNELDIR - replace_str ./fswcert/Makefile /usr/local /usr - KERNELSRC=$KERNELDIR fi + + if [ "$CONFIG_LINUX_VERSION" = "2.6" ]; then + set_all_kernel_options + fi + + replace_str Makefile.inc /usr/local /usr + replace_str Makefile.inc /usr/src/linux $KERNELDIR + replace_str ./fswcert/Makefile /usr/local /usr + KERNELSRC=$KERNELDIR + # compile freeswan # parallel build fails - do not use $PMAKE @@ -74,7 +79,7 @@ make install DESTDIR=$WORKDIR/tmp || exit 1 copy_docs $WORKDIR/tmp mkdir -p $DOCDIR/freeswan || exit 1 - cp -dpR doc/* $DOCDIR/freeswan || exit 1 +h cp -dpR doc/* $DOCDIR/freeswan || exit 1 cp -dpR CHANGES* $DOCDIR/freeswan || exit 1 cp -dpR README* $DOCDIR/freeswan || exit 1 rm -rf $WORKDIR/tmp/usr/local || exit 1 Index: patch-o-matic =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/patch-o-matic,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- patch-o-matic 28 Jun 2004 23:17:02 -0000 1.23 +++ patch-o-matic 11 Jul 2004 14:35:25 -0000 1.24 @@ -28,8 +28,8 @@ echo "no extra patches" > $WORKDIR/netfilter.patches.lst if [ "$CONFIG_NF_PATCHES" = "y" ]; then export KERNEL_DIR=$KERNELDIR - NETFILTERDIR=$(find_src_dir iptables) - export NETFILTERDIR + IPTABLES_DIR=$(find_src_dir iptables) + export IPTABLES_DIR PATCHES=""; EXCLUDE_PATCHES=""; @@ -40,22 +40,31 @@ [ "$CONFIG_NF_SUBMITTED" = "y" ] && \ PATCHES="$PATCHES submitted" + yes "" | ./runme --batch submitted + + [ "$CONFIG_NF_UPDATES" = "y" ] && \ + PATCHES="$PATCHES updates" + yes "" | ./runme --batch updates [ "$CONFIG_NF_PENDING" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && \ PATCHES="$PATCHES pending" + yes "" | ./runme --batch pending - [ "$CONFIG_NF_OPTIMIZATION" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ - PATCHES="$PATCHES optimizations" + #[ "$CONFIG_NF_OPTIMIZATION" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ + # PATCHES="$PATCHES optimizations" - [ "$CONFIG_NF_BASE" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ - PATCHES="$PATCHES $(sed -e "/^$/d" -e "/^ \+$/d" -e "/^ \+$/d" -e "/^#/d" $MYDIR/config/config-netfilter-base)" + #[ "$CONFIG_NF_BASE" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ + # PATCHES="$PATCHES $(sed -e "/^$/d" -e "/^ \+$/d" -e "/^ \+$/d" -e "/^#/d" $MYDIR/config/config-netfilter-base)" + [ "$CONFIG_NF_BASE" = "y" ] && \ + yes "" | ./runme --batch base - [ "$CONFIG_NF_EXTRA" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ - PATCHES="$PATCHES $(sed -e "/^$/d" -e "/^ \+$/d" -e "/^ \+$/d" -e "/^#/d" $MYDIR/config/config-netfilter-extra)" + + #[ "$CONFIG_NF_EXTRA" = "y" ] && [ "$CONFIG_NF_SUBMITTED" = "y" ] && [ "$CONFIG_NF_PENDING" = "y" ] && \ + # PATCHES="$PATCHES $(sed -e "/^$/d" -e "/^ \+$/d" -e "/^ \+$/d" -e "/^#/d" $MYDIR/config/config-netfilter-extra)" # reformat to fit as commandline option to runme - EXCLUDE=""; for P in $EXCLUDE_PATCHES; do - EXCLUDE="$EXCLUDE --exclude $P"; done + #EXCLUDE=""; for P in $EXCLUDE_PATCHES; do + # EXCLUDE="$EXCLUDE --exclude $P"; done ## create a temp file were we store the output of patch-o-matic ## [we do not have mktemp, so do it the simple unsecure way] @@ -68,7 +77,9 @@ # now apply all patches at once and take care # to exclude troublesome patches - ./runme --batch $EXCLUDE $PATCHES + + #yes "" | ./runme --batch $EXCLUDE $PATCHES + # >$TMPFILE 2>&1 #if ! grep -q "Kernel is now ready for compilation." $TMPFILE; then @@ -79,29 +90,14 @@ #cat $TMPFILE; rm -f $TMPFILE - for CFG in $( grep tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done - for CFG in $( grep tristate $KERNELDIR/net/ipv6/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/net/ipv6/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done - + set_all_kernel_options net/ipv4/netfilter + set_all_kernel_options net/ipv6/netfilter + # settings didn't get applied, so let's do it here set_kernel_option CONFIG_IP_NF_RAW m set_kernel_option CONFIG_IP_NF_SET_MAX 256 - echo "**** IPv4 ****" > $WORKDIR/netfilter.patches.lst - grep tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 2 >> $WORKDIR/netfilter.patches.lst pushd $KERNEL_DIR > /dev/null - echo "" >> $WORKDIR/netfilter.patches.lst - echo "**** IPv6 ****" >> $WORKDIR/netfilter.patches.lst - grep tristate $KERNELDIR/net/ipv6/netfilter/Config.in | cut -d "'" -f 2 >> $WORKDIR/netfilter.patches.lst make oldconfig || exit 1 popd > /dev/null fi @@ -109,14 +105,16 @@ ;; install ) - mkdir -p $DOCDIR/netfilter-patch-o-matic || exit 1 - for CFG in $(grep dep_tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2) - do - FILES=$(grep -rl $CFG * | grep patch.configure.help | sed -e s/patch.configure.help/patch.help/) - copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 - FILES=$(grep -rl $CFG * | grep patch.configure.help) - copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 - done + if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then + mkdir -p $DOCDIR/netfilter-patch-o-matic || exit 1 + for CFG in $(grep dep_tristate $KERNELDIR/net/ipv4/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2) + do + FILES=$(grep -rl $CFG * | grep patch.configure.help | sed -e s/patch.configure.help/patch.help/) + copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 + FILES=$(grep -rl $CFG * | grep patch.configure.help) + copy_files "$FILES" $DOCDIR/netfilter-patch-o-matic || exit 1 + done + fi ;; * ) Index: lm_sensors =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/lm_sensors,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- lm_sensors 16 Mar 2004 01:47:03 -0000 1.19 +++ lm_sensors 11 Jul 2004 14:35:25 -0000 1.20 @@ -28,32 +28,24 @@ case $1 in build ) if [ "$CONFIG_LM_SENSORS" = "y" ]; then + # never apply the patch on a kernel >2.4 , we must use the kernel drivers if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then echo preparing patch cd mkpatch || exit 1 ./mkpatch.pl ../ $KERNELDIR | patch -p1 -d $KERNELDIR || exit 1 cd .. || exit 1 - for CFG in $( grep tristate $KERNELDIR/drivers/sensors/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/drivers/sensors/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done - for CFG in $( grep tristate $KERNELDIR/drivers/i2c/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/drivers/i2c/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done - # this is a workaround for a bug in lm_sensors 2.8.2 - #cp kernel/chips/lm75.h $KERNELDIR/drivers/sensors/ || exit 1 - OLDDIR=$(pwd) - cd $KERNELDIR || exit 1 - yes "" | make oldconfig - make dep || exit 1 - cd $OLDDIR || exit 1 fi + set_all_kernel_options drivers/sensors + set_all_kernel_options drivers/i2c + + OLDDIR=$(pwd) + cd $KERNELDIR || exit 1 + #yes "" | + make oldconfig + #make dep || exit 1 + cd $OLDDIR || exit 1 + SMP=0 test "$CONFIG_LINUX_SMP" = "y" && SMP=1 Index: ebtables =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/ebtables,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ebtables 17 Jan 2004 13:42:11 -0000 1.7 +++ ebtables 11 Jul 2004 14:35:20 -0000 1.8 @@ -31,16 +31,9 @@ if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then zcat $DL_DIR/src/ebtables-brnf-*.diff.gz | patch -p 1 -d $KERNELDIR || exit 1 - # update kernel - for CFG in $( grep tristate $KERNELDIR/net/bridge/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG m - done - for CFG in $( grep bool $KERNELDIR/net/bridge/netfilter/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - set_kernel_option $CFG y - done - set_kernel_option CONFIG_IP_NF_MATCH_PHYSDEV m fi + set_all_kernel_options net/bridge/netfilter make MANDIR=/usr/share/man $PMAKE all|| exit 1 strip_debug fi Index: i2c =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/i2c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- i2c 15 Jan 2004 18:04:28 -0000 1.7 +++ i2c 11 Jul 2004 14:35:20 -0000 1.8 @@ -26,20 +26,13 @@ case $1 in build ) - if [ "$CONFIG_LINUX_VERSION" != "2.4" ]; then - exit 0 - fi if [ "$CONFIG_LM_SENSORS" = "y" ]; then echo preparing patch cd mkpatch || exit 1 ./mkpatch.pl ../ $KERNELDIR | patch -p1 -d $KERNELDIR || exit 1 cd .. || exit 1 - for CFG in $( grep tristate $KERNELDIR/drivers/i2c/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - echo "$CFG=m" >> $KERNELDIR/.config - done - for CFG in $( grep bool $KERNELDIR/drivers/i2c/Config.in | cut -d "'" -f 3 | cut -d " " -f 2 ); do - echo "$CFG=y" >> $KERNELDIR/.config - done + + set_all_kernel_options drivers/i2c fi ;; * ) |