firmware-htc-memul: move firmware to device-specific subdirectory (MR 4745)

In mainline Linux these paths will be used, move the firmware packaging
there. By doing this we drop downstream support. Support could be
restored by adding some symlinks in a downstream-specific package if
required.

We also start squashing the firmware into .mbn format with pil-squasher.

For now we keep the files in _wififiles in their old location, I'm not
sure yet where they need to go since I didn't have wcnss working on
mainline yet.
This commit is contained in:
Luca Weiss 2024-01-20 19:01:19 +01:00 committed by Pablo Correa Gomez
parent 28d7319042
commit 0e7f627641

View file

@ -1,11 +1,16 @@
pkgname=firmware-htc-memul
pkgver=1
pkgrel=0
pkgrel=1
pkgdesc="Firmware for HTC One Mini 2"
subpackages="$pkgname-adsp $pkgname-modem $pkgname-wcnss"
url="https://postmarketos.org"
subpackages="
$pkgname-adsp
$pkgname-modem
$pkgname-wcnss
"
url="https://github.com/FairBlobs/memul-firmware"
arch="armv7"
license="proprietary"
makedepends="pil-squasher"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
# Sources
@ -19,36 +24,39 @@ for _i in $_wififiles; do
done
builddir="$srcdir/memul-firmware-$_fw_commit"
build() {
for i in *.mdt; do
pil-squasher "$(basename "$i" .mdt)".mbn "$i"
done
}
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
adsp() {
pkgdesc="HTC One Mini 2 aDSP firmware"
pkgdesc="HTC One Mini 2 - ADSP firmware"
cd "$builddir"
for _i in adsp.*; do
install -Dm644 $_i "$subpkgdir"/lib/firmware/postmarketos/$_i
done
install -Dm644 "$builddir"/adsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/msm8926/memul/"
}
modem() {
pkgdesc="HTC One Mini 2 modem firmware"
pkgdesc="HTC One Mini 2 - Modem firmware"
cd "$builddir"
for _i in modem.* mba.*; do
install -Dm644 $_i "$subpkgdir"/lib/firmware/postmarketos/$_i
done
install -Dm644 "$builddir"/mba.mbn -t \
"$subpkgdir/lib/firmware/qcom/msm8926/memul/"
install -Dm644 "$builddir"/modem.mbn -t \
"$subpkgdir/lib/firmware/qcom/msm8926/memul/"
}
wcnss() {
pkgdesc="HTC One Mini 2 Wireless Connectivity Subsystem (WCNSS) firmware"
pkgdesc="HTC One Mini 2 - WCNSS firmware"
install -Dm644 "$builddir"/wcnss.mbn -t \
"$subpkgdir/lib/firmware/qcom/msm8926/memul/"
cd "$builddir"
for _i in wcnss.*; do
install -Dm644 $_i "$subpkgdir"/lib/firmware/postmarketos/$_i
done
for _i in $_wififiles; do
install -Dm644 "$srcdir/$pkgname-$_dt_commit-$_i" \
"$subpkgdir/lib/firmware/postmarketos/wlan/prima/$_i"