Updates for handling pcmcia/pci/plx builds. We no longer require the
presence of pcmcia-cs source when building for pci/plx. Additionally, if pcmcia isn't selected in Configure, the pcmcia source won't be looked for or prompted for.
This commit is contained in:
parent
76e92bfeff
commit
696d51043c
192
Configure
192
Configure
|
@ -91,11 +91,6 @@ if [ $# -gt 0 ] ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
arg () {
|
|
||||||
VALUE="`$ECHO X"$2" | sed -e 's/^X--[a-zA-Z_]*=//'`"
|
|
||||||
eval $1=\"$VALUE\"
|
|
||||||
}
|
|
||||||
|
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
||||||
CONFIG=config.new
|
CONFIG=config.new
|
||||||
|
@ -225,10 +220,10 @@ printf '\n' >> $versionh
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
||||||
# Dump the version variables
|
# Dump the version variables
|
||||||
dump_str "WLAN_VERSION=$WLAN_VERSION"
|
write_str WLAN_VERSION
|
||||||
dump_str "WLAN_PATCHLEVEL=$WLAN_PATCHLEVEL"
|
write_str WLAN_PATCHLEVEL
|
||||||
dump_str "WLAN_SUBLEVEL=$WLAN_SUBLEVEL"
|
write_str WLAN_SUBLEVEL
|
||||||
dump_str "WLAN_EXTRAVERSION=$WLAN_EXTRAVERSION"
|
write_str WLAN_EXTRAVERSION
|
||||||
|
|
||||||
# If the src/include/wlan/version.h file needs a touchup, fix or create it
|
# If the src/include/wlan/version.h file needs a touchup, fix or create it
|
||||||
if [ -r src/include/wlan/version.h ]; then
|
if [ -r src/include/wlan/version.h ]; then
|
||||||
|
@ -249,47 +244,67 @@ $ECHO ""
|
||||||
$ECHO "The default responses are correct for most users."
|
$ECHO "The default responses are correct for most users."
|
||||||
$ECHO ""
|
$ECHO ""
|
||||||
|
|
||||||
|
#=======================================================================
|
||||||
|
# Should we build for PCMCIA Card Services?
|
||||||
|
|
||||||
|
ask_bool "Build Prism2.x PCMCIA Card Services (_cs) driver?" PRISM2_PCMCIA
|
||||||
|
|
||||||
|
$ECHO ""
|
||||||
|
#=======================================================================
|
||||||
|
# Should we build for PLX??? based PCI adapters?
|
||||||
|
|
||||||
|
ask_bool "Build Prism2 PLX???? based PCI (_plx) adapter driver?" PRISM2_PLX
|
||||||
|
|
||||||
|
$ECHO ""
|
||||||
|
#=======================================================================
|
||||||
|
# Should we build for Prism2 native PCI?
|
||||||
|
|
||||||
|
ask_bool "Build Prism2.5 native PCI (_pci) driver?" PRISM2_PCI
|
||||||
|
|
||||||
|
$ECHO ""
|
||||||
|
|
||||||
|
#=======================================================================
|
||||||
# Collect the kernel source tree and test for sanity
|
# Collect the kernel source tree and test for sanity
|
||||||
|
|
||||||
ask_str "Linux source directory" LINUX_SRC
|
ask_str "Linux source directory" LINUX_SRC
|
||||||
|
|
||||||
if [ ! -f $LINUX_SRC/Makefile ] ; then
|
if [ ! -f $LINUX_SRC/Makefile ] ; then
|
||||||
$ECHO "Linux source tree $LINUX_SRC is incomplete or missing!"
|
$ECHO "Linux source tree $LINUX_SRC is incomplete or missing!"
|
||||||
if [ -d $LINUX_SRC/include/linux ] ; then
|
if [ -d $LINUX_SRC/include/linux ] ; then
|
||||||
$ECHO " The kernel header files are present, but not " \
|
$ECHO " The kernel header files are present, but not " \
|
||||||
"the full source code."
|
"the full source code."
|
||||||
fi
|
fi
|
||||||
$ECHO " See the HOWTO for a list of FTP sites for current" \
|
$ECHO " See the HOWTO for a list of FTP sites for current" \
|
||||||
"kernel sources."
|
"kernel sources."
|
||||||
fail
|
fail
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# What kernel are we compiling for?
|
# What kernel are we compiling for?
|
||||||
|
|
||||||
version () {
|
version () {
|
||||||
expr $1 \* 65536 + $2 \* 256 + $3
|
expr $1 \* 65536 + $2 \* 256 + $3
|
||||||
}
|
}
|
||||||
|
|
||||||
$ECHO ""
|
$ECHO ""
|
||||||
for TAG in VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION ; do
|
for TAG in VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION ; do
|
||||||
eval `sed -ne "/^$TAG/s/[ ]//gp" $LINUX_SRC/Makefile`
|
eval `sed -ne "/^$TAG/s/[ ]//gp" $LINUX_SRC/Makefile`
|
||||||
done
|
done
|
||||||
SRC_RELEASE=$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION
|
SRC_RELEASE=$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION
|
||||||
VERSION_CODE=`version $VERSION $PATCHLEVEL $SUBLEVEL`
|
VERSION_CODE=`version $VERSION $PATCHLEVEL $SUBLEVEL`
|
||||||
$ECHO "The kernel source tree is version $SRC_RELEASE."
|
$ECHO "The kernel source tree is version $SRC_RELEASE."
|
||||||
if [ $VERSION_CODE -lt `version 2 0 0` ] ; then
|
if [ $VERSION_CODE -lt `version 2 2 0` ] ; then
|
||||||
$ECHO "This package requires at least a 2.0 series kernel."
|
$ECHO "This package requires at least a 2.2.x series kernel."
|
||||||
fail
|
fail
|
||||||
fi
|
fi
|
||||||
CUR_RELEASE=`uname -r`
|
CUR_RELEASE=`uname -r`
|
||||||
if [ "$SRC_RELEASE" != "$CUR_RELEASE" ] ; then
|
if [ "$SRC_RELEASE" != "$CUR_RELEASE" ] ; then
|
||||||
$ECHO "WARNING: the current kernel is actually version $CUR_RELEASE."
|
$ECHO "WARNING: the current kernel is actually version $CUR_RELEASE."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! "$WLAN_TARGET_ARCH" ] ; then
|
if [ ! "$WLAN_TARGET_ARCH" ] ; then
|
||||||
BUILD_ARCH=`uname -m | sed -e 's/i.86/i386/'`
|
BUILD_ARCH=`uname -m | sed -e 's/i.86/i386/'`
|
||||||
else
|
else
|
||||||
BUILD_ARCH=$WLAN_TARGET_ARCH
|
BUILD_ARCH=$WLAN_TARGET_ARCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for consistent kernel build dates
|
# Check for consistent kernel build dates
|
||||||
|
@ -299,29 +314,57 @@ CUR_D=`$ECHO $CUR_D | sed -e 's/\(:[0-9][0-9]\) .* \([12][90]\)/\1 \2/'`
|
||||||
$ECHO "The current kernel build date is $CUR_D."
|
$ECHO "The current kernel build date is $CUR_D."
|
||||||
UTS_VERSION="unknown";
|
UTS_VERSION="unknown";
|
||||||
if [ -f $LINUX_SRC/include/linux/compile.h ] ; then
|
if [ -f $LINUX_SRC/include/linux/compile.h ] ; then
|
||||||
UTS_VERSION=`grep UTS_VERSION $LINUX_SRC/include/linux/compile.h |
|
UTS_VERSION=`grep UTS_VERSION $LINUX_SRC/include/linux/compile.h |
|
||||||
sed -e 's/.*"\(.*\)"/\1/'`
|
sed -e 's/.*"\(.*\)"/\1/'`
|
||||||
SRC_D=`$ECHO $UTS_VERSION | sed -e 's/^#[0-9]* //;s/SMP //'`
|
SRC_D=`$ECHO $UTS_VERSION | sed -e 's/^#[0-9]* //;s/SMP //'`
|
||||||
SRC_D=`$ECHO $SRC_D | sed -e 's/\(:[0-9][0-9]\) .* \([12][90]\)/\1 \2/'`
|
SRC_D=`$ECHO $SRC_D | sed -e 's/\(:[0-9][0-9]\) .* \([12][90]\)/\1 \2/'`
|
||||||
if [ $SRC_RELEASE = $CUR_RELEASE -a "$SRC_D" != "$CUR_D" ] ; then
|
if [ $SRC_RELEASE = $CUR_RELEASE -a "$SRC_D" != "$CUR_D" ] ; then
|
||||||
$ECHO "WARNING: the source tree has a build date of $SRC_D."
|
$ECHO "WARNING: the source tree has a build date of $SRC_D."
|
||||||
if [ `date -d "$SRC_D" +%s` -gt `date -d "$CUR_D" +%s` ] ; then
|
if [ `date -d "$SRC_D" +%s` -gt `date -d "$CUR_D" +%s` ] ; then
|
||||||
$ECHO " Did you forget to install your new kernel?!?"
|
$ECHO " Did you forget to install your new kernel?!?"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
$ECHO ""
|
$ECHO ""
|
||||||
|
|
||||||
# PCMCIA Source dir
|
#=======================================================================
|
||||||
if [ ! "$PCMCIA_SRC" ] ; then
|
# If compiling for pcmcia-cs, find the PCMCIA source tree
|
||||||
if [ -f /sbin/cardctl ] ; then
|
|
||||||
PCMCIA_SRC=`/sbin/cardctl -V 2>&1 | sed -e 's/cardctl version //'`
|
|
||||||
PCMCIA_SRC=/usr/src/pcmcia-cs-$PCMCIA_SRC
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
ask_str "pcmcia-cs source dir" PCMCIA_SRC
|
|
||||||
|
|
||||||
$ECHO ""
|
if [ $PRISM2_PCMCIA = "y" ] ; then
|
||||||
|
if [ ! "$PCMCIA_SRC" ] ; then
|
||||||
|
if [ -f /sbin/cardctl ] ; then
|
||||||
|
PCMCIA_SRC=`/sbin/cardctl -V 2>&1 | sed -e 's/cardctl version //'`
|
||||||
|
PCMCIA_SRC=/usr/src/pcmcia-cs-$PCMCIA_SRC
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
ask_str "pcmcia-cs source dir" PCMCIA_SRC
|
||||||
|
|
||||||
|
if [ ! -f $PCMCIA_SRC/Makefile ] ; then
|
||||||
|
$ECHO "pcmcia-cs source tree $PCMCIA_SRC is incomplete or missing!"
|
||||||
|
$ECHO "The wlan driver for pcmcia cannot be built without "
|
||||||
|
#ECHO "the pcmcia-cs source tree present and configured."
|
||||||
|
fail
|
||||||
|
fi
|
||||||
|
if [ ! -f $PCMCIA_SRC/include/pcmcia/config.h ] ; then
|
||||||
|
$ECHO "The pcmcia-cs source tree does not appear to be configured."
|
||||||
|
$ECHO "The wlan driver for pcmcia cannot be built without "\
|
||||||
|
$ECHO "the pcmcia-cs source tree present and configured."
|
||||||
|
fail
|
||||||
|
fi
|
||||||
|
$ECHO ""
|
||||||
|
|
||||||
|
# Should we build for Kernel based PCMCIA?
|
||||||
|
|
||||||
|
ask_bool "Build for Kernel PCMCIA?" WLAN_KERN_PCMCIA
|
||||||
|
$ECHO ""
|
||||||
|
|
||||||
|
# PCMCIA script dir
|
||||||
|
ask_str "PCMCIA script directory" PCMCIA_DIR
|
||||||
|
TARGET_PCMCIA_DIR=$TARGET_ROOT_ON_HOST$PCMCIA_DIR
|
||||||
|
write_str TARGET_PCMCIA_DIR
|
||||||
|
$ECHO ""
|
||||||
|
fi
|
||||||
|
#=======================================================================
|
||||||
# Alternate target install root dir - the value of this variable
|
# Alternate target install root dir - the value of this variable
|
||||||
# will prefix other variables, such as modules and pcmcia directories
|
# will prefix other variables, such as modules and pcmcia directories
|
||||||
ask_str "Alternate target install root directory on host" TARGET_ROOT_ON_HOST
|
ask_str "Alternate target install root directory on host" TARGET_ROOT_ON_HOST
|
||||||
|
@ -345,11 +388,6 @@ TARGET_MODDIR=$TARGET_ROOT_ON_HOST$MODDIR
|
||||||
write_str TARGET_MODDIR
|
write_str TARGET_MODDIR
|
||||||
$ECHO ""
|
$ECHO ""
|
||||||
|
|
||||||
# PCMCIA script dir
|
|
||||||
ask_str "PCMCIA script directory" PCMCIA_DIR
|
|
||||||
TARGET_PCMCIA_DIR=$TARGET_ROOT_ON_HOST$PCMCIA_DIR
|
|
||||||
write_str TARGET_PCMCIA_DIR
|
|
||||||
$ECHO ""
|
|
||||||
|
|
||||||
# Just write some out (we're not prompting right now)
|
# Just write some out (we're not prompting right now)
|
||||||
write_str INST_EXEDIR
|
write_str INST_EXEDIR
|
||||||
|
@ -362,50 +400,41 @@ write_str TARGET_INST_EXEDIR
|
||||||
|
|
||||||
SYSV_INIT=n
|
SYSV_INIT=n
|
||||||
if [ "$PREFIX" = "" ] ; then
|
if [ "$PREFIX" = "" ] ; then
|
||||||
if [ -d /etc/rc.d/init.d -o -d /etc/init.d -o -d /sbin/init.d ] ; then
|
if [ -d /etc/rc.d/init.d -o -d /etc/init.d -o -d /sbin/init.d ] ; then
|
||||||
$ECHO "It looks like you have a System V init file setup."
|
$ECHO "It looks like you have a System V init file setup."
|
||||||
SYSV_INIT=n
|
SYSV_INIT=y
|
||||||
if [ -d /etc/rc.d/init.d ] ; then
|
if [ -d /etc/rc.d/init.d ] ; then
|
||||||
$ECHO "RC_DIR=/etc/rc.d" >> $CONFIG
|
$ECHO "RC_DIR=/etc/rc.d" >> $CONFIG
|
||||||
$ECHO "RC_DIR=/etc/rc.d" >> $CONFIG_MK
|
$ECHO "RC_DIR=/etc/rc.d" >> $CONFIG_MK
|
||||||
elif [ -d /sbin/init.d ] ; then
|
elif [ -d /sbin/init.d ] ; then
|
||||||
$ECHO "RC_DIR=/sbin" >> $CONFIG
|
$ECHO "RC_DIR=/sbin" >> $CONFIG
|
||||||
$ECHO "RC_DIR=/sbin" >> $CONFIG_MK
|
$ECHO "RC_DIR=/sbin" >> $CONFIG_MK
|
||||||
else
|
else
|
||||||
$ECHO "RC_DIR=/etc" >> $CONFIG
|
$ECHO "RC_DIR=/etc" >> $CONFIG
|
||||||
$ECHO "RC_DIR=/etc" >> $CONFIG_MK
|
$ECHO "RC_DIR=/etc" >> $CONFIG_MK
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
$ECHO "It looks like you have a BSD-ish init file setup."
|
$ECHO "It looks like you have a BSD-ish init file setup."
|
||||||
if ! grep rc.wlan /etc/rc.d/rc.S >/dev/null ; then
|
if ! grep rc.wlan /etc/rc.d/rc.S >/dev/null ; then
|
||||||
$ECHO " You'll need to edit /etc/rc.d/rc.S to invoke" \
|
$ECHO " You'll need to edit /etc/rc.d/rc.S to invoke" \
|
||||||
"/etc/rc.d/rc.wlan (for ISA/PCMCIA cards)"
|
"/etc/rc.d/rc.wlan (for ISA/PCMCIA cards)"
|
||||||
$ECHO " so that wlan cards will be started at boot time."
|
$ECHO " so that wlan cards will be started at boot time."
|
||||||
fi
|
fi
|
||||||
SYSV_INIT=n
|
SYSV_INIT=n
|
||||||
fi
|
fi
|
||||||
write_bool SYSV_INIT
|
write_bool SYSV_INIT
|
||||||
else
|
else
|
||||||
ask_bool "System V init script layout" SYSV_INIT
|
ask_bool "System V init script layout" SYSV_INIT
|
||||||
if [ "$SYSV_INIT" = "y" ] ; then
|
if [ "$SYSV_INIT" = "y" ] ; then
|
||||||
ask_str "Top-level directory for RC scripts" RC_DIR
|
ask_str "Top-level directory for RC scripts" RC_DIR
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -x $TARGET_ROOT_ON_HOST/sbin/depmod ] ; then INSTALL_DEPMOD=n ; fi
|
if [ ! -x $TARGET_ROOT_ON_HOST/sbin/depmod ] ; then INSTALL_DEPMOD=n ; fi
|
||||||
write_bool INSTALL_DEPMOD
|
write_bool INSTALL_DEPMOD
|
||||||
|
|
||||||
$ECHO ""
|
$ECHO ""
|
||||||
|
|
||||||
#=======================================================================
|
|
||||||
# Make sure our target architecture is the same as our build architecture.
|
|
||||||
#
|
|
||||||
#if [ ! WLAN_INSTALL_TYPE ] ; then
|
|
||||||
# WLAN_INSTALL_TYPE=sta
|
|
||||||
#fi
|
|
||||||
#ask_str "Install drivers as station (sta) or access point (ap)?" WLAN_INSTALL_TYPE
|
|
||||||
#
|
|
||||||
#$ECHO ""
|
|
||||||
|
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
# Make sure our target architecture is correct
|
# Make sure our target architecture is correct
|
||||||
|
|
||||||
|
@ -464,31 +493,6 @@ dump_str 'CROSS_MAKE=make'
|
||||||
ask_bool "Build for debugging (see doc/config.debug)" WLAN_DEBUG
|
ask_bool "Build for debugging (see doc/config.debug)" WLAN_DEBUG
|
||||||
|
|
||||||
$ECHO ""
|
$ECHO ""
|
||||||
#=======================================================================
|
|
||||||
# Should we build for Kernel based PCMCIA
|
|
||||||
|
|
||||||
ask_bool "Build for Kernel PCMCIA?" WLAN_KERN_PCMCIA
|
|
||||||
|
|
||||||
$ECHO ""
|
|
||||||
#=======================================================================
|
|
||||||
# Should we build for PLX??? based PCI adapters?
|
|
||||||
|
|
||||||
ask_bool "Build Prism2 PLX???? based PCI (_plx) adapter drivers?" PRISM2_PLX
|
|
||||||
|
|
||||||
$ECHO ""
|
|
||||||
#=======================================================================
|
|
||||||
# Should we build for PCMCIA Card Services?
|
|
||||||
|
|
||||||
ask_bool "Build Prism2 PCMCIA Card Services (_cs) drivers?" PRISM2_PCMCIA
|
|
||||||
|
|
||||||
$ECHO ""
|
|
||||||
#=======================================================================
|
|
||||||
# Should we build for Prism2 native PCI?
|
|
||||||
|
|
||||||
ask_bool "Build Prism2 PCI (_pci) drivers?" PRISM2_PCI
|
|
||||||
|
|
||||||
$ECHO ""
|
|
||||||
#=======================================================================
|
|
||||||
|
|
||||||
mv $CONFIG config.out
|
mv $CONFIG config.out
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue