main/firmware-pine64-rtl8723bt: new aport (MR 5604)

This partially reverts 06edc589e7
"main/firmware-pine64-rtl8723bt: drop (MR 5582)" because the linux-firmware
fw breaks bluetooth on the pine64-pinephone 1.2b.

Specifically the cs_fw.bin from linux-firmware works but not
the cs_xx_config.bin, so this restored package provides just the latter.

The original package provided bs_config.bin also. The BS is used by
the pine64-a64-lts and pine64-dontbeevil, but I don't have those devices to
know for sure whether they work with linux-firmware's fw or not. So for now
this commit only restores the cs_config.bin and only updates
pine64-pinephone and pine64-pinetab to pull it in.

Ref: #3179

[ci:skip-vercheck] Restoring package with pkgrel one higher than the deleted
package.
[ci:skip-build]: already built successfully in CI
This commit is contained in:
Arnav Singh 2024-09-16 20:47:18 -07:00 committed by Pablo Correa Gómez
parent 5fb74a56ac
commit dd3d96300c
No known key found for this signature in database
GPG Key ID: 7A342565FF635F79
3 changed files with 57 additions and 3 deletions

View File

@ -3,7 +3,7 @@
# Co-Maintainer: Jan Jasper de Kroon <jajadekroon@gmail.com>
pkgname=device-pine64-pinephone
pkgver=4
pkgrel=1
pkgrel=2
pkgdesc="PINE64 PinePhone"
url="https://postmarketos.org"
license="MIT"
@ -168,6 +168,7 @@ nonfree_firmware() {
linux-firmware-rtlwifi
linux-firmware-rtl_bt
firmware-pine64-ov5640
firmware-pine64-rtl8723bt
"
mkdir "$subpkgdir"
}

View File

@ -0,0 +1,53 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=firmware-pine64-rtl8723bt
pkgver=0_git20200705
pkgrel=3
_commit="8840b1052b4ee426f348cb35e4994c5cafc5fbbd"
pkgdesc="Firmware for rtl8723cs"
# Also available at https://megous.com/git/linux-firmware/tree/rtl_bt
# Possibly originally came from https://github.com/armbian/build/tree/main/packages/blobs/rtl8723bt_fw
url="https://github.com/anarsoul/rtl8723bt-firmware/"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
source="https://github.com/anarsoul/rtl8723bt-firmware/archive/$_commit/rtl8723bt-firmware-$_commit.tar.gz"
subpackages="$pkgname-doc"
builddir="$srcdir/rtl8723bt-firmware-$_commit"
package() {
install -d "$pkgdir/lib/firmware/rtl_bt"
# The anarsoul repo provides rtl8723bs_config.bin, rtl8723cs_xx_fw.bin and rtl8723cs_xx_config.bin
# linux-firmware in aports provides all three too, but different versions.
# In particular, linux-firmware's rtl8723cs_xx_fw.bin is extracted from RealTek's Windows driver for the RTL8723BS,
# and its rtl8723cs_xx_config.bin is symlinked to rtl8723bs_config.bin because the submitter says
# the BS's _config.bin also works for the CS.
#
# However at least on the PinePhone 1.2b (that uses the CS) that last statement is not true.
# The combination of anarsoul _fw.bin + anarsoul _config.bin works, as well as
# the combination of linux-firmware _fw.bin + anarsoul _config.bin, but
# the combination of linux_firmware _fw.bin + linux-firmware _config.bin does not.
#
# Until this is resolved, this package provides just the rtl8723cs_xx_config.bin
# from the anarsoul repo.
#
# Note that linux-firmware specifically provides a `rtl8723cs_xx_config.bin.zst`, and the kernel loads
# `.bin`, `.bin.zst` and `.bin.xz` in that order, so we need to provide either `.bin` or `.bin.zst`
# to ensure that our firmware gets loaded and not linux-firmware's. The uncompressed file is small enough that
# zstd'ing it actually increases its file size, so we leave it uncompressed. This also means that
# we *don't* need to annotate this package with `replaces="linux-firmware"`.
#
# Ref:
#
# - https://gitlab.com/postmarketOS/pmaports/-/issues/3179
#
# - https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=ed9c1349f8ebae720f3572ad3e74af59bfe345d7
for f in rtl_bt/rtl8723cs_xx_config.bin; do
install -Dm644 "$f" "$pkgdir/lib/firmware/$f"
done
install -Dm644 LICENCE.rtlwifi_firmware.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
sha512sums="46941d893c6ce132aad9689263b5a558675ff6e4480881ffa61d192b312e9a8deb45932f613106ce025d8f54eebceed6790b32e7fe8c25f42f105fe97ce8fc82 rtl8723bt-firmware-8840b1052b4ee426f348cb35e4994c5cafc5fbbd.tar.gz"

View File

@ -3,7 +3,7 @@
pkgname=device-pine64-pinetab
pkgdesc="PINE64 PineTab"
pkgver=1
pkgrel=3
pkgrel=4
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -140,7 +140,7 @@ package() {
nonfree_firmware() {
pkgdesc="Bluetooth Firmware"
depends="linux-firmware-rtl_bt"
depends="linux-firmware-rtl_bt firmware-pine64-rtl8723bt"
mkdir "$subpkgdir"
}