From 6c44b5e381bb9af963c16070f2e7db22a8bdf416 Mon Sep 17 00:00:00 2001 From: pizza Date: Tue, 12 Aug 2008 13:17:35 +0000 Subject: [PATCH] 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. --- Configure | 60 ++---------------------------------- config.in | 1 - scripts/Makefile.get_options | 3 -- 3 files changed, 3 insertions(+), 61 deletions(-) diff --git a/Configure b/Configure index fae633e..ee14a4e 100755 --- a/Configure +++ b/Configure @@ -277,9 +277,9 @@ if [ $VERSION_CODE -ge `version 2 6 17` ] ; then fi 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 "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 *******" fi @@ -343,17 +343,6 @@ $ECHO "" fi 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 @@ -365,51 +354,8 @@ if [ $PRISM2_PCMCIA = "y" ] ; then WLAN_KERN_PCMCIA=n fi 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 + #======================================================================= # Alternate target install root dir - the value of this variable # will prefix other variables, such as modules and pcmcia directories diff --git a/config.in b/config.in index 9d4a306..0f8d182 100644 --- a/config.in +++ b/config.in @@ -3,7 +3,6 @@ WLAN_PATCHLEVEL=2 WLAN_SUBLEVEL=9 WLAN_EXTRAVERSION= #LINUX_SRC=/usr/src/linux -PCMCIA_SRC= PREFIX= INST_EXEDIR=/sbin TARGET_ROOT_ON_HOST= diff --git a/scripts/Makefile.get_options b/scripts/Makefile.get_options index febbc35..d8a1524 100644 --- a/scripts/Makefile.get_options +++ b/scripts/Makefile.get_options @@ -5,9 +5,6 @@ include Makefile get_version_target: 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 "KERNEL_MODFLAGS='$(MODFLAGS)'" >> $(CURR_DIR)/make.opts echo "HOST_CC='$(HOSTCC)'" >> $(CURR_DIR)/make.opts echo "HOST_CFLAGS='$(HOSTCFLAGS)'" >> $(CURR_DIR)/make.opts -