source: trunk/package/carl9170/Makefile @ 19691

Last change on this file since 19691 was 19691, checked in by nbd, 6 years ago

carl9170: update to version 1.0.1.1 and fix a compile error

File size: 2.0 KB
Line 
1#
2# Copyright (C) 2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=carl9170
12PKG_VERSION:=1.0.1.1
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/chr/carl9170/$(PKG_VERSION) \
17        @KERNEL/linux/kernel/people/chr/carl9170/old/$(PKG_VERSION)
18PKG_MD5SUM:=8abbb4ae09a45a82af6f63cb65c7e2d8
19
20include $(INCLUDE_DIR)/package.mk
21
22DRV_PATH:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170
23
24define KernelPackage/carl9170
25  SUBMENU:=Wireless Drivers
26  TITLE:=Driver for Atheros AR9170 USB sticks
27  DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core
28  URL:=http://www.kernel.org/pub/linux/kernel/people/chr/carl9170
29  FILES:=$(DRV_PATH)/carl9170usb.$(LINUX_KMOD_SUFFIX)
30  AUTOLOAD:=$(call AutoLoad,60,carl9170usb)
31endef
32
33define KernelPackage/carl9170/description
34 This package contains a driver for Atheros AR9170 USB sticks using the free firmware
35endef
36
37define Build/Prepare
38        rm -rf $(PKG_BUILD_DIR)
39        mkdir -p $(PKG_BUILD_DIR)
40        $(HOST_TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_SOURCE)
41        $(HOST_TAR) -C $(PKG_BUILD_DIR) -xf $(PKG_BUILD_DIR)/$(PKG_VERSION)/driver/carl9170-driver-$(PKG_VERSION).tar
42        ln -sf Makefile.standalone $(DRV_PATH)/Makefile
43        ln -s $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)/drivers/net/wireless/ath/
44        $(Build/Patch)
45endef
46
47BUILDFLAGS = \
48        CONFIG_MAC80211_DEBUGFS=$(CONFIG_PACKAGE_MAC80211_DEBUGFS)
49
50EXTRA_CFLAGS = \
51        $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD)
52
53define Build/Compile
54        $(MAKE) -C $(LINUX_DIR) \
55                SUBDIRS="$(DRV_PATH)" \
56                ARCH="$(LINUX_KARCH)" \
57                CROSS_COMPILE="$(KERNEL_CROSS)" \
58                CC="$(TARGET_CC) -I$(STAGING_DIR)/usr/include/mac80211 $(EXTRA_CFLAGS)" \
59                $(BUILDFLAGS)
60endef
61
62define KernelPackage/carl9170/install
63        $(INSTALL_DIR) $(1)/lib/firmware
64        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_VERSION)/firmware_build/carl9170.fw $(1)/lib/firmware/
65endef
66
67$(eval $(call KernelPackage,carl9170))
Note: See TracBrowser for help on using the repository browser.