summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-07-01 20:55:52 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-07-01 20:55:52 +0000
commit201a0407552387850c088ea678c1592730e39da1 (patch)
tree0aecf257dab212ec92998aabf020d0d66bf8d601 /build_tools
parented3f5c79ec3d99d30e9dd2dc15858d89356724d5 (diff)
remove some more unnecessary stuff, and update genmodconf to no longer support 2.4 kernels, have proper name references, etc.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4503 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/genmodconf85
-rwxr-xr-xbuild_tools/make_tree8
-rw-r--r--build_tools/menuselect-deps.in1
-rwxr-xr-xbuild_tools/zaptel_svn_tarball90
4 files changed, 29 insertions, 155 deletions
diff --git a/build_tools/genmodconf b/build_tools/genmodconf
index ada453e..cf1864b 100755
--- a/build_tools/genmodconf
+++ b/build_tools/genmodconf
@@ -1,67 +1,48 @@
#!/bin/sh
# this script makes an attempt to build a proper set of rules
-# for loading the Zaptel modules and automatically running ztcfg
+# for loading the DAHDI modules and automatically running dahdi_xcfg
#
-# it accepts three parameters:
-# the kernel major version being targeted (either linux24 or linux26)
+# it accepts two parameters:
# the root prefix to be used for finding/creating the files
# the list of module names being installed
#
# the process is as follows:
#
-# for linux24, the file can be located either at /etc/modules.conf (combined
-# with all other rules) or in /etc/modutils/zaptel (only the Zaptel rules)
+# the file can be located at /etc/modprobe.conf (combined with all
+# other rules), /etc/modprobe.d/dahdi (DAHDI only) or /etc/modules.d/dahdi
+# (DAHDI only)
#
-# for linux26, the file can be located at /etc/modprobe.conf (combined with all
-# other rules), /etc/modprobe.d/zaptel (Zaptel only) or /etc/modules.d/zaptel
-# (Zaptel only)
-#
-# when the file is Zaptel rules only, then we don't preserve the existing
+# when the file is DAHDI rules only, then we don't preserve the existing
# contents of the file; the system administrator can put desired options and
# overrides in a separate file with a name that appears earlier in the sort
# order, so there is no need to edit the file produced by this script
#
# when the file is combined with all other rules, then we make a backup
-# of it and remove all the old Zaptel rules we can find, replacing them with
+# of it and remove all the old DAHDI rules we can find, replacing them with
# new ones
#
-# in addition, for linux26, versions of module-init-tools 3.2.0 and later
+# in addition, versions of module-init-tools 3.2.0 and later
# have the ability to pass module parameters specified on the modprobe command
# line to commands in 'install' rules, thus keeping them from being lost, so
# we try to determine what version is installed and take advantage of that
-if [ "${1}" = "linux24" ]; then
- if [ -d ${2}/etc/modutils ]; then
- target=${2}/etc/modutils/zaptel
- elif [ -f ${2}/etc/modules.conf ]; then
- target=${2}/etc/modules.conf
- combined=1
- else
- echo No suitable location for module rules can be found... exiting.
- exit 1
- fi
-elif [ "${1}" = "linux26" ]; then
- toolver=`/sbin/modprobe --version 2>/dev/null| awk '{print $3}' | cut -d. -f2 | cut -d- -f1`
- if [ ${toolver} -ge 2 ]; then
- cmdopts=\$CMDLINE_OPTS
- fi
- if [ -d ${2}/etc/modprobe.d ]; then
- target=${2}/etc/modprobe.d/zaptel
- elif [ -d ${2}/etc/modules.d ]; then
- target=${2}/etc/modules.d/zaptel
- elif [ -f ${2}/etc/modprobe.conf ]; then
- target=${2}/etc/modprobe.conf
- combined=1
- elif [ -f ${2}/etc/conf.modules ]; then
- target=${2}/etc/conf.modules
- combined=1
- else
- echo No suitable location for module rules can be found... exiting.
- exit 1
- fi
+toolver=`/sbin/modprobe --version 2>/dev/null| awk '{print $3}' | cut -d. -f2 | cut -d- -f1`
+if [ ${toolver} -ge 2 ]; then
+ cmdopts=\$CMDLINE_OPTS
+fi
+if [ -d ${1}/etc/modprobe.d ]; then
+ target=${1}/etc/modprobe.d/dahdi
+elif [ -d ${1}/etc/modules.d ]; then
+ target=${1}/etc/modules.d/dahdi
+elif [ -f ${1}/etc/modprobe.conf ]; then
+ target=${1}/etc/modprobe.conf
+ combined=1
+elif [ -f ${1}/etc/conf.modules ]; then
+ target=${1}/etc/conf.modules
+ combined=1
else
- echo Unknown kernel build version requested... exiting.
+ echo No suitable location for module rules can be found... exiting.
exit 1
fi
@@ -79,19 +60,11 @@ fi
echo Building ${target}...
-if [ "${1}" = "linux24" ]; then
- for mod in ${3}; do
- if ! grep -q "post-install ${mod} " ${target}; then
- echo "post-install ${mod} /sbin/ztcfg" >> ${target}
- fi
- done
-elif [ "${1}" = "linux26" ]; then
- for mod in ${3}; do
- if ! grep -q "install ${mod} " ${target}; then
- echo "install ${mod} /sbin/modprobe --ignore-install ${mod} ${cmdopts} && /sbin/ztcfg" >> ${target}
- fi
- done
-fi
+for mod in ${2}; do
+ if ! grep -q "install ${mod} " ${target}; then
+ echo "install ${mod} /sbin/modprobe --ignore-install ${mod} ${cmdopts} && /sbin/ztcfg" >> ${target}
+ fi
+done
if [ -z "${combined}" ]; then
echo "***"
@@ -102,6 +75,6 @@ if [ -z "${combined}" ]; then
echo "*** In the future, do not edit ${target}, but"
echo "*** instead put your changes in another file"
echo "*** in the same directory so that they will not"
- echo "*** be overwritten by future Zaptel updates."
+ echo "*** be overwritten by future DAHDI updates."
echo "***"
fi
diff --git a/build_tools/make_tree b/build_tools/make_tree
deleted file mode 100755
index 3ec5a6d..0000000
--- a/build_tools/make_tree
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-echo "<?xml version=\"1.0\"?>"
-echo
-echo "<menu name=\"Zaptel Module Selection\">"
-cat zaptel.xml
-cat firmware/firmware.xml
-echo "</menu>"
diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in
deleted file mode 100644
index 1c26316..0000000
--- a/build_tools/menuselect-deps.in
+++ /dev/null
@@ -1 +0,0 @@
-LIBNEWT=@PBX_LIBNEWT@
diff --git a/build_tools/zaptel_svn_tarball b/build_tools/zaptel_svn_tarball
deleted file mode 100755
index 38a6ce8..0000000
--- a/build_tools/zaptel_svn_tarball
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-
-# upload_zaptel: upload a zaptel tarball to updates.xorcom.com
-#
-
-set -e
-
-BRANCH_NAME=1.4
-REV=HEAD
-ZAPTEL_BASE=http://svn.digium.com/svn/zaptel
-TARBALLS_DIR=$PWD
-
-me=`basename $0`
-
-say() {
- echo "$me: $@"
-}
-
-usage() {
- echo >&2 "$0: Generate snapshot from Zaptel SVN"
- echo >&2 ' ($Id$)'
- echo >&2 ""
- echo >&2 "$0 [-r REV] [-2] [-s]"
- echo >&2 "$0 <-h | --help>: This message"
- echo >&2 ""
- echo >&2 "Options:"
- echo >&2 " -2 --zap12: Use Asterisk 1.2. Implies -u."
- echo >&2 " -r --rev REV: extract xpp-zaptel from this revision ($REV)."
- echo >&2 " -s --show: Just show versions. Do nothing"
-
-}
-
-opt_showonly=no
-
-options=`getopt -o 2hr:s --long zap12,help,rev:,revision:,show -- "$@"`
-if [ $? != 0 ] ; then echo >&2 "Terminating..." ; exit 1 ; fi
-
-# Note the quotes around `$TEMP': they are essential!
-eval set -- "$options"
-
-while true ; do
- case "$1" in
- -2|--zap12) BRANCH_NAME=1.2;;
- -s|--show) opt_showonly=yes ;;
- -r|--rev|--revision) REV="$2"; shift ;;
- -h|--help) usage; exit 0;;
- --) shift ; break ;;
- esac
- shift;
-done
-
-BRANCH=branches/$BRANCH_NAME
-ZAPTEL_URL=$ZAPTEL_BASE/$BRANCH
-
-set -e
-
-# Get the name of the "previous version" for this release.
-# The idea is to look at the latest tag for that branhch. Tags are
-# global, and hence we filter tag names by branch name.
-#
-# Note: this strips any minor version number.
-# e.g: if last releast was 1.4.5.1, this will still return 1.4.5 . Here
-# we rely on the fact that the revision number will be added.
-zap_ver=`svn ls -r $REV $ZAPTEL_BASE/tags | grep "^$BRANCH_NAME" \
- | sed -e "s/\($BRANCH_NAME\.[0-9]\+\)[/.-].*/\1/" \
- | sort -nu -t . -k 3 | tail -n 1`
-
-real_rev=`svn info -r $REV $ZAPTEL_URL \
- | awk '/^Last Changed Rev: /{print $4}'`
-
-ver_full="$zap_ver.9.svn.$real_rev"
-tar_name="zaptel-$ver_full"
-tar_ball_full="$TARBALLS_DIR/$tar_name.tar.gz"
-
-say "Version: $ver_full (ver: $zap_ver, rev: $real_rev)"
-say "Tarball: $tar_ball_full"
-
-if [ "$opt_showonly" = 'yes' ]; then
- exit 0;
-fi
-
-ZAP_CHECKOUT_DIR=`mktemp -d zaptel_checkout_dir_XXXXXX`
-
-# Package a tarball from the subversion, using 'make dist':
-svn export -q -r $REV $ZAPTEL_URL $ZAP_CHECKOUT_DIR/$tar_name
-echo "$ver_full" >$ZAP_CHECKOUT_DIR/$tar_name/.version
-tar cz -C $ZAP_CHECKOUT_DIR -f $tar_ball_full $tar_name
-
-rm -rf $ZAP_CHECKOUT_DIR
-