3 include $(TOPDIR
)/rules.mk
4 include $(INCLUDE_DIR
)/kernel.mk
9 PKG_MD5SUM
:=9b558d1df84cab2b0006c595feee0fba
11 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 HAL_TARGET
:=mips-be-elf
21 HAL_TARGET
:=mips-le-elf
27 HAL_TARGET
:=xscale-be-elf
31 ifneq ($(CONFIG_LINUX_2_4_AR531X
),)
34 ifneq ($(CONFIG_LINUX_2_6_ARUBA
),)
35 BUS
:= PCI AHB
# no suitable HAL for AHB yet.
39 ifeq ($(findstring AHB
,$(BUS
)),AHB
)
40 BUS_MODULES
+=$(PKG_BUILD_DIR
)/ath
/ath_ahb.
$(LINUX_KMOD_SUFFIX
)
42 ifeq ($(findstring PCI
,$(BUS
)),PCI
)
43 BUS_MODULES
+=$(PKG_BUILD_DIR
)/ath
/ath_pci.
$(LINUX_KMOD_SUFFIX
)
46 MADWIFI_MAKEOPTS
= -C
$(PKG_BUILD_DIR
) \
47 PATH
="$(TARGET_PATH)" \
48 ARCH
="$(LINUX_KARCH)" \
49 CROSS_COMPILE
="$(TARGET_CROSS)" \
50 TARGET
="$(HAL_TARGET)" \
51 TOOLPREFIX
="$(KERNEL_CROSS)" \
52 TOOLPATH
="$(KERNEL_CROSS)" \
53 KERNELPATH
="$(LINUX_DIR)" \
57 include $(INCLUDE_DIR
)/package.mk
59 ifeq ($(findstring AHB
,$(BUS
)),AHB
)
60 define Build
/Compile
/ahb
61 $(MAKE
) $(MADWIFI_MAKEOPTS
) BUS
="AHB" all
65 ifeq ($(findstring PCI
,$(BUS
)),PCI
)
66 define Build
/Compile
/pci
67 $(MAKE
) $(MADWIFI_MAKEOPTS
) BUS
="PCI" all
72 $(call Build
/Compile
/ahb
)
73 $(call Build
/Compile
/pci
)
76 define Build
/InstallDev
77 mkdir
-p
$(STAGING_DIR
)/usr
/include/madwifi
78 $(CP
) $(PKG_BUILD_DIR
)/include $(STAGING_DIR
)/usr
/include/madwifi
/
79 mkdir
-p
$(STAGING_DIR
)/usr
/include/madwifi
/net80211
80 $(CP
) $(PKG_BUILD_DIR
)/net80211
/*.h
$(STAGING_DIR
)/usr
/include/madwifi
/net80211
/
83 define Build
/UninstallDev
84 rm -rf
$(STAGING_DIR
)/usr
/include/madwifi
87 define Package
/kmod-madwifi
90 DEFAULT
:=y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE
, m if ALL
91 TITLE
:=Driver for Atheros wireless chipsets
92 DESCRIPTION
:=Driver for Atheros
802.11a
/b
/g chipsets
93 URL
:=http
://madwifi.org
/
94 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
97 define Package
/kmod-madwifi
/install
98 mkdir
-p
$(1)/etc
/modules.d
99 mkdir
-p
$(1)/etc
/init.d
100 mkdir
-p
$(1)/lib
/modules
/$(LINUX_VERSION
)
101 mkdir
-p
$(1)/usr
/sbin
102 install -m0644 .
/files
/madwifi.modules
$(1)/etc
/modules.d
/20-madwifi
103 ifeq ($(findstring AHB
,$(BUS
)),AHB
)
104 echo ath_ahb
>> $(1)/etc
/modules.d
/20-madwifi
106 ifeq ($(findstring PCI
,$(BUS
)),PCI
)
107 echo ath_pci
>> $(1)/etc
/modules.d
/20-madwifi
109 install -m0755 .
/files
/madwifi.init
$(1)/etc
/init.d
/S20madwifi
111 $(PKG_BUILD_DIR
)/ath_hal
/ath_hal.
$(LINUX_KMOD_SUFFIX
) \
113 $(PKG_BUILD_DIR
)/ath_rate
/sample
/ath_rate_sample.
$(LINUX_KMOD_SUFFIX
) \
114 $(PKG_BUILD_DIR
)/net80211
/*.
$(LINUX_KMOD_SUFFIX
) \
115 $(1)/lib
/modules
/$(LINUX_VERSION
)/
116 $(CP
) $(PKG_BUILD_DIR
)/tools
/{madwifi_multi
,80211debug
,80211stats
,athchans
,athctrl
,athdebug
,athkey
,athstats
,wlanconfig
} $(1)/usr
/sbin
/
119 $(eval
$(call BuildPackage
,kmod-madwifi
))