firmware: extract prism54-firmware into own package
authorHauke Mehrtens <hauke.mehrtens@intel.com>
Wed, 22 Jun 2016 15:46:21 +0000 (17:46 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 30 Jun 2016 17:21:02 +0000 (19:21 +0200)
Instead of downloading the firmware for prism54 devices in the
wireless.mk do it in an extra package Makefile. To ship the complete
source code Intel ships our modified OpenWrt/LEDE + the content of the
dl directory. We do not want to have any files in the dl/ directory
which are not needed to build our images. The prism54 gets downloaded
every time independently of building kmod-net-prism54 or not. When it
is in a own package it only gets downloaded when the firmware package
is selected.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
package/firmware/prism54-firmware/Makefile [new file with mode: 0644]
package/kernel/linux/modules/wireless.mk

diff --git a/package/firmware/prism54-firmware/Makefile b/package/firmware/prism54-firmware/Makefile
new file mode 100644 (file)
index 0000000..759e6b0
--- /dev/null
@@ -0,0 +1,39 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=prism54-firmware
+PKG_VERSION:=1.0.4.3
+PKG_RELEASE:=1
+
+# Prism54 FullMAC firmware (jbnore.free.fr seems to be rather slow, so we use daemonizer.de)
+PKG_SOURCE:=$(PKG_VERSION).arm
+PKG_SOURCE_URL:=https://daemonizer.de/prism54/prism54-fw/fw-fullmac/
+PKG_MD5SUM:=8bd4310971772a486b9784c77f8a6df9
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/prism54-firmware
+  SECTION:=firmware
+  CATEGORY:=Firmware
+  URL:=https://daemonizer.de/prism54/prism54-fw
+  TITLE:=prism54 firmware
+endef
+
+define Build/Prepare
+       mkdir -p $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+
+endef
+
+define Package/prism54-firmware/install
+       $(INSTALL_DIR) $(1)/lib/firmware
+       $(INSTALL_DATA) $(DL_DIR)/$(PKG_SOURCE) $(1)/lib/firmware/isl3890
+endef
+
+$(eval $(call BuildPackage,prism54-firmware))
index d7c4425..72e2bf4 100644 (file)
@@ -10,7 +10,7 @@ WIRELESS_MENU:=Wireless Drivers
 define KernelPackage/net-prism54
   SUBMENU:=$(WIRELESS_MENU)
   TITLE:=Intersil Prism54 support
-  DEPENDS:=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT
+  DEPENDS:=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +prism54-firmware
   KCONFIG:=CONFIG_PRISM54
   FILES:= \
        $(LINUX_DIR)/drivers/net/wireless/prism54/prism54.ko@lt4.5 \
@@ -22,21 +22,6 @@ define KernelPackage/net-prism54/description
  Kernel modules for Intersil Prism54 support
 endef
 
-# Prism54 FullMAC firmware (jbnore.free.fr seems to be rather slow, so we use daemonizer.de)
-PRISM54_FW:=1.0.4.3.arm
-
-define Download/net-prism54
-  FILE:=$(PRISM54_FW)
-  URL:=http://daemonizer.de/prism54/prism54-fw/fw-fullmac/
-  MD5SUM:=8bd4310971772a486b9784c77f8a6df9
-endef
-
-define KernelPackage/net-prism54/install
-       $(INSTALL_DIR) $(1)/lib/firmware
-       $(INSTALL_DATA) $(DL_DIR)/$(PRISM54_FW) $(1)/lib/firmware/isl3890
-endef
-
-$(eval $(call Download,net-prism54))
 $(eval $(call KernelPackage,net-prism54))