3 include $(TOPDIR
)/rules.mk
4 include $(TOPDIR
)/package
/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)" \
56 include $(TOPDIR
)/package
/rules.mk
58 ifeq ($(findstring AHB
,$(BUS
)),AHB
)
59 define Build
/Compile
/ahb
60 $(MAKE
) $(MADWIFI_MAKEOPTS
) BUS
="AHB" all
64 ifeq ($(findstring PCI
,$(BUS
)),PCI
)
65 define Build
/Compile
/pci
66 $(MAKE
) $(MADWIFI_MAKEOPTS
) BUS
="PCI" all
71 $(call Build
/Compile
/ahb
)
72 $(call Build
/Compile
/pci
)
75 define Build
/InstallDev
76 mkdir
-p
$(STAGING_DIR
)/usr
/include/madwifi
77 $(CP
) $(PKG_BUILD_DIR
)/include $(STAGING_DIR
)/usr
/include/madwifi
/
78 mkdir
-p
$(STAGING_DIR
)/usr
/include/madwifi
/net80211
79 $(CP
) $(PKG_BUILD_DIR
)/net80211
/*.h
$(STAGING_DIR
)/usr
/include/madwifi
/net80211
/
82 define Build
/UninstallDev
83 rm -rf
$(STAGING_DIR
)/usr
/include/madwifi
86 define Package
/kmod-madwifi
89 DEFAULT
:=y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE
, m if ALL
90 TITLE
:=Driver for Atheros wireless chipsets
91 DESCRIPTION
:=Driver for Atheros
802.11a
/b
/g chipsets
92 URL
:=http
://madwifi.org
/
93 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
96 define Package
/kmod-madwifi
/install
97 mkdir
-p
$(1)/etc
/modules.d
98 mkdir
-p
$(1)/etc
/init.d
99 mkdir
-p
$(1)/lib
/modules
/$(LINUX_VERSION
)
100 mkdir
-p
$(1)/usr
/sbin
101 install -m0644 .
/files
/madwifi.modules
$(1)/etc
/modules.d
/20-madwifi
102 ifeq ($(findstring AHB
,$(BUS
)),AHB
)
103 echo ath_ahb
>> $(1)/etc
/modules.d
/20-madwifi
105 ifeq ($(findstring PCI
,$(BUS
)),PCI
)
106 echo ath_pci
>> $(1)/etc
/modules.d
/20-madwifi
108 install -m0755 .
/files
/madwifi.init
$(1)/etc
/init.d
/S20madwifi
110 $(PKG_BUILD_DIR
)/ath_hal
/ath_hal.
$(LINUX_KMOD_SUFFIX
) \
112 $(PKG_BUILD_DIR
)/ath_rate
/sample
/ath_rate_sample.
$(LINUX_KMOD_SUFFIX
) \
113 $(PKG_BUILD_DIR
)/net80211
/*.
$(LINUX_KMOD_SUFFIX
) \
114 $(1)/lib
/modules
/$(LINUX_VERSION
)/
115 $(CP
) $(PKG_BUILD_DIR
)/tools
/{madwifi_multi
,80211debug
,80211stats
,athchans
,athctrl
,athdebug
,athkey
,athstats
,wlanconfig
} $(1)/usr
/sbin
/
118 $(eval
$(call BuildPackage
,kmod-madwifi
))