[OpenWrt-Devel] [PATCH] mac80211: add packages libertas-spi module and firmware

Joseph Honold mozzwald at gmail.com
Thu Feb 18 09:29:25 EST 2016


This adds option to build kernel module and firmware packages
for a Marvell 8686 SPI Wireless device

Signed-off-by: Joseph Honold <mozzwald at gmail.com>
---
 package/firmware/linux-firmware/marvell.mk | 10 ++++++++++
 package/kernel/mac80211/Makefile           | 15 ++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/package/firmware/linux-firmware/marvell.mk b/package/firmware/linux-firmware/marvell.mk
index 86c0e6f..752a8e0 100644
--- a/package/firmware/linux-firmware/marvell.mk
+++ b/package/firmware/linux-firmware/marvell.mk
@@ -44,3 +44,13 @@ define Package/libertas-sdio-firmware/install
 endef
 $(eval $(call BuildPackage,libertas-sdio-firmware))
 
+Package/libertas-spi-firmware = $(call Package/firmware-default,Marvell 8686 SPI firmware)
+define Package/libertas-spi-firmware/install
+	$(INSTALL_DIR) $(1)/lib/firmware/libertas
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/libertas/gspi8686_v9_helper.bin \
+		$(PKG_BUILD_DIR)/libertas/gspi8686_v9.bin \
+		$(1)/lib/firmware/libertas
+endef
+$(eval $(call BuildPackage,libertas-spi-firmware))
+
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 227073d..bb2b05a 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -31,7 +31,7 @@ PKG_DRIVERS = \
 	iwl-legacy iwl3945 iwl4965 iwlwifi \
 	lib80211 \
 	libipw ipw2100 ipw2200 \
-	libertas-sdio libertas-usb \
+	libertas-sdio libertas-usb libertas-spi \
 	mac80211-hwsim \
 	mt7601u \
 	mwl8k mwifiex-pcie \
@@ -975,6 +975,17 @@ define KernelPackage/libertas-sdio
   AUTOLOAD:=$(call AutoProbe,libertas libertas_sdio)
 endef
 
+define KernelPackage/libertas-spi
+  $(call KernelPackage/mac80211/Default)
+  SUBMENU:=Wireless Drivers
+  DEPENDS+= +kmod-cfg80211 +kmod-lib80211 + at DRIVER_WEXT_SUPPORT +libertas-spi-firmware
+  TITLE:=Marvell 88W8686 SPI Wireless Driver
+  FILES:= \
+	$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
+	$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_spi.ko
+  AUTOLOAD:=$(call AutoProbe,libertas libertas_spi)
+endef
+
 define KernelPackage/mac80211-hwsim
   $(call KernelPackage/mac80211/Default)
   TITLE:=mac80211 HW simulation device
@@ -1573,6 +1584,7 @@ config-y += HERMES_PRISM
 config-$(call config_package,adm8211) += ADM8211
 config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO
 config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
+config-$(call config_package,libertas-spi) += LIBERTAS LIBERTAS_SPI
 config-$(call config_package,mwl8k) += MWL8K
 config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
 config-$(call config_package,rtl8180) += RTL8180
@@ -1773,6 +1785,7 @@ $(eval $(call KernelPackage,iwl3945))
 $(eval $(call KernelPackage,lib80211))
 $(eval $(call KernelPackage,libertas-usb))
 $(eval $(call KernelPackage,libertas-sdio))
+$(eval $(call KernelPackage,libertas-spi))
 $(eval $(call KernelPackage,libipw))
 $(eval $(call KernelPackage,ipw2100))
 $(eval $(call KernelPackage,ipw2200))
-- 
2.7.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list