Buld fixes for 2.6.17+ kernels
Also include other fixes so we build cleanly on all 2.6 targets.
This commit is contained in:
parent
cf6d7728e6
commit
41c5ea642f
1
CHANGES
1
CHANGES
|
@ -41,6 +41,7 @@
|
|||
* Intersil Corporation as part of PRISM(R) chipset product development.
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
- Makefile fixes for 2.6.17+
|
||||
- udev support for USB targets (Richard Kennedy)
|
||||
- semaphores are deprecated as of 2.6.16 (Chris Rankin)
|
||||
- prism2_usb build fix for 2.6.16
|
||||
|
|
|
@ -268,6 +268,14 @@ if [ $VERSION_CODE -gt `version 2 5 0` ] ; then
|
|||
KERN_25=y
|
||||
write_bool KERN_25
|
||||
fi
|
||||
if [ $VERSION_CODE -ge `version 2 6 5` ] ; then
|
||||
KERN_2_6_5=y
|
||||
fi
|
||||
write_bool KERN_2_6_5
|
||||
if [ $VERSION_CODE -ge `version 2 6 17` ] ; then
|
||||
KERN_2_6_17=y
|
||||
fi
|
||||
write_bool KERN_2_6_17
|
||||
|
||||
if [ "$SRC_RELEASE" != "$CUR_RELEASE" ] ; then
|
||||
$ECHO "WARNING: the current running kernel is actually version $CUR_RELEASE."
|
||||
|
|
|
@ -44,10 +44,7 @@
|
|||
|
||||
-include ../config.mk
|
||||
|
||||
DIRS=p80211 prism2 shared wlanctl nwepgen \
|
||||
mkmeta wlancfg
|
||||
ALL_DIRS=mkmeta p80211 prism2 shared wlanctl \
|
||||
nwepgen wlancfg
|
||||
DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2
|
||||
|
||||
ifneq ($(wildcard *.addon),)
|
||||
DIRS+=`cat *.addon`
|
||||
|
@ -55,7 +52,7 @@ ALL_DIRS+=`cat *.addon`
|
|||
endif
|
||||
|
||||
all:
|
||||
set -e; for d in $(ALL_DIRS); do $(MAKE) WLAN_SRC=$(WLAN_SRC) -C $$d ; done
|
||||
set -e; for d in $(DIRS); do $(MAKE) WLAN_SRC=$(WLAN_SRC) -C $$d ; done
|
||||
|
||||
clean:
|
||||
set -e; for d in $(DIRS); do $(MAKE) WLAN_SRC=$(WLAN_SRC) -C $$d clean ; done
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# src/p80211/Makefile
|
||||
# Makefile
|
||||
#
|
||||
# Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -42,52 +42,81 @@
|
|||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
ifneq ($(WLAN_SRC),)
|
||||
-include $(WLAN_SRC)/../config.mk
|
||||
|
||||
ifeq ($(WLAN_DEBUG), y)
|
||||
WLAN_INCLUDE_DEBUG=-DWLAN_INCLUDE_DEBUG
|
||||
else
|
||||
-include ../../config.mk
|
||||
endif
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
# Build options (just comment out the ones you don't want)
|
||||
WLAN_EXTRA_DEFINE := -DWLAN_TXMGMT_MINBRATE -DRSN_INTERNAL_ROAM -DWLAN_HOSTIF=WLAN_NONE
|
||||
ifeq ($(WLAN_DEBUG), y)
|
||||
WLAN_EXTRA_DEFINE += -DWLAN_INCLUDE_DEBUG
|
||||
endif
|
||||
|
||||
EXTRA_CFLAGS += -I$(WLAN_SRC)/include $(WLAN_INCLUDE_DEBUG) -DWLAN_HOSTIF=WLAN_NONE
|
||||
obj-m :=
|
||||
|
||||
ifeq ($(KERN_25), y)
|
||||
ifeq ($(KERN_25), y) # kbuild 2.5/2.6
|
||||
|
||||
p80211-objs := p80211mod.o p80211conv.o p80211req.o p80211wep.o p80211wext.o p80211netdev.o
|
||||
obj-m := p80211.o
|
||||
|
||||
else # kbuild-2.4
|
||||
p80211-objs := p80211mod.o \
|
||||
p80211conv.o \
|
||||
p80211req.o \
|
||||
p80211wep.o \
|
||||
p80211wext.o \
|
||||
p80211netdev.o
|
||||
|
||||
else # kbuild 2.4
|
||||
|
||||
O_TARGET := p80211.o
|
||||
obj-m := $(O_TARGET)
|
||||
obj-y := p80211mod.o p80211conv.o p80211req.o p80211wep.o p80211wext.o p80211netdev.o p80211mod.o
|
||||
obj-y := p80211mod.o \
|
||||
p80211conv.o \
|
||||
p80211req.o \
|
||||
p80211wep.o \
|
||||
p80211wext.o \
|
||||
p80211netdev.o
|
||||
|
||||
export-objs := p80211mod.o
|
||||
|
||||
include $(TOPDIR)/Rules.make
|
||||
|
||||
endif # kbuild switch
|
||||
|
||||
else # if KERNELRELEASE is not set..
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
EXTRA_CFLAGS += -I$(WLAN_SRC)/include $(WLAN_EXTRA_DEFINE)
|
||||
|
||||
ifneq ($(KERN_25), y)
|
||||
include $(TOPDIR)/Rules.make
|
||||
endif
|
||||
|
||||
else # KERNRELEASE is set
|
||||
|
||||
PWD := $(shell pwd)
|
||||
default:
|
||||
|
||||
ifeq ($(KERN_25), y)
|
||||
$(MAKE) -C $(LINUX_SRC) M='$(PWD)/.. $(PWD)' WLAN_SRC=$(WLAN_SRC) modules
|
||||
else
|
||||
ifeq ($(KERN_2_6_5), y)
|
||||
ifeq ($(KERN_2_6_17), y) # >= 2.6.17
|
||||
$(MAKE) -C $(LINUX_SRC) M='$(PWD)' WLAN_SRC=$(WLAN_SRC) modules
|
||||
else # 2.6.5 <-> 2.6.16
|
||||
$(MAKE) -C $(LINUX_SRC) M='$(WLAN_SRC) $(PWD)' WLAN_SRC=$(WLAN_SRC) modules
|
||||
endif
|
||||
else # < 2.6.5
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS='$(WLAN_SRC) $(PWD)' WLAN_SRC=$(WLAN_SRC) modules
|
||||
endif
|
||||
else # kbuild 2.4
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(WLAN_SRC) modules
|
||||
endif # KERN_25
|
||||
endif # kbuild switch
|
||||
|
||||
endif #KERNELRELEASE
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c *.flags .*.flags
|
||||
rm -Rf *.o *.ko .*.cmd *.mod.c *.flags .*.flags .tmp_versions Modules.symvers
|
||||
|
||||
install:
|
||||
mkdir -p $(TARGET_MODDIR)
|
||||
ifeq ($(KERN_25), y)
|
||||
cp *.ko $(TARGET_MODDIR)
|
||||
cp $(obj-m:.o=.ko) $(TARGET_MODDIR)
|
||||
else
|
||||
cp p80211.o $(TARGET_MODDIR)
|
||||
cp $(obj-m) $(TARGET_MODDIR)
|
||||
endif
|
||||
|
||||
endif # KERNRELEASE
|
||||
|
|
|
@ -83,9 +83,13 @@ else
|
|||
PWD := $(shell pwd)
|
||||
|
||||
default:
|
||||
ifeq ($(KERN_25), y)
|
||||
$(MAKE) -C $(LINUX_SRC) M='$(PWD)/../.. $(PWD)' WLAN_SRC=$(WLAN_SRC) \
|
||||
modules
|
||||
ifeq ($(KERN_2_6_5), y)
|
||||
ifeq ($(KERN_2_6_17), y)
|
||||
cp $(WLAN_SRC)/p80211/Modules.symvers .
|
||||
$(MAKE) -C $(LINUX_SRC) M='$(PWD)' WLAN_SRC=$(WLAN_SRC) modules
|
||||
else
|
||||
$(MAKE) -C $(LINUX_SRC) M='$(WLAN_SRC) $(WLAN_SRC)/p80211 $(PWD)' WLAN_SRC=$(WLAN_SRC) modules
|
||||
endif
|
||||
else # kbuild 2.4
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(PWD) WLAN_SRC=$(WLAN_SRC) \
|
||||
modules
|
||||
|
@ -95,7 +99,7 @@ endif # kbuild switch
|
|||
endif #KERNELRELEASE
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c *.flags .*.flags
|
||||
rm -Rf *.o *.ko .*.cmd *.mod.c *.flags .*.flags .tmp_versions Modules.symvers
|
||||
|
||||
install:
|
||||
ifeq ($(KERN_25), y)
|
||||
|
|
Loading…
Reference in New Issue