sys-firmware: Add new recipe for intel_wifi_firmwares.

This will be used to outsource the Intel WiFi firmwares from the
main Haiku package.
This commit is contained in:
Augustin Cavalier
2021-09-29 16:21:46 -04:00
parent a38be3a682
commit 9d1f469d7e
2 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
SUMMARY="Intel WiFi firmware modules"
DESCRIPTION="Intel WiFi devices require firmware to operate. This package \
contains those necessary firmware files, corresponding to the WiFi drivers \
contained within the base system."
HOMEPAGE="https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html"
COPYRIGHT="2006-2019 Intel Corporation"
LICENSE="Intel WiFi Firmware"
REVISION="1"
srcGitRev="50b5a6cc0ad284c55ad95d0b8a2b3190d045b7a3"
SOURCE_URI="https://github.com/freebsd/freebsd-src/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="3081411b6786d960263502bf7af2100153e7bf73787b12ce14a1a8930fd7eb65"
SOURCE_DIR="freebsd-src-$srcGitRev/sys/contrib/dev/"
ARCHITECTURES="any"
DISABLE_SOURCE_PACKAGE="yes"
PROVIDES="
intel_wifi_firmwares = $portVersion
"
BUILD_REQUIRES="
cmd:uudecode
"
BUILD()
{
rm -rf install-firmware
mkdir -p install-firmware
process_firmware()
{
freebsd_driver=$1
haiku_driver=$2
cd $freebsd_driver
mkdir ../install-firmware/$haiku_driver
for f in *.uu; do
uudecode -o ../install-firmware/$haiku_driver/$(echo $f | cut -d'.' -f-1).ucode $f
done
cp LICENSE ../install-firmware/$haiku_driver
cd ..
}
process_firmware iwn iprowifi4965
process_firmware iwm idualwifi7260
# remap one firmware
cd install-firmware/iprowifi4965/
mv iwnwifi-2030-18.ucode iwlwifi-2030-18.ucode
cd ../..
# delete unneeded older firmwares
cd install-firmware/idualwifi7260/
rm iwm-8000C-17.ucode iwm-8000C-16.ucode
rm iwm-7265D-17.ucode
rm iwm-7265-16.ucode
rm iwm-7260-16.ucode iwm-3160-16.ucode
cd ../..
}
INSTALL()
{
mkdir -p $dataDir/firmware/
cp -r install-firmware/. $dataDir/firmware/
}

View File

@@ -0,0 +1,39 @@
Copyright (c) 2006-2019, Intel Corporation.
All rights reserved.
Redistribution. Redistribution and use in binary form, without
modification, are permitted provided that the following conditions are
met:
* Redistributions must reproduce the above copyright notice and the
following disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of Intel Corporation nor the names of its suppliers
may be used to endorse or promote products derived from this software
without specific prior written permission.
* No reverse engineering, decompilation, or disassembly of this software
is permitted.
Limited patent license. Intel Corporation grants a world-wide,
royalty-free, non-exclusive license under patents it now or hereafter
owns or controls to make, have made, use, import, offer to sell and
sell ("Utilize") this software, but solely to the extent that any
such patent is necessary to Utilize the software alone, or in
combination with an operating system licensed under an approved Open
Source license as listed by the Open Source Initiative at
http://opensource.org/licenses. The patent license shall not apply to
any other combinations which include this software. No hardware per
se is licensed hereunder.
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.