Makefile 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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:kmod-lib80211 +wireless-tools
  39. KCONFIG:=CONFIG_HOSTAP CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y
  40. endef
  41. define KernelPackage/hostap/2.4
  42. # NOTE: needed to remove the dependency on kmod-ieee80211 in the final ipkg
  43. DEPENDS:=
  44. # NOTE: needed to build the standalone version on 2.4
  45. KCONFIG:=
  46. FILES:= \
  47. $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
  48. $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
  49. $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
  50. $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX)
  51. AUTOLOAD:=$(call AutoLoad,60,hostap hostap_crypt_wep hostap_crypt_tkip hostap_crypt_ccmp)
  52. endef
  53. define KernelPackage/hostap/2.6
  54. FILES:= \
  55. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
  56. AUTOLOAD:=$(call AutoLoad,60,hostap)
  57. endef
  58. define KernelPackage/hostap/description
  59. $(call KernelPackage/hostap/Default/description)
  60. This package contains the base Host AP driver code that is shared by
  61. different hardware models. You will also need to enable support for
  62. PLX/PCI/CS version of the driver to actually use the driver.
  63. endef
  64. define KernelPackage/hostap-cs
  65. $(call KernelPackage/hostap/Default)
  66. TITLE:=Host AP driver for PCMCIA adaptors
  67. DEPENDS:=@PCMCIA_SUPPORT +kmod-hostap +kmod-pcmcia-core
  68. KCONFIG:=CONFIG_HOSTAP_CS
  69. AUTOLOAD:=$(call AutoLoad,60,hostap_cs)
  70. endef
  71. define KernelPackage/hostap-cs/2.4
  72. # NOTE: needed to build the standalone version on 2.4
  73. KCONFIG:=
  74. FILES:= \
  75. $(PKG_BUILD_DIR)/driver/modules/hostap_cs.$(LINUX_KMOD_SUFFIX)
  76. endef
  77. define KernelPackage/hostap-cs/2.6
  78. FILES:= \
  79. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_cs.$(LINUX_KMOD_SUFFIX)
  80. endef
  81. define KernelPackage/hostap-cs/description
  82. $(call KernelPackage/hostap/Default/description)
  83. This package contains the Host AP driver for Prism2/2.5/3 PC cards.
  84. endef
  85. define KernelPackage/hostap-pci
  86. $(call KernelPackage/hostap/Default)
  87. TITLE:=Host AP driver for PCI adaptors
  88. DEPENDS:=@PCI_SUPPORT +kmod-hostap
  89. KCONFIG:=CONFIG_HOSTAP_PCI
  90. AUTOLOAD:=$(call AutoLoad,60,hostap_pci)
  91. endef
  92. define KernelPackage/hostap-pci/2.4
  93. # NOTE: needed to build the standalone version on 2.4
  94. KCONFIG:=
  95. FILES:= \
  96. $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX)
  97. endef
  98. define KernelPackage/hostap-pci/2.6
  99. FILES:= \
  100. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
  101. endef
  102. define KernelPackage/hostap-pci/description
  103. $(call KernelPackage/hostap/Default/description)
  104. This package contains the Host AP driver for Prism2.5 PCI adaptors.
  105. endef
  106. define KernelPackage/hostap-plx
  107. $(call KernelPackage/hostap/Default)
  108. TITLE:=Host AP driver for PLX9052 based PCI adaptors
  109. DEPENDS:=@PCI_SUPPORT +kmod-hostap
  110. KCONFIG:=CONFIG_HOSTAP_PLX
  111. AUTOLOAD:=$(call AutoLoad,60,hostap_plx)
  112. endef
  113. define KernelPackage/hostap-plx/2.4
  114. # NOTE: needed to build the standalone version on 2.4
  115. KCONFIG:=
  116. FILES:= \
  117. $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX)
  118. endef
  119. define KernelPackage/hostap-plx/2.6
  120. FILES:= \
  121. $(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
  122. endef
  123. define KernelPackage/hostap-plx/description
  124. $(call KernelPackage/hostap/Default/description)
  125. This package contains the Host AP driver for Prism2/2.5/3 in PLX9052
  126. based PCI adaptors.
  127. endef
  128. ifeq ($(KERNEL),2.4)
  129. define Build/Compile
  130. $(MAKE) -C $(LINUX_DIR)/ \
  131. ARCH="$(LINUX_KARCH)" \
  132. CROSS_COMPILE="$(TARGET_CROSS)" \
  133. SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
  134. modules
  135. endef
  136. else
  137. define Build/Prepare
  138. mkdir -p $(PKG_BUILD_DIR)
  139. endef
  140. define Build/Configure
  141. endef
  142. define Build/Compile
  143. endef
  144. endif
  145. define KernelPackage/hostap/install
  146. $(INSTALL_DIR) $(1)/lib/wifi
  147. $(INSTALL_DATA) ./files/lib/wifi/hostap.sh $(1)/lib/wifi
  148. endef
  149. $(eval $(call KernelPackage,hostap))
  150. $(eval $(call KernelPackage,hostap-cs))
  151. $(eval $(call KernelPackage,hostap-pci))
  152. $(eval $(call KernelPackage,hostap-plx))