Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #
  2. # Copyright (C) 2006 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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=hostap-driver
  10. PKG_VERSION:=0.4.9
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
  14. PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378
  15. include $(INCLUDE_DIR)/package.mk
  16. ifeq ($(DUMP),)
  17. -include $(LINUX_DIR)/.config
  18. endif
  19. define KernelPackage/hostap/Default/2.4
  20. VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
  21. endef
  22. define KernelPackage/hostap/Default/2.6
  23. VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
  24. endef
  25. define KernelPackage/hostap/Default
  26. $(call KernelPackage/hostap/Default/$(KERNEL))
  27. SUBMENU:=Wireless Drivers
  28. URL:=http://hostap.epitest.fi/
  29. endef
  30. define KernelPackage/hostap/Default/description
  31. Host AP is a driver for 802.11b wireless cards based on Intersil
  32. Prism2/2.5/3 chipset. It supports so called Host AP mode that allows the
  33. card to act as an IEEE 802.11 access point.
  34. endef
  35. define KernelPackage/hostap
  36. $(call KernelPackage/hostap/Default)
  37. TITLE:=Host AP support for Prism2/2.5/3
  38. DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +!(LINUX_2_6_30||LINUX_2_6_31):kmod-ieee80211 +LINUX_2_6_30||LINUX_2_6_31:kmod-lib80211 +wireless-tools
  39. KCONFIG:=CONFIG_HOSTAP CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y
  40. PROVIDES:=kmod-hostap
  41. endef
  42. define KernelPackage/hostap/2.4
  43. # NOTE: needed to remove the dependency on kmod-ieee80211 in the final ipkg
  44. DEPENDS:=
  45. # NOTE: needed to build the standalone version on 2.4
  46. KCONFIG:=
  47. FILES:= \
  48. $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
  49. $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
  50. $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
  51. $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX)
  52. AUTOLOAD:=$(call AutoLoad,60,hostap hostap_crypt_wep hostap_crypt_tkip hostap_crypt_ccmp)
  53. endef
  54. define KernelPackage/hostap/2.6
  55. FILES:= \
  56. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
  57. AUTOLOAD:=$(call AutoLoad,60,hostap)
  58. endef
  59. define KernelPackage/hostap/description
  60. $(call KernelPackage/hostap/Default/description)
  61. This package contains the base Host AP driver code that is shared by
  62. different hardware models. You will also need to enable support for
  63. PLX/PCI/CS version of the driver to actually use the driver.
  64. endef
  65. define KernelPackage/hostap-cs
  66. $(call KernelPackage/hostap/Default)
  67. TITLE:=Host AP driver for PCMCIA adaptors
  68. DEPENDS:=@PCMCIA_SUPPORT kmod-hostap +kmod-pcmcia-core
  69. KCONFIG:=CONFIG_HOSTAP_CS
  70. AUTOLOAD:=$(call AutoLoad,60,hostap_cs)
  71. endef
  72. define KernelPackage/hostap-cs/2.4
  73. # NOTE: needed to build the standalone version on 2.4
  74. KCONFIG:=
  75. FILES:= \
  76. $(PKG_BUILD_DIR)/driver/modules/hostap_cs.$(LINUX_KMOD_SUFFIX)
  77. endef
  78. define KernelPackage/hostap-cs/2.6
  79. FILES:= \
  80. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_cs.$(LINUX_KMOD_SUFFIX)
  81. endef
  82. define KernelPackage/hostap-cs/description
  83. $(call KernelPackage/hostap/Default/description)
  84. This package contains the Host AP driver for Prism2/2.5/3 PC cards.
  85. endef
  86. define KernelPackage/hostap-pci
  87. $(call KernelPackage/hostap/Default)
  88. TITLE:=Host AP driver for PCI adaptors
  89. DEPENDS:=@PCI_SUPPORT kmod-hostap
  90. KCONFIG:=CONFIG_HOSTAP_PCI
  91. AUTOLOAD:=$(call AutoLoad,60,hostap_pci)
  92. endef
  93. define KernelPackage/hostap-pci/2.4
  94. # NOTE: needed to build the standalone version on 2.4
  95. KCONFIG:=
  96. FILES:= \
  97. $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX)
  98. endef
  99. define KernelPackage/hostap-pci/2.6
  100. FILES:= \
  101. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
  102. endef
  103. define KernelPackage/hostap-pci/description
  104. $(call KernelPackage/hostap/Default/description)
  105. This package contains the Host AP driver for Prism2.5 PCI adaptors.
  106. endef
  107. define KernelPackage/hostap-plx
  108. $(call KernelPackage/hostap/Default)
  109. TITLE:=Host AP driver for PLX9052 based PCI adaptors
  110. DEPENDS:=@PCI_SUPPORT kmod-hostap
  111. KCONFIG:=CONFIG_HOSTAP_PLX
  112. AUTOLOAD:=$(call AutoLoad,60,hostap_plx)
  113. endef
  114. define KernelPackage/hostap-plx/2.4
  115. # NOTE: needed to build the standalone version on 2.4
  116. KCONFIG:=
  117. FILES:= \
  118. $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX)
  119. endef
  120. define KernelPackage/hostap-plx/2.6
  121. FILES:= \
  122. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
  123. endef
  124. define KernelPackage/hostap-plx/description
  125. $(call KernelPackage/hostap/Default/description)
  126. This package contains the Host AP driver for Prism2/2.5/3 in PLX9052
  127. based PCI adaptors.
  128. endef
  129. ifeq ($(KERNEL),2.4)
  130. define Build/Compile
  131. $(MAKE) -C $(LINUX_DIR)/ \
  132. ARCH="$(LINUX_KARCH)" \
  133. CROSS_COMPILE="$(TARGET_CROSS)" \
  134. SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
  135. modules
  136. endef
  137. else
  138. define Build/Prepare
  139. mkdir -p $(PKG_BUILD_DIR)
  140. endef
  141. define Build/Configure
  142. endef
  143. define Build/Compile
  144. endef
  145. endif
  146. define KernelPackage/hostap/install
  147. $(INSTALL_DIR) $(1)/lib/wifi
  148. $(INSTALL_DATA) ./files/lib/wifi/hostap.sh $(1)/lib/wifi
  149. endef
  150. $(eval $(call KernelPackage,hostap))
  151. $(eval $(call KernelPackage,hostap-cs))
  152. $(eval $(call KernelPackage,hostap-pci))
  153. $(eval $(call KernelPackage,hostap-plx))