Clean up some of the old cruft in the build system.
We basically need a reliable way of getting the kernel version string and cross compiler (host cflags is useful too) so if someone has a better idea how to accomplish this, I'm all ears.
This commit is contained in:
parent
1145037797
commit
6c44b5e381
60
Configure
60
Configure
|
@ -277,9 +277,9 @@ if [ $VERSION_CODE -ge `version 2 6 17` ] ; then
|
||||||
fi
|
fi
|
||||||
write_bool KERN_2_6_17
|
write_bool KERN_2_6_17
|
||||||
|
|
||||||
if [ $VERSION_CODE -gt `version 2 6 24` ] ; then
|
if [ $VERSION_CODE -gt `version 2 6 26` ] ; then
|
||||||
$ECHO "******* WARNING WARNING WARNING *******"
|
$ECHO "******* WARNING WARNING WARNING *******"
|
||||||
$ECHO "Kernels newer than 2.6.24.x are not supported."
|
$ECHO "Kernels newer than 2.6.26.x are not supported."
|
||||||
$ECHO "******* WARNING WARNING WARNING *******"
|
$ECHO "******* WARNING WARNING WARNING *******"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -343,17 +343,6 @@ $ECHO ""
|
||||||
fi
|
fi
|
||||||
write_bool CONFIG_HOTPLUG
|
write_bool CONFIG_HOTPLUG
|
||||||
|
|
||||||
# test to see if __KERNEL__ is defined in KERNEL_CFLAGS
|
|
||||||
# if not, $KERNEL_CFLAGS += __KERNEL__
|
|
||||||
|
|
||||||
grep __KERNEL__ < scripts/make.opts > /dev/null
|
|
||||||
if [ $? = 1 ] ; then
|
|
||||||
KERNEL_CFLAGS="-D__KERNEL__ -I$LINUX_SRC/include $KERNEL_CFLAGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dump_str "KERNEL_CFLAGS=$KERNEL_CFLAGS"
|
|
||||||
dump_str "KERNEL_MODFLAGS=$KERNEL_MODFLAGS"
|
|
||||||
|
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
# If compiling for pcmcia-cs, find the PCMCIA source tree
|
# If compiling for pcmcia-cs, find the PCMCIA source tree
|
||||||
|
|
||||||
|
@ -365,51 +354,8 @@ if [ $PRISM2_PCMCIA = "y" ] ; then
|
||||||
WLAN_KERN_PCMCIA=n
|
WLAN_KERN_PCMCIA=n
|
||||||
fi
|
fi
|
||||||
write_bool WLAN_KERN_PCMCIA
|
write_bool WLAN_KERN_PCMCIA
|
||||||
|
|
||||||
# We only need the pcmcia source directory if we're NOT building for
|
|
||||||
# kernel PCMCIA.
|
|
||||||
|
|
||||||
if [ $WLAN_KERN_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 ""
|
|
||||||
|
|
||||||
# Now we need to generate the module options flags.
|
|
||||||
# It's only relevant if modversions is turned on.
|
|
||||||
grep CONFIG_MODVERSIONS=y < $PCMCIA_SRC/config.mk > /dev/null
|
|
||||||
if [ $? = 0 ] ; then
|
|
||||||
PCMCIA_MODFLAGS="-DMODULE -DMODVERSIONS -include $PCMCIA_SRC/include/linux/modversions.h"
|
|
||||||
else
|
|
||||||
PCMCIA_MODFLAGS="-DMODULE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# new versions of pcmcia-cs don't generate their own modversion.h
|
|
||||||
# if they don't have it, use the kernel module flags instead.
|
|
||||||
if [ ! -f $PCMCIA_SRC/include/linux/modversions.h ] ; then
|
|
||||||
PCMCIA_MODFLAGS="$KERNEL_MODFLAGS"
|
|
||||||
fi
|
|
||||||
dump_str "PCMCIA_MODFLAGS=$PCMCIA_MODFLAGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
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
|
||||||
|
|
|
@ -3,7 +3,6 @@ WLAN_PATCHLEVEL=2
|
||||||
WLAN_SUBLEVEL=9
|
WLAN_SUBLEVEL=9
|
||||||
WLAN_EXTRAVERSION=
|
WLAN_EXTRAVERSION=
|
||||||
#LINUX_SRC=/usr/src/linux
|
#LINUX_SRC=/usr/src/linux
|
||||||
PCMCIA_SRC=
|
|
||||||
PREFIX=
|
PREFIX=
|
||||||
INST_EXEDIR=/sbin
|
INST_EXEDIR=/sbin
|
||||||
TARGET_ROOT_ON_HOST=
|
TARGET_ROOT_ON_HOST=
|
||||||
|
|
|
@ -5,9 +5,6 @@ include Makefile
|
||||||
|
|
||||||
get_version_target:
|
get_version_target:
|
||||||
echo "KERNEL_RELEASE=$(KERNEL_VERSION)" >> $(CURR_DIR)/make.opts
|
echo "KERNEL_RELEASE=$(KERNEL_VERSION)" >> $(CURR_DIR)/make.opts
|
||||||
echo "KERNEL_CFLAGS='$(CFLAGS)'" >> $(CURR_DIR)/make.opts
|
|
||||||
echo "CROSS_COMPILE='$(CROSS_COMPILE)'" >> $(CURR_DIR)/make.opts
|
echo "CROSS_COMPILE='$(CROSS_COMPILE)'" >> $(CURR_DIR)/make.opts
|
||||||
echo "KERNEL_MODFLAGS='$(MODFLAGS)'" >> $(CURR_DIR)/make.opts
|
|
||||||
echo "HOST_CC='$(HOSTCC)'" >> $(CURR_DIR)/make.opts
|
echo "HOST_CC='$(HOSTCC)'" >> $(CURR_DIR)/make.opts
|
||||||
echo "HOST_CFLAGS='$(HOSTCFLAGS)'" >> $(CURR_DIR)/make.opts
|
echo "HOST_CFLAGS='$(HOSTCFLAGS)'" >> $(CURR_DIR)/make.opts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue