mwlwifi: driver version to 10.3.8.0-20180920
[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-09-20
19 PKG_SOURCE_VERSION:=4a98c2bec174982676546e599d6f904b65a7179f
20 PKG_MIRROR_HASH:=18c524662f8f00b88b4b4483d29461c293c16c1e54b129927e24e2a23598007c
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/88W8897/88W8964/88W8997 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 Package/mwlwifi-firmware-default
53 SECTION:=firmware
54 CATEGORY:=Firmware
55 TITLE:=Marvell $(1) firmware
56 DEPENDS:=+kmod-mwlwifi @TARGET_mvebu
57 endef
58
59 define Package/mwlwifi-firmware/install
60 $(INSTALL_DIR) $(1)/lib/firmware
61 $(INSTALL_DIR) $(1)/lib/firmware/mwlwifi
62 $(CP) $(PKG_BUILD_DIR)/bin/firmware/$(2) $(1)/lib/firmware/mwlwifi/
63 $(CP) $(PKG_BUILD_DIR)/bin/firmware/Marvell_license.txt $(1)/lib/firmware/mwlwifi/$(2).Marvell_license.txt
64 endef
65
66 define Package/mwlwifi-firmware-88w8864
67 $(call Package/mwlwifi-firmware-default,88W8864)
68 endef
69
70 define Package/mwlwifi-firmware-88w8864/install
71 $(call Package/mwlwifi-firmware/install,$(1),88W8864.bin)
72 endef
73
74 define Package/mwlwifi-firmware-88w8897
75 $(call Package/mwlwifi-firmware-default,88W8897)
76 endef
77
78 define Package/mwlwifi-firmware-88w8897/install
79 $(call Package/mwlwifi-firmware/install,$(1),88W8897.bin)
80 endef
81
82 define Package/mwlwifi-firmware-88w8964
83 $(call Package/mwlwifi-firmware-default,88W8964)
84 endef
85
86 define Package/mwlwifi-firmware-88w8964/install
87 $(call Package/mwlwifi-firmware/install,$(1),88W8964.bin)
88 endef
89
90 define Package/mwlwifi-firmware-88w8997
91 $(call Package/mwlwifi-firmware-default,88W8997)
92 endef
93
94 define Package/mwlwifi-firmware-88w8997/install
95 $(call Package/mwlwifi-firmware/install,$(1),88W8997.bin)
96 endef
97
98 $(eval $(call KernelPackage,mwlwifi))
99 $(eval $(call BuildPackage,mwlwifi-firmware-88w8864))
100 $(eval $(call BuildPackage,mwlwifi-firmware-88w8897))
101 $(eval $(call BuildPackage,mwlwifi-firmware-88w8964))
102 $(eval $(call BuildPackage,mwlwifi-firmware-88w8997))