Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ath10k-ct
  3. PKG_RELEASE=2
  4. PKG_LICENSE:=GPLv2
  5. PKG_LICENSE_FILES:=
  6. PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
  7. PKG_SOURCE_PROTO:=git
  8. PKG_SOURCE_DATE:=2017-06-13
  9. PKG_SOURCE_VERSION:=bded1823912549017d819d1796273b3134c3de20
  10. PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814b
  11. PKG_MAINTAINER:=Ben Greear <[email protected]>
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_EXTMOD_SUBDIRS:=ath10k
  14. # Build the 4.13 ath10k-ct driver version. Other options are "-4.9", or
  15. # leave un-defined for 4.7 kernel. Probably this should match as closely as
  16. # possible to whatever mac80211 backports version is being used.
  17. CT_KVER="-4.13"
  18. STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
  19. include $(INCLUDE_DIR)/kernel.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define KernelPackage/ath10k-ct
  22. SUBMENU:=Wireless Drivers
  23. TITLE:=ath10k-ct driver optimized for CT ath10k firmware
  24. DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core
  25. FILES:=\
  26. $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
  27. $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
  28. AUTOLOAD:=$(call AutoProbe,ath10k_pci)
  29. endef
  30. NOSTDINC_FLAGS = \
  31. -I$(PKG_BUILD_DIR) \
  32. -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
  33. -I$(STAGING_DIR)/usr/include/mac80211-backport \
  34. -I$(STAGING_DIR)/usr/include/mac80211/uapi \
  35. -I$(STAGING_DIR)/usr/include/mac80211 \
  36. -include backport/autoconf.h \
  37. -include backport/backport.h
  38. ifdef CONFIG_PACKAGE_MAC80211_MESH
  39. NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
  40. endif
  41. CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
  42. # No AHB support enabled yet. Could conditionally enable it later.
  43. #CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
  44. #NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
  45. NOSTDINC_FLAGS += -DSTANDALONE_CT
  46. ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
  47. CT_MAKEDEFS += CONFIG_ATH10K_DEBUGFS=y CONFIG_MAC80211_DEBUGFS=y
  48. NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
  49. NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUGFS
  50. endif
  51. ifdef CONFIG_PACKAGE_ATH_DEBUG
  52. NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUG
  53. endif
  54. ifdef CONFIG_PACKAGE_ATH_DFS
  55. NOSTDINC_FLAGS += -DCONFIG_ATH10K_DFS_CERTIFIED
  56. endif
  57. ifdef CONFIG_PACKAGE_ATH_SPECTRAL
  58. CT_MAKEDEFS += CONFIG_ATH10K_SPECTRAL=y
  59. NOSTDINC_FLAGS += -DCONFIG_ATH10K_SPECTRAL
  60. endif
  61. define Build/Configure
  62. cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
  63. endef
  64. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  65. CT_MAKEDEFS += V=1
  66. endif
  67. define Build/Compile
  68. +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
  69. $(KERNEL_MAKE_FLAGS) \
  70. SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
  71. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  72. modules
  73. endef
  74. $(eval $(call KernelPackage,ath10k-ct))