SHA256
1
0
forked from pool/b43-fwcutter

- Provide fallback in case %_firmwaredir is not defined

OBS-URL: https://build.opensuse.org/package/show/hardware/b43-fwcutter?expand=0&rev=32
This commit is contained in:
Michal Suchanek 2024-07-26 14:55:48 +00:00 committed by Git OBS Bridge
commit 7449a8e180
6 changed files with 381 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
b43-fwcutter-019.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d6ea85310df6ae08e7f7e46d8b975e17fc867145ee249307413cfbe15d7121ce
size 46769

122
b43-fwcutter.changes Normal file
View File

@ -0,0 +1,122 @@
-------------------------------------------------------------------
Wed Mar 20 19:29:54 UTC 2024 - Arjen de Korte <suse+build@de-korte.org>
- Provide fallback in case %_firmwaredir is not defined
-------------------------------------------------------------------
Sun Apr 18 01:46:07 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Fixed SPEC file: Replace broken URL with current upstream
-------------------------------------------------------------------
Mon Oct 19 13:04:29 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
- use %_firmwaredir
-------------------------------------------------------------------
Wed Jan 6 20:20:08 UTC 2016 - Larry.Finger@lwfinger.net
- Update downloaded firmware from version 666.2 to version 784.2. This
release adds firmware for a number of newer devices. Not all of these
are supported by b43, but with this change, the firmware will be
available when any are supported. As Broadcom does not release details
of the changes in their firmware, it is not known what enhancements have
been made to the firmware for older devices.
-------------------------------------------------------------------
Sun Nov 16 18:43:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashism in install_bcm43xx_firmware script
-------------------------------------------------------------------
Tue Nov 11 19:00:19 UTC 2014 - p.drouand@gmail.com
- Update to version 019
+ No changelog available
-------------------------------------------------------------------
Sun Nov 24 18:30:14 UTC 2013 - crrodriguez@opensuse.org
- Update to version 018 (no changelog)
-------------------------------------------------------------------
Fri Sep 6 20:43:03 UTC 2013 - crrodriguez@opensuse.org
- add Supplements for the rest of devices supported by the b43
and b43legacy drivers.
-------------------------------------------------------------------
Wed Apr 17 02:39:36 UTC 2013 - jeffm@suse.com
- Update to v017 (bnc#815700)
- Update source URL for firmware
- removed b43-fwcutter.diff
-------------------------------------------------------------------
Thu Aug 23 07:13:02 UTC 2012 - cfarrell@suse.com
- license update: BSD-2-Clause
Only BSD-2-Clause license found in the package
-------------------------------------------------------------------
Sat Sep 17 16:26:49 UTC 2011 - jengelh@medozas.de
- Remove redundant tags/sections from specfile
- Use %_smp_mflags for parallel build
-------------------------------------------------------------------
Sun Aug 21 14:38:00 CST 2011 - Larry.Finger@lwfinger.net
- Remove 2 files that require 300+ MB downloads
- Add 5 new files with newest firmware (508.X, 644.1001, and 666.2)
* 802.11 cores through rev 22 are supported
- the install_bcm43xx_firmware script now unloads and
reloads the driver so that it will work immediately
- Removed firmware-IDs from fwcutter - they are not maintained in kernel
- Updated Email address for Michael Buesch
- Updated to Revision 15
-------------------------------------------------------------------
Tue Jan 12 14:38:00 CST 2010 - Larry.Finger@lwfinger.net
- Add 2 new files with 478.104 firmware
* 802.11 cores with rev 16 are msupported
- Use ARRAY_SIZE instead of local FILES macro
- Add sparse support, Add quiet build, Add autodependencies
-------------------------------------------------------------------
Mon Aug 3 11:56:39 UTC 2009 - cstender@novell.com
- updated to version 012
* don't extract core 4 firmware from V4 drivers
-------------------------------------------------------------------
Mon Feb 9 13:54:25 CET 2009 - cstender@suse.de
- %ghost b43 and b43legacy firmware (bnc#466113)
-------------------------------------------------------------------
Fri Apr 11 14:04:45 CEST 2008 - cstender@suse.de
- added curl to requires
- improved install_bcm43xx_firmware script
-------------------------------------------------------------------
Thu Apr 10 14:34:00 CEST 2008 - cstender@suse.de
- updated to version 011
- added supplement tag so package gets installed when a bcm43xx
card is detected
- added install_bcm43xx_firmware script which downloads and
extracts firmware files
-------------------------------------------------------------------
Sun Mar 16 07:31:01 CET 2008 - coolo@suse.de
- correctly replace the old name
-------------------------------------------------------------------
Thu Jan 10 16:51:20 CET 2008 - cstender@suse.de
- initial package (version 009)

168
b43-fwcutter.spec Normal file
View File

@ -0,0 +1,168 @@
#
# spec file for package b43-fwcutter
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?_firmwaredir: %global _firmwaredir /lib/firmware}
Name: b43-fwcutter
Version: 019
Release: 0
Summary: Tool for extracting firmware from newer Broadcom WLAN drivers
License: BSD-2-Clause
Group: Hardware/Wifi
URL: https://bues.ch/cms/hacking/misc.html#linux_b43_driver_firmware_tools
Source: http://bues.ch/b43/fwcutter/%{name}-%{version}.tar.bz2
Source1: install_bcm43xx_firmware
Requires: curl
Supplements: modalias(pci:v000014E4d000043*sv*sd*bc*sc*i*)
#b43legacy
Supplements: modalias(ssb:v4243id0812rev04*)
Supplements: modalias(ssb:v4243id0812rev02*)
#b43
Supplements: modalias(pcmcia:m02D0c0476f*fn*pfn*pa*pb*pc*pd*)
Supplements: modalias(pcmcia:m02D0c0448f*fn*pfn*pa*pb*pc*pd*)
Supplements: modalias(bcma:m04BFid0812rev1Dcl*)
Supplements: modalias(bcma:m04BFid0812rev18cl*)
Supplements: modalias(bcma:m04BFid0812rev17cl*)
Supplements: modalias(bcma:m04BFid0812rev11cl*)
Supplements: modalias(ssb:v4243id0812rev10*)
Supplements: modalias(ssb:v4243id0812rev0F*)
Supplements: modalias(ssb:v4243id0812rev0D*)
Supplements: modalias(ssb:v4243id0812rev0C*)
Supplements: modalias(ssb:v4243id0812rev0B*)
Supplements: modalias(ssb:v4243id0812rev0A*)
Supplements: modalias(ssb:v4243id0812rev09*)
Supplements: modalias(ssb:v4243id0812rev07*)
Supplements: modalias(ssb:v4243id0812rev06*)
Supplements: modalias(ssb:v4243id0812rev05*)
Obsoletes: bcm43xx-fwcutter < %{version}
Provides: bcm43xx-fwcutter = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
b43-fwcutter can be used to extract firmware from Windows WLAN drivers
for Broadcom bcm43xx devices. The firmware is necessary to run such a
card under Linux using the b43 or b43legacy driver.
%prep
%setup -q
%build
make CFLAGS="%{optflags}" %{?_smp_mflags}
%install
#make PREFIX=%%{buildroot}/usr \
# MANDIR=%%{buildroot}/%%{_mandir} install
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_sbindir}/
install -m 755 b43-fwcutter %{buildroot}%{_bindir}/
install -m 755 %{SOURCE1} %{buildroot}%{_sbindir}/
sed -i -e 's,/lib/firmware,%{_firmwaredir},' %{buildroot}%{_sbindir}/install_bcm43xx_firmware
mkdir -p %{buildroot}%{_firmwaredir}/b43/
mkdir -p %{buildroot}%{_firmwaredir}/b43legacy/
for i in a0g0bsinitvals5.fw a0g0bsinitvals9.fw a0g0initvals5.fw a0g0initvals9.fw a0g1bsinitvals13.fw a0g1bsinitvals5.fw a0g1bsinitvals9.fw a0g1initvals13.fw a0g1initvals5.fw a0g1initvals9.fw b0g0bsinitvals13.fw b0g0bsinitvals5.fw b0g0bsinitvals9.fw b0g0initvals13.fw b0g0initvals5.fw b0g0initvals9.fw lp0bsinitvals13.fw lp0bsinitvals14.fw lp0bsinitvals15.fw lp0bsinitvals16.fw lp0initvals13.fw lp0initvals14.fw lp0initvals15.fw lp0initvals16.fw n0absinitvals11.fw n0bsinitvals11.fw n0bsinitvals16.fw n0initvals11.fw n0initvals16.fw pcm5.fw sslpn0bsinitvals16.fw sslpn0initvals16.fw sslpn1bsinitvals20.fw sslpn1initvals20.fw sslpn2bsinitvals17.fw sslpn2bsinitvals19.fw sslpn2initvals17.fw sslpn2initvals19.fw sslpn4bsinitvals22.fw sslpn4initvals22.fw ucode11.fw ucode13.fw ucode14.fw ucode15.fw ucode16_lp.fw ucode16_mimo.fw ucode16_sslpn.fw ucode16_sslpn_nobt.fw ucode17.fw ucode19.fw ucode20.fw ucode22_sslpn.fw ucode5.fw ucode9.fw
do
touch %{buildroot}%{_firmwaredir}/b43/$i
done
for j in a0g0bsinitvals2.fw a0g0bsinitvals5.fw a0g0initvals2.fw a0g0initvals5.fw a0g1bsinitvals5.fw a0g1initvals5.fw b0g0bsinitvals2.fw b0g0bsinitvals5.fw b0g0initvals2.fw b0g0initvals5.fw pcm4.fw pcm5.fw ucode11.fw ucode2.fw ucode4.fw ucode5.fw
do
touch %{buildroot}%{_firmwaredir}/b43legacy/$j
done
%files
%defattr(-, root, root)
%doc README
%{_bindir}/b43-fwcutter
%{_sbindir}/install_bcm43xx_firmware
#%%{_mandir}/man1/b43-fwcutter.1.gz
%dir %{_firmwaredir}/b43
%dir %{_firmwaredir}/b43legacy
# ghost b43 firmware
%ghost %{_firmwaredir}/b43/a0g0bsinitvals5.fw
%ghost %{_firmwaredir}/b43/a0g0bsinitvals9.fw
%ghost %{_firmwaredir}/b43/a0g0initvals5.fw
%ghost %{_firmwaredir}/b43/a0g0initvals9.fw
%ghost %{_firmwaredir}/b43/a0g1bsinitvals13.fw
%ghost %{_firmwaredir}/b43/a0g1bsinitvals5.fw
%ghost %{_firmwaredir}/b43/a0g1bsinitvals9.fw
%ghost %{_firmwaredir}/b43/a0g1initvals13.fw
%ghost %{_firmwaredir}/b43/a0g1initvals5.fw
%ghost %{_firmwaredir}/b43/a0g1initvals9.fw
%ghost %{_firmwaredir}/b43/b0g0bsinitvals13.fw
%ghost %{_firmwaredir}/b43/b0g0bsinitvals5.fw
%ghost %{_firmwaredir}/b43/b0g0bsinitvals9.fw
%ghost %{_firmwaredir}/b43/b0g0initvals13.fw
%ghost %{_firmwaredir}/b43/b0g0initvals5.fw
%ghost %{_firmwaredir}/b43/b0g0initvals9.fw
%ghost %{_firmwaredir}/b43/lp0bsinitvals13.fw
%ghost %{_firmwaredir}/b43/lp0bsinitvals14.fw
%ghost %{_firmwaredir}/b43/lp0bsinitvals15.fw
%ghost %{_firmwaredir}/b43/lp0bsinitvals16.fw
%ghost %{_firmwaredir}/b43/lp0initvals13.fw
%ghost %{_firmwaredir}/b43/lp0initvals14.fw
%ghost %{_firmwaredir}/b43/lp0initvals15.fw
%ghost %{_firmwaredir}/b43/lp0initvals16.fw
%ghost %{_firmwaredir}/b43/n0absinitvals11.fw
%ghost %{_firmwaredir}/b43/n0bsinitvals11.fw
%ghost %{_firmwaredir}/b43/n0bsinitvals16.fw
%ghost %{_firmwaredir}/b43/n0initvals11.fw
%ghost %{_firmwaredir}/b43/n0initvals16.fw
%ghost %{_firmwaredir}/b43/pcm5.fw
%ghost %{_firmwaredir}/b43/sslpn0bsinitvals16.fw
%ghost %{_firmwaredir}/b43/sslpn0initvals16.fw
%ghost %{_firmwaredir}/b43/sslpn1bsinitvals20.fw
%ghost %{_firmwaredir}/b43/sslpn1initvals20.fw
%ghost %{_firmwaredir}/b43/sslpn2bsinitvals17.fw
%ghost %{_firmwaredir}/b43/sslpn2bsinitvals19.fw
%ghost %{_firmwaredir}/b43/sslpn2initvals17.fw
%ghost %{_firmwaredir}/b43/sslpn2initvals19.fw
%ghost %{_firmwaredir}/b43/sslpn4bsinitvals22.fw
%ghost %{_firmwaredir}/b43/sslpn4initvals22.fw
%ghost %{_firmwaredir}/b43/ucode11.fw
%ghost %{_firmwaredir}/b43/ucode13.fw
%ghost %{_firmwaredir}/b43/ucode14.fw
%ghost %{_firmwaredir}/b43/ucode15.fw
%ghost %{_firmwaredir}/b43/ucode16_lp.fw
%ghost %{_firmwaredir}/b43/ucode16_mimo.fw
%ghost %{_firmwaredir}/b43/ucode16_sslpn.fw
%ghost %{_firmwaredir}/b43/ucode16_sslpn_nobt.fw
%ghost %{_firmwaredir}/b43/ucode17.fw
%ghost %{_firmwaredir}/b43/ucode19.fw
%ghost %{_firmwaredir}/b43/ucode20.fw
%ghost %{_firmwaredir}/b43/ucode22_sslpn.fw
%ghost %{_firmwaredir}/b43/ucode5.fw
%ghost %{_firmwaredir}/b43/ucode9.fw
# ghost b43legacy firmware
%ghost %{_firmwaredir}/b43legacy/a0g0bsinitvals2.fw
%ghost %{_firmwaredir}/b43legacy/a0g0bsinitvals5.fw
%ghost %{_firmwaredir}/b43legacy/a0g0initvals2.fw
%ghost %{_firmwaredir}/b43legacy/a0g0initvals5.fw
%ghost %{_firmwaredir}/b43legacy/a0g1bsinitvals5.fw
%ghost %{_firmwaredir}/b43legacy/a0g1initvals5.fw
%ghost %{_firmwaredir}/b43legacy/b0g0bsinitvals2.fw
%ghost %{_firmwaredir}/b43legacy/b0g0bsinitvals5.fw
%ghost %{_firmwaredir}/b43legacy/b0g0initvals2.fw
%ghost %{_firmwaredir}/b43legacy/b0g0initvals5.fw
%ghost %{_firmwaredir}/b43legacy/pcm4.fw
%ghost %{_firmwaredir}/b43legacy/pcm5.fw
%ghost %{_firmwaredir}/b43legacy/ucode11.fw
%ghost %{_firmwaredir}/b43legacy/ucode2.fw
%ghost %{_firmwaredir}/b43legacy/ucode4.fw
%ghost %{_firmwaredir}/b43legacy/ucode5.fw
%changelog

64
install_bcm43xx_firmware Normal file
View File

@ -0,0 +1,64 @@
#!/bin/sh
#
# install_bcm43xx_firmware
#
# This script tries to download and install the firmware needed to run
# WLAN cards using Broadcom's bcm43xx chips.
# firmware for b43
URL1=http://www.lwfinger.com/b43-firmware
FILE1=broadcom-wl-6.30.163.46.tar.bz2
FIRMWARE1=broadcom-wl-6.30.163.46.wl_apsta.o
# firmware for b43legacy
URL2=http://downloads.openwrt.org/sources
FILE2=wl_apsta-3.130.20.0.o
test -z "$( type -p curl)" && { echo "'curl' is not installed, aborting. Please install 'curl' and try again."; exit 1; }
test -z "$( type -p b43-fwcutter)" && { echo "'b43-fwcutter' is not installed, aborting. Please install 'b43-fwcutter' and try again."; exit 1; }
test -d /lib/firmware || mkdir -p /lib/firmware
TMPDIR=$(mktemp -d /var/tmp/bcm.XXXXXX) || exit 1
cd $TMPDIR
echo "Downloading b43 firmware"
curl -# -f -o $FILE1 $URL1/$FILE1
if [ $? -eq 0 ];then
echo "Extracting b43 firmware"
tar xjf $FILE1
b43-fwcutter -w /lib/firmware $FIRMWARE1
else
echo "Could not download b43 firmware. Please look at /usr/share/doc/packages/b43-fwcutter/README."
fi
echo
echo "Downloading b43legacy firmware"
curl -# -f -o $FILE2 $URL2/$FILE2
if [ $? -eq 0 ];then
echo "Extracting b43legacy firmware"
b43-fwcutter -w /lib/firmware $FILE2
else
echo "Could not download b43legacy firmware. Please look at /usr/share/doc/packages/b43-fwcutter/README."
fi
echo
if [ -d /lib/firmware/b43 ] ; then
echo "b43 firmware successfully installed."
/sbin/modprobe -r b43
/sbin/modprobe b43
else
echo "b43 firmware installation failed."
fi
if [ -d /lib/firmware/b43legacy ] ; then
echo "b43legacy firmware successfully installed."
/sbin/modprobe -r b43legacy
/sbin/modprobe b43legacy
else
echo "b43legacy firmware installation failed."
fi
cd - >/dev/null
rm -rf $TMPDIR
exit 0