temp/linux-firmware: update to latest and add rpi 3b+ Wi-Fi firmware (#1537)
This commit is contained in:
parent
3d349a2508
commit
80fea8781e
1 changed files with 108 additions and 0 deletions
108
temp/linux-firmware/APKBUILD
Normal file
108
temp/linux-firmware/APKBUILD
Normal file
|
@ -0,0 +1,108 @@
|
|||
# Forked from Alpine to update and include raspberry pi 3B+ Wi-Fi firmware
|
||||
# Contributor: He Yangxuan <yangxuan8282@gmail.com>
|
||||
pkgname=linux-firmware
|
||||
pkgver=20180417
|
||||
pkgrel=1
|
||||
pkgdesc="firmware files for linux"
|
||||
#url="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary"
|
||||
url="http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
|
||||
arch="all"
|
||||
license="custom:multiple"
|
||||
makedepends=
|
||||
install=""
|
||||
replaces="linux-grsec linux-vserver"
|
||||
options="!strip !check"
|
||||
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-${pkgver}.tar.gz
|
||||
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43430-sdio.txt
|
||||
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43430-sdio.bin
|
||||
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.bin
|
||||
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.clm_blob
|
||||
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.txt
|
||||
"
|
||||
|
||||
_giturl="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
|
||||
_upload=dev.alpinelinux.org:/archive/$pkgname/
|
||||
|
||||
_builddir="$srcdir"/$pkgname-$pkgver
|
||||
|
||||
# Put /lib/firmware/* folders in subpackages
|
||||
_folders="3com acenic adaptec advansys amd-ucode amdgpu ar3k ath10k ath6k
|
||||
ath9k_htc atmel atusb av7110 bnx2 bnx2x brcm carl9170fw cavium cis cpia2 cxgb3
|
||||
cxgb4 dabusb dsp56k e100 edgeport emi26 emi62 ene-ub6250 ess go7007 i915 imx
|
||||
intel isci kaweth keyspan keyspan_pda korg libertas liquidio matrox mellanox
|
||||
moxa mrvl mwl8k mwlwifi myricom netronome nvidia ositech qca qcom qed qlogic
|
||||
r128 radeon rockchip rsi rtl8192e rtl_bt rtl_nic rtlwifi sb16 slicoss sun sxg
|
||||
tehuti ti-connectivity ti-keystone tigon ttusb-budget ueagle-atm vicam vxge yam
|
||||
yamaha"
|
||||
subpackages="$pkgname-other"
|
||||
depends="linux-firmware-other"
|
||||
for i in $_folders; do
|
||||
subpackages="$pkgname-$i:folder $subpackages"
|
||||
depends="$pkgname-$i $depends"
|
||||
done
|
||||
|
||||
snapshot() {
|
||||
local _date=$(date +%Y%m%d)
|
||||
local _pkg=$pkgname-$_date.tar.gz
|
||||
mkdir -p "$srcdir"
|
||||
cd "$srcdir"
|
||||
rm -rf "$pkgname"
|
||||
git clone --depth=1 --bare $_giturl
|
||||
git --git-dir ${_giturl##*/} archive -o $_pkg \
|
||||
--prefix=$pkgname-$_date/ HEAD
|
||||
msg "New snapshot: $_pkg"
|
||||
if [ -n "$_upload" ]; then
|
||||
msg "Uploading to $_upload"
|
||||
scp $_pkg $_upload && abump $pkgname-$_date
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${_builddir}"
|
||||
make DESTDIR="${pkgdir}" FIRMWAREDIR="/lib/firmware" install
|
||||
for i in brcmfmac43430-sdio.txt brcmfmac43430-sdio.bin brcmfmac43455-sdio.bin brcmfmac43455-sdio.clm_blob brcmfmac43455-sdio.txt ; do
|
||||
install -Dm 644 "$srcdir/$i" "$pkgdir/lib/firmware/brcm/$i"
|
||||
done
|
||||
rm -f "${pkgdir}/usr/lib/firmware/{Makefile,README,configure,GPL-3}"
|
||||
}
|
||||
|
||||
folder() {
|
||||
local folder=${subpkgname##linux-firmware-}
|
||||
pkgdesc="firmware files for linux ($folder folder)"
|
||||
depends=""
|
||||
|
||||
# Move /lib/firmware/$folder (case insensitive)
|
||||
mkdir -p "$subpkgdir/lib/firmware"
|
||||
mv "$(find "$pkgdir/lib/firmware" -iname "$folder" -type d)" \
|
||||
"$subpkgdir/lib/firmware"
|
||||
}
|
||||
|
||||
other() {
|
||||
# Requires subfolders to be split in subpackages
|
||||
local leftover=""
|
||||
local i
|
||||
for i in "$pkgdir"/lib/firmware/*; do
|
||||
[ -d "$i" ] && leftover="$leftover $(basename $i)"
|
||||
done
|
||||
if [ "$leftover" != "" ]; then
|
||||
local fixed
|
||||
error "Not all subfolders have been moved to subpackages!"
|
||||
error "Fix this by adjusting _folders as follows:"
|
||||
fixed="$(echo $_folders$leftover | tr " " "\n" | tr '[A-Z]' '[a-z]' | sort)"
|
||||
echo "_folders=\"$(printf "$fixed" | tr "\n" " ")\"" | fold -s
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Move /lib/firmware (which doesn't have subfolders now)
|
||||
pkgdesc="firmware files for linux (uncategorized)"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/
|
||||
mv "$pkgdir"/lib "$subpkgdir"/
|
||||
}
|
||||
|
||||
sha512sums="05379d327e5f986607bbca87dc81eef4a3c894556854464f0134a52692116b161d68c41de9d838290c4bba617322ea7043aefe81ca457e52e57922f73210b2d7 linux-firmware-20180417.tar.gz
|
||||
d3c9ae08bbb2323b4737d65a0416702c92eb52f9c395c8da6be00eb2f1d68efcb2dcb88e357adaf2130dafab32378b13d0a56c37bb647af145e5029e23744e08 brcmfmac43430-sdio.txt
|
||||
6c60b5c6df7265b9daa5dad6e409ed27fa8f4d3b2e80500d5af73d47dba9d00b2e384f43f086cb3d6b594412463857733bce78af623c573a200308508321bb25 brcmfmac43430-sdio.bin
|
||||
7d3cf1a98c150aee10290edfd9bfb1fc30a7aa2ae23cd7b7f56822758334995bf24a9a0d81ef00fe5670c69940b82def890f404d93d8dc4c330ee21e90dba1fb brcmfmac43455-sdio.bin
|
||||
a32cd00a1b3f6d10d3bc6fa15e6c5ae167e90514e9f9436bd3796f9c7df6135cbaa580c56ad236982ff0ca815e6c04b12495ba370308049c98dfbba808985862 brcmfmac43455-sdio.clm_blob
|
||||
901d839f6cb14512902584d75e5c6c1738cb7712ce701d1b57264d64dd084080a293c7326fa347c544b571ea0f8113304ebe048ec907546f07fe42891f357c47 brcmfmac43455-sdio.txt"
|
Loading…
Reference in a new issue