From 1f10b9d7e7cc6df2b976a81f8d1af829c4530d5ab1d2a8cbe34e0e0337005677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 12 Jun 2017 13:14:21 +0000 Subject: [PATCH] Accepting request 503085 from home:a_faerber:branches:hardware Add Supplements for Raspberry Pi 3 (bsc#1041823) and clean up compatible handling OBS-URL: https://build.opensuse.org/request/show/503085 OBS-URL: https://build.opensuse.org/package/show/hardware/bcm43xx-firmware?expand=0&rev=13 --- bcm43xx-firmware.changes | 7 +++++++ bcm43xx-firmware.spec | 5 ++++- install-brcmfmac.sh | 44 +++++++++++++++++++++------------------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/bcm43xx-firmware.changes b/bcm43xx-firmware.changes index 30e3809..484a818 100644 --- a/bcm43xx-firmware.changes +++ b/bcm43xx-firmware.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jun 12 12:24:22 UTC 2017 - afaerber@suse.de + +- Add Supplements for Raspberry Pi 3 (bsc#1041823) +- Resolve NUL char warning on modprobe for Tumbleweed by properly + iterating over zero-separated DT compatible strings + ------------------------------------------------------------------- Mon Apr 10 14:06:29 UTC 2017 - afaerber@suse.de diff --git a/bcm43xx-firmware.spec b/bcm43xx-firmware.spec index 43ea4a5..e6a06b4 100644 --- a/bcm43xx-firmware.spec +++ b/bcm43xx-firmware.spec @@ -49,11 +49,14 @@ BuildRequires: suse-module-tools BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Requires: kernel-firmware +# Raspberry Pi 3 Model B +Supplements: modalias(sdio:c*v02D0dA9A6*) %description This package provides the firmware files needed for the Broadcom (now Cypress) BCM43430 Wifi+Bluetooth chipset -as well as NVRAM config files for BCM43362 and BCM43430. +as well as NVRAM config files for BCM43362, BCM43430 and +further related chipsets. %prep %setup -q -c -T diff --git a/install-brcmfmac.sh b/install-brcmfmac.sh index 45c1ffa..712ade6 100644 --- a/install-brcmfmac.sh +++ b/install-brcmfmac.sh @@ -1,27 +1,29 @@ #!/bin/sh if [[ -e /sys/firmware/devicetree/base/compatible ]]; then - case "$(cat /sys/firmware/devicetree/base/compatible 2>/dev/null)" in - *lemaker,bananapro*) - ln -sf brcmfmac43362-sdio-bananapi-m1+.txt /lib/firmware/brcm/brcmfmac43362-sdio.txt - ;; - *sinovoip,bpi-m2*) - ln -sf brcmfmac43362-sdio-bananapi-m2.txt /lib/firmware/brcm/brcmfmac43362-sdio.txt - ;; - *cubietech,cubietruck*) - ln -sf brcmfmac43362-sdio-cubietruck.txt /lib/firmware/brcm/brcmfmac43362-sdio.txt - ;; - *solidrun,cubox-i*) - ln -sf brcmfmac4329-sdio-cubox-i.txt /lib/firmware/brcm/brcmfmac4329-sdio.txt - ln -sf brcmfmac4330-sdio-cubox-i.txt /lib/firmware/brcm/brcmfmac4330-sdio.txt - ;; - *raspberrypi,3-model-b*) - ln -sf brcmfmac43430-sdio-raspberrypi3b.txt /lib/firmware/brcm/brcmfmac43430-sdio.txt - ;; - *tronsmart,vega-s95-telos*) - ln -sf brcmfmac4339-sdio-vega-s95-telos.txt /lib/firmware/brcm/brcmfmac4339-sdio.txt - ;; - esac + while IFS= read -r -d '' compatible; do + case "$compatible" in + lemaker,bananapro) + ln -sf brcmfmac43362-sdio-bananapi-m1+.txt /lib/firmware/brcm/brcmfmac43362-sdio.txt + ;; + sinovoip,bpi-m2) + ln -sf brcmfmac43362-sdio-bananapi-m2.txt /lib/firmware/brcm/brcmfmac43362-sdio.txt + ;; + cubietech,cubietruck) + ln -sf brcmfmac43362-sdio-cubietruck.txt /lib/firmware/brcm/brcmfmac43362-sdio.txt + ;; + solidrun,cubox-i) + ln -sf brcmfmac4329-sdio-cubox-i.txt /lib/firmware/brcm/brcmfmac4329-sdio.txt + ln -sf brcmfmac4330-sdio-cubox-i.txt /lib/firmware/brcm/brcmfmac4330-sdio.txt + ;; + raspberrypi,3-model-b) + ln -sf brcmfmac43430-sdio-raspberrypi3b.txt /lib/firmware/brcm/brcmfmac43430-sdio.txt + ;; + tronsmart,vega-s95-telos) + ln -sf brcmfmac4339-sdio-vega-s95-telos.txt /lib/firmware/brcm/brcmfmac4339-sdio.txt + ;; + esac + done < /sys/firmware/devicetree/base/compatible fi /usr/sbin/modprobe --ignore-install brcmfmac "$@" || exit $?