From b353282928ac29da6fa1e8fb6c1970f7c2aeaccb Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 3 Mar 2010 17:23:06 +0000 Subject: [PATCH] Extended AddWifiFirmwareToHaikuImage to support a boolean, which determines whether to extract the firmware archive onto Haiku Image or to simply copy it intact. This allows the ipw2100 and iprowifi2200 firmware archives to be copied onto the default images. Fixes #5523 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35738 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 5 ++++- build/jam/ImageRules | 13 ++++++++----- .../drivers/network/wlan/iprowifi2200/Jamfile | 6 ++++++ .../drivers/network/wlan/iprowifi3945/Jamfile | 1 + .../drivers/network/wlan/iprowifi4965/Jamfile | 1 + .../kernel/drivers/network/wlan/ipw2100/Jamfile | 6 ++++++ .../drivers/network/wlan/marvell88w8363/Jamfile | 1 + .../kernel/drivers/network/wlan/ralinkwifi/Jamfile | 1 + 8 files changed, 28 insertions(+), 6 deletions(-) diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index 07b37d17e0..47b722f801 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -196,11 +196,14 @@ SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs attribute_overlay for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) { local package = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGE) ] ; local archive = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVE) ] ; + local extract = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_DO_EXTRACT) ] ; if $(archive) { - AddWifiFirmwareToHaikuImage $(driver) : $(package) : $(archive) ; + AddWifiFirmwareToHaikuImage $(driver) : $(package) : $(archive) + : $(extract) ; } } + # modules AddFilesToHaikuImage system add-ons kernel bus_managers : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ; diff --git a/build/jam/ImageRules b/build/jam/ImageRules index e4017779b4..75a1b9503e 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -698,18 +698,21 @@ rule AddHeaderDirectoryToHaikuImage dirTokens : dirName : alwaysUpdate : $(dirName) : -x .svn : $(alwaysUpdate) ; } -rule AddWifiFirmwareToHaikuImage driver : package : archive +rule AddWifiFirmwareToHaikuImage driver : package : archive : extract { - #AddWifiFirmwareToHaikuImage : : + #AddWifiFirmwareToHaikuImage : : : # complete location to wifi firmware archive local firmwareArchive = [ FDirName $(HAIKU_TOP) data system data firmware $(driver) $(archive) ] ; local dirTokens = system data firmware $(driver) ; - - ExtractArchiveToHaikuImage $(dirTokens) : $(firmwareArchive) : - : $(package) ; + if $(extract) = true || $(extract) = 1 { + ExtractArchiveToHaikuImage $(dirTokens) : $(firmwareArchive) : + : $(package) ; + } else { + AddFilesToHaikuImage $(dirTokens) : $(firmwareArchive) ; + } } rule ExtractArchiveToHaikuImage dirTokens : archiveFile : alwaysUpdate diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile b/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile index 74e961d429..0f81e1c581 100644 --- a/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi2200/Jamfile @@ -27,3 +27,9 @@ KernelAddon iprowifi2200 : libfreebsd_wlan.a libfreebsd_network.a ; + +# Note: Due to licensing restrictions, we can only distribute the archive. +# The end-user must extract and install it themselves. +HAIKU_WIFI_FIRMWARE_PACKAGE on iprowifi2200 = "" ; +HAIKU_WIFI_FIRMWARE_ARCHIVE on iprowifi2200 = ipw2200-fw-3.1.tgz ; +HAIKU_WIFI_FIRMWARE_DO_EXTRACT on iprowifi2200 = false ; diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile b/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile index 3546fb539a..c5ad69649b 100644 --- a/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi3945/Jamfile @@ -25,4 +25,5 @@ KernelAddon iprowifi3945 : HAIKU_WIFI_FIRMWARE_PACKAGE on iprowifi3945 = iwlwifi-3945-ucode-2.14.1.5 ; HAIKU_WIFI_FIRMWARE_ARCHIVE on iprowifi3945 = iwlwifi-3945-ucode-2.14.1.5.tgz ; +HAIKU_WIFI_FIRMWARE_DO_EXTRACT on iprowifi3945 = true ; diff --git a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile index 8f55266b61..b7b8486f40 100644 --- a/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/iprowifi4965/Jamfile @@ -26,4 +26,5 @@ KernelAddon iprowifi4965 : HAIKU_WIFI_FIRMWARE_PACKAGE on iprowifi4965 = iwlwifi-4965-ucode-4.44.1.20 ; HAIKU_WIFI_FIRMWARE_ARCHIVE on iprowifi4965 = iwlwifi-4965-ucode-4.44.1.20.tgz ; +HAIKU_WIFI_FIRMWARE_DO_EXTRACT on iprowifi4965 = true ; diff --git a/src/add-ons/kernel/drivers/network/wlan/ipw2100/Jamfile b/src/add-ons/kernel/drivers/network/wlan/ipw2100/Jamfile index 06a64236fc..1a28cfad03 100644 --- a/src/add-ons/kernel/drivers/network/wlan/ipw2100/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/ipw2100/Jamfile @@ -15,3 +15,9 @@ Package haiku-ipw2100-cvs : ipw2100.settings : boot home config settings kernel drivers sample ; PackageDriverSymLink haiku-ipw2100-cvs : net ipw2100 ; + +# Note: Due to licensing restrictions, we can only distribute the archive. +# The end-user must extract and install it themselves. +HAIKU_WIFI_FIRMWARE_PACKAGE on ipw2100 = "" ; +HAIKU_WIFI_FIRMWARE_ARCHIVE on ipw2100 = ipw2100-fw-1.3.tgz ; +HAIKU_WIFI_FIRMWARE_DO_EXTRACT on ipw2100 = false ; diff --git a/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile b/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile index 6790f5d25a..54174cf07d 100644 --- a/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/marvell88w8363/Jamfile @@ -29,4 +29,5 @@ KernelAddon marvell88w8363 : HAIKU_WIFI_FIRMWARE_PACKAGE on marvell88w8363 = "" ; HAIKU_WIFI_FIRMWARE_ARCHIVE on marvell88w8363 = 88w8363-fw-3.6.2.2.zip ; +HAIKU_WIFI_FIRMWARE_DO_EXTRACT on marvell88w8363 = true ; diff --git a/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile b/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile index 529b06da2d..a6be2bb172 100644 --- a/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile +++ b/src/add-ons/kernel/drivers/network/wlan/ralinkwifi/Jamfile @@ -27,4 +27,5 @@ KernelAddon ralinkwifi : HAIKU_WIFI_FIRMWARE_PACKAGE on ralinkwifi = RT61_Firmware_V1.2 ; HAIKU_WIFI_FIRMWARE_ARCHIVE on ralinkwifi = RT61_Firmware_V1.2.zip ; +HAIKU_WIFI_FIRMWARE_DO_EXTRACT on ralinkwifi = true ;