Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mwlwifi
  9. PKG_VERSION:=10.3.2.0-20161013
  10. PKG_RELEASE=2
  11. PKG_LICENSE:=ISC
  12. PKG_LICENSE_FILES:=
  13. PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE_VERSION:=41db55d3872cad94763a5fa0c5f028fa1ab66f58
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  18. PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/kernel.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define KernelPackage/mwlwifi
  23. SUBMENU:=Wireless Drivers
  24. TITLE:=Marvell 88W8864 wireless driver
  25. DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT @PCI_SUPPORT @TARGET_mvebu
  26. FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
  27. AUTOLOAD:=$(call AutoLoad,50,mac80211 mwlwifi)
  28. endef
  29. NOSTDINC_FLAGS = \
  30. -I$(PKG_BUILD_DIR) \
  31. -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
  32. -I$(STAGING_DIR)/usr/include/mac80211-backport \
  33. -I$(STAGING_DIR)/usr/include/mac80211/uapi \
  34. -I$(STAGING_DIR)/usr/include/mac80211 \
  35. -include backport/backport.h
  36. define Build/Compile
  37. +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
  38. ARCH="$(LINUX_KARCH)" \
  39. CROSS_COMPILE="$(TARGET_CROSS)" \
  40. SUBDIRS="$(PKG_BUILD_DIR)" \
  41. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  42. modules
  43. endef
  44. define KernelPackage/mwlwifi/install
  45. $(INSTALL_DIR) $(1)/lib/firmware
  46. $(INSTALL_DIR) $(1)/lib/firmware/mwlwifi
  47. $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8864.bin $(1)/lib/firmware/mwlwifi/
  48. $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8897.bin $(1)/lib/firmware/mwlwifi/
  49. $(CP) $(PKG_BUILD_DIR)/bin/firmware/88W8964.bin $(1)/lib/firmware/mwlwifi/
  50. $(CP) $(PKG_BUILD_DIR)/bin/firmware/Marvell_license.txt $(1)/lib/firmware/mwlwifi/
  51. endef
  52. $(eval $(call KernelPackage,mwlwifi))