device-raspberry-pi: use linux-firmware-brcm (#1583)
Alpine's firmware packages have been updated to include the latest raspberry pi firmware. This commit adjusts our aports. Details: * remove obsolete `aports/temp/linux-firmware` * `firmware/firmware-pi-bluetooth`: rename to `device/bluetooth-raspberry-pi` and remove firmware files (they are part of Alpine's `linux-firmware` now) * `device-raspberry-pi`: depend on `bluetooth-raspberry-pi` * `device-raspberry-pi`: note that Alpine's kernels depend non free firmware * `device-raspberry-pi`: remove non free firmware subpackage
This commit is contained in:
parent
eecc47a3e9
commit
9c777b2a6a
7 changed files with 25 additions and 155 deletions
22
device/bluetooth-raspberry-pi/APKBUILD
Normal file
22
device/bluetooth-raspberry-pi/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Maintainer: He Yangxuan <yangxuan8282@gmail.com>
|
||||
|
||||
pkgname=bluetooth-raspberry-pi
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Service and udev rule for built-in bluetooth on Raspberry Pi zero w, 3B, 3B plus"
|
||||
url="https://github.com/RPi-Distro/bluez-firmware"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="bluez bluez-deprecated"
|
||||
install="$pkgname.post-install"
|
||||
source="pi-bluetooth.openrc 50-bluetooth-hci-auto-poweron.rules"
|
||||
options="!check"
|
||||
|
||||
package() {
|
||||
cd "$srcdir"
|
||||
install -Dm644 50-bluetooth-hci-auto-poweron.rules "$pkgdir"/etc/udev/rules.d/50-bluetooth-hci-auto-poweron.rules
|
||||
install -Dm755 pi-bluetooth.openrc "$pkgdir"/etc/init.d/pi-bluetooth
|
||||
}
|
||||
|
||||
sha512sums="34a50554466dd6096cbee9b14fc0d77b268b731cd45981e69394343dad25d6006dbe44bee30700d71b80c593d38699dfc870983ae7d862b9c09afb39c5d3b383 pi-bluetooth.openrc
|
||||
511281ae8cbebd4390836ba83049a7fb793121d60ebd6c436bf36330e0aab738a827daf7fd6721cc71681e72b7ddaa581814264cc3bf759f07148fe5b657b981 50-bluetooth-hci-auto-poweron.rules"
|
|
@ -2,7 +2,7 @@
|
|||
pkgname="device-raspberry-pi"
|
||||
pkgdesc="Raspberry Pi"
|
||||
pkgver=0.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
|
@ -12,7 +12,6 @@ makedepends="devicepkg-dev"
|
|||
subpackages="
|
||||
$pkgname-kernel-rpi:kernel_rpi
|
||||
$pkgname-kernel-rpi2:kernel_rpi2
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
"
|
||||
source="deviceinfo config.txt usercfg.txt cmdline.txt 95-vchiq-permissions.rules"
|
||||
|
||||
|
@ -30,25 +29,19 @@ package() {
|
|||
}
|
||||
|
||||
kernel_rpi() {
|
||||
pkgdesc="Kernel for the Raspberry Pi Zero & 1"
|
||||
pkgdesc="Kernel for the Raspberry Pi Zero & 1 (from Alpine, depends on non free firmware!)"
|
||||
depends="$pkgname linux-rpi"
|
||||
install="$subpkgname.post-install"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
kernel_rpi2() {
|
||||
pkgdesc="Kernel for the Raspberry Pi 2 & 3"
|
||||
pkgdesc="Kernel for the Raspberry Pi 2 & 3 (from Alpine, depends on non free firmware!)"
|
||||
depends="$pkgname linux-rpi2"
|
||||
install="$subpkgname.post-install"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Bluetooth firmware for raspberry pi zero w, 3b/3b+"
|
||||
depends="firmware-pi-bluetooth"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="1ddb6af2598a9990f8b7348d8dfff40c46cc40a254b2a42ac47889e6c6e9af9b7639067cabfbecf66bc05c4d6e9543335caa10ac391a19a345da4a9731683e74 deviceinfo
|
||||
de4d6967be7f68d0b005ab968e6f8da2eacf4ba2d814d1f47ed6ad43ba81cacc1fdc74b3ba3a44b5ae6f08c51b53708432afb5779422b977b65ae69a5a4bf068 config.txt
|
||||
e94c810f973eb6b6d0fb3687ea1d70612ba00e9c5d6b3608390a161e077c5591fd9d232c37b42443c05ed28bb639ca1754422ff35899c5e33d7fc266e0e1ad05 usercfg.txt
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# Maintainer: He Yangxuan <yangxuan8282@gmail.com>
|
||||
|
||||
pkgname=firmware-pi-bluetooth
|
||||
pkgver=1
|
||||
pkgrel=1
|
||||
_commit=ade2bae1aaaebede09abb8fb546f767a0e4c7804
|
||||
pkgdesc="Services, firmware to make built-in bluetooth work on Raspberry Pi zero w, 3B, 3B plus"
|
||||
url="https://github.com/RPi-Distro/bluez-firmware"
|
||||
arch="armhf"
|
||||
license="multiple"
|
||||
depends="bluez bluez-deprecated"
|
||||
install="$pkgname.post-install"
|
||||
source="$url/raw/$_commit/broadcom/BCM43430A1.hcd
|
||||
$url/raw/$_commit/broadcom/BCM4345C0.hcd
|
||||
https://github.com/RPi-Distro/firmware-nonfree/raw/master/LICENCE.broadcom_bcm43xx
|
||||
pi-bluetooth.openrc
|
||||
50-bluetooth-hci-auto-poweron.rules
|
||||
$install"
|
||||
options="!check"
|
||||
|
||||
package() {
|
||||
cd "$srcdir"
|
||||
|
||||
mkdir -p "$pkgdir"/lib/firmware/brcm
|
||||
|
||||
cp *.hcd "$pkgdir"/lib/firmware/brcm/
|
||||
install -Dm644 50-bluetooth-hci-auto-poweron.rules "$pkgdir"/etc/udev/rules.d/50-bluetooth-hci-auto-poweron.rules
|
||||
install -Dm755 pi-bluetooth.openrc "$pkgdir"/etc/init.d/pi-bluetooth
|
||||
install -Dm644 LICENCE.broadcom_bcm43xx "$pkgdir"/usr/share/licenses/$pkgname/LICENCE.broadcom_bcm43xx
|
||||
}
|
||||
|
||||
sha512sums="a7b37bce092367125e390017bb0329c3b7f8fa891cf30d422ee73ce53d0592d4ff0fc2e2a94a87eefb641d5dd8631fae1cc46664224dea987ca04b68a8af8519 BCM43430A1.hcd
|
||||
2e91c6e7f79fa5c33bc103614311656631b4c595e5a25cdbee048aa810244f604b0bbae0e6f4e9294a0c332401f8347549a42424c19a27580b3cdc9f6b9f8e2c BCM4345C0.hcd
|
||||
bc2975793764bbd287f9f207d5b5abf49606dc65cfdebf1783e1e660f9872b409c4ab98287da9a3926aea657e00439f3f946d253e1cf7666a3a7e527543dc1a6 LICENCE.broadcom_bcm43xx
|
||||
34a50554466dd6096cbee9b14fc0d77b268b731cd45981e69394343dad25d6006dbe44bee30700d71b80c593d38699dfc870983ae7d862b9c09afb39c5d3b383 pi-bluetooth.openrc
|
||||
511281ae8cbebd4390836ba83049a7fb793121d60ebd6c436bf36330e0aab738a827daf7fd6721cc71681e72b7ddaa581814264cc3bf759f07148fe5b657b981 50-bluetooth-hci-auto-poweron.rules
|
||||
7741b6b560a6bea27da80c027bee55136e4873f535dd0261d0cf9670df250c1bd72b1fd92fc353381cec6f87056a9ad4cf5b3eea3f6c7b44cd23e12a1edc287a firmware-pi-bluetooth.post-install"
|
|
@ -1,108 +0,0 @@
|
|||
# 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 !tracedeps"
|
||||
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