5c3e86f3201b2f2adf71184bd26100f728b1a3db
[openwrt/openwrt.git] / package / kernel / mwlwifi / Makefile
1 #
2 # Copyright (C) 2014-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mwlwifi
11 PKG_RELEASE=1
12
13 PKG_LICENSE:=ISC
14 PKG_LICENSE_FILES:=
15
16 PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_DATE:=2018-01-18
19 PKG_SOURCE_VERSION:=a149180fecec4fbaafb3f52ae46e33bd66501441
20 PKG_MIRROR_HASH:=e5a791182208eea4602692e5453dc67bfe87f080b6f03b1c6d1657b546f93b31
21
22 PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/kernel.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define KernelPackage/mwlwifi
29 SUBMENU:=Wireless Drivers
30 TITLE:=Marvell 88W8864 wireless driver
31 DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT @PCI_SUPPORT @TARGET_mvebu
32 FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
33 AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
34 endef
35
36 NOSTDINC_FLAGS = \
37 -I$(PKG_BUILD_DIR) \
38 -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
39 -I$(STAGING_DIR)/usr/include/mac80211-backport \
40 -I$(STAGING_DIR)/usr/include/mac80211/uapi \
41 -I$(STAGING_DIR)/usr/include/mac80211 \
42 -include backport/backport.h
43
44 define Build/Compile
45 +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
46 $(KERNEL_MAKE_FLAGS) \
47 SUBDIRS="$(PKG_BUILD_DIR)" \
48 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
49 modules
50 endef
51
52 define KernelPackage/mwlwifi/install
53 $(INSTALL_DIR) $(1)/lib/firmware
54 $(INSTALL_DIR) $(1)/lib/firmware/mwlwifi
55 $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8864.bin $(1)/lib/firmware/mwlwifi/
56 $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8897.bin $(1)/lib/firmware/mwlwifi/
57 $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8964.bin $(1)/lib/firmware/mwlwifi/
58 $(CP) $(PKG_BUILD_DIR)/bin/firmware/Marvell_license.txt $(1)/lib/firmware/mwlwifi/
59 endef
60
61 $(eval $(call KernelPackage,mwlwifi))