1
0

Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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_RELEASE=1
  10. PKG_LICENSE:=ISC
  11. PKG_LICENSE_FILES:=
  12. PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_DATE:=2018-10-29
  15. PKG_SOURCE_VERSION:=382700ce5744fe80271c57a89c6589e767d91620
  16. PKG_MIRROR_HASH:=7378b7d391aeec7a86b6548723911d21bc780ea84ceea858e910cc65a1d925c6
  17. PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/kernel.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define KernelPackage/mwlwifi
  22. SUBMENU:=Wireless Drivers
  23. TITLE:=Marvell 88W8864/88W8897/88W8964/88W8997 wireless driver
  24. DEPENDS:=+kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT @PCI_SUPPORT @TARGET_mvebu
  25. FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
  26. AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
  27. endef
  28. NOSTDINC_FLAGS = \
  29. -I$(PKG_BUILD_DIR) \
  30. -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
  31. -I$(STAGING_DIR)/usr/include/mac80211-backport \
  32. -I$(STAGING_DIR)/usr/include/mac80211/uapi \
  33. -I$(STAGING_DIR)/usr/include/mac80211 \
  34. -include backport/backport.h
  35. define Build/Compile
  36. +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
  37. $(KERNEL_MAKE_FLAGS) \
  38. SUBDIRS="$(PKG_BUILD_DIR)" \
  39. NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
  40. modules
  41. endef
  42. define Package/mwlwifi-firmware-default
  43. SECTION:=firmware
  44. CATEGORY:=Firmware
  45. TITLE:=Marvell $(1) firmware
  46. DEPENDS:=+kmod-mwlwifi @TARGET_mvebu
  47. endef
  48. define Package/mwlwifi-firmware/install
  49. $(INSTALL_DIR) $(1)/lib/firmware
  50. $(INSTALL_DIR) $(1)/lib/firmware/mwlwifi
  51. $(CP) $(PKG_BUILD_DIR)/bin/firmware/$(2) $(1)/lib/firmware/mwlwifi/
  52. $(CP) $(PKG_BUILD_DIR)/bin/firmware/Marvell_license.txt $(1)/lib/firmware/mwlwifi/$(2).Marvell_license.txt
  53. endef
  54. define Package/mwlwifi-firmware-88w8864
  55. $(call Package/mwlwifi-firmware-default,88W8864)
  56. endef
  57. define Package/mwlwifi-firmware-88w8864/install
  58. $(call Package/mwlwifi-firmware/install,$(1),88W8864.bin)
  59. endef
  60. define Package/mwlwifi-firmware-88w8897
  61. $(call Package/mwlwifi-firmware-default,88W8897)
  62. endef
  63. define Package/mwlwifi-firmware-88w8897/install
  64. $(call Package/mwlwifi-firmware/install,$(1),88W8897.bin)
  65. endef
  66. define Package/mwlwifi-firmware-88w8964
  67. $(call Package/mwlwifi-firmware-default,88W8964)
  68. endef
  69. define Package/mwlwifi-firmware-88w8964/install
  70. $(call Package/mwlwifi-firmware/install,$(1),88W8964.bin)
  71. endef
  72. define Package/mwlwifi-firmware-88w8997
  73. $(call Package/mwlwifi-firmware-default,88W8997)
  74. endef
  75. define Package/mwlwifi-firmware-88w8997/install
  76. $(call Package/mwlwifi-firmware/install,$(1),88W8997.bin)
  77. endef
  78. $(eval $(call KernelPackage,mwlwifi))
  79. $(eval $(call BuildPackage,mwlwifi-firmware-88w8864))
  80. $(eval $(call BuildPackage,mwlwifi-firmware-88w8897))
  81. $(eval $(call BuildPackage,mwlwifi-firmware-88w8964))
  82. $(eval $(call BuildPackage,mwlwifi-firmware-88w8997))