xiaomi-wt88047: use msm-firmware-loader (MR 2431)
Switch to automatic firmware loading to handle regional variants of the device automatically.
This commit is contained in:
parent
a1688878a2
commit
e24dc38ce5
3 changed files with 12 additions and 62 deletions
|
@ -2,8 +2,8 @@
|
|||
# Maintainer: Minecrell <minecrell@minecrell.net>
|
||||
pkgname=device-xiaomi-wt88047
|
||||
pkgdesc="Xiaomi Redmi 2"
|
||||
pkgver=2
|
||||
pkgrel=4
|
||||
pkgver=5
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
|
@ -13,11 +13,8 @@ makedepends="devicepkg-dev"
|
|||
source="deviceinfo"
|
||||
subpackages="
|
||||
$pkgname-kernel-mainline:kernel_mainline
|
||||
$pkgname-kernel-mainline-modem-wt86047:kernel_mainline_modem_wt86047
|
||||
$pkgname-kernel-mainline-modem-wt88047:kernel_mainline_modem_wt88047
|
||||
$pkgname-kernel-mainline-modem:kernel_mainline_modem
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-nonfree-firmware-modem-wt86047:nonfree_firmware_modem_wt86047
|
||||
$pkgname-nonfree-firmware-modem-wt88047:nonfree_firmware_modem_wt88047
|
||||
"
|
||||
|
||||
build() {
|
||||
|
@ -34,41 +31,22 @@ kernel_mainline() {
|
|||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
# wt86047 (Chinese variant) and wt88047 (global variant) need different
|
||||
# modem firmware, otherwise they are pretty much the same.
|
||||
|
||||
kernel_mainline_modem_wt86047() {
|
||||
pkgdesc="Close to mainline kernel (wt86047 (China), non-free modem, audio routed through ADSP)"
|
||||
depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916-modem"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
kernel_mainline_modem_wt88047() {
|
||||
pkgdesc="Close to mainline kernel (wt88047 (global), non-free modem, audio routed through ADSP)"
|
||||
kernel_mainline_modem() {
|
||||
pkgdesc="Close to mainline kernel (non-free modem, audio routed through ADSP)"
|
||||
depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916-modem"
|
||||
replaces="kernel-mainline-modem-wt86047 kernel-mainline-modem-wt88047"
|
||||
for pkg in $replaces; do provides="$provides $pkg=$pkgver-r$pkgrel"; done
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="GPU/WiFi/BT/Video(/Modem) firmware"
|
||||
depends="linux-firmware-qcom firmware-qcom-msm8916-wcnss firmware-xiaomi-wt88047-wcnss-nv"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
nonfree_firmware_modem_wt86047() {
|
||||
pkgdesc="Modem firmware (WT86047)"
|
||||
depends="firmware-xiaomi-wt86047-modem"
|
||||
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem-wt86047"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
nonfree_firmware_modem_wt88047() {
|
||||
pkgdesc="Modem firmware (WT88047)"
|
||||
depends="firmware-xiaomi-wt88047-modem"
|
||||
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem-wt88047"
|
||||
depends="linux-firmware-qcom msm-firmware-loader firmware-qcom-msm8916-wcnss firmware-xiaomi-wt88047-wcnss-nv"
|
||||
replaces="nonfree-firmware-modem-wt86047 nonfree-firmware-modem-wt88047"
|
||||
for pkg in $replaces; do provides="$provides $pkg=$pkgver-r$pkgrel"; done
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5a17f98714fb1cd7b9ab56b42a0a9f5bbbd558d01e5776b5edde9cb82859680763ba496641781143e7476522f391dfb72dd8ea9ea4e01682979bc72e55678316 deviceinfo
|
||||
ae3d5a33bcc544b89910e79347745bda3ca638261fab4ecebeb4026a2dab61684db8aee1c33468b8f2211c7761336d43547a2868f6db9f1a6a26fb961d7e4804 deviceinfo
|
||||
"
|
||||
|
|
|
@ -7,8 +7,7 @@ deviceinfo_manufacturer="Xiaomi"
|
|||
deviceinfo_codename="xiaomi-wt88047"
|
||||
deviceinfo_year="2015"
|
||||
deviceinfo_dtb_mainline="qcom/msm8916-wingtech-wt88047"
|
||||
deviceinfo_dtb_mainline_modem_wt86047="qcom/msm8916-wingtech-wt88047-modem"
|
||||
deviceinfo_dtb_mainline_modem_wt88047="qcom/msm8916-wingtech-wt88047-modem"
|
||||
deviceinfo_dtb_mainline_modem="qcom/msm8916-wingtech-wt88047-modem"
|
||||
deviceinfo_append_dtb="true"
|
||||
deviceinfo_modules_initfs="smb1360 panel-wingtech-auo-r61308 panel-wingtech-boe-nt35521s panel-wingtech-ebbg-otm1285a panel-wingtech-sharp-r69431 msm edt-ft5x06"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
pkgname=firmware-xiaomi-wt86047-modem
|
||||
pkgver=20161223
|
||||
pkgrel=0
|
||||
pkgdesc="Xiaomi Redmi 2 (wt86047) modem firmware"
|
||||
url="https://androidfilehost.com/?w=files&flid=303434"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
||||
makedepends="mtools"
|
||||
source="https://archive.org/download/lineage-15.1-20200223-nightly-wt88047-signed_202004/wt86047-firmware_20161223.zip"
|
||||
|
||||
_fwdir="/lib/firmware/postmarketos"
|
||||
|
||||
unpack() {
|
||||
default_unpack
|
||||
|
||||
# Extract firmware files from FAT file system image
|
||||
mcopy -i firmware-update/NON-HLOS.bin -p -m -v \
|
||||
::image/mba.mbn ::image/modem.* "$srcdir"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir"/mba.mbn -t "$pkgdir/$_fwdir"
|
||||
install -Dm644 "$srcdir"/modem.* -t "$pkgdir/$_fwdir"
|
||||
}
|
||||
|
||||
sha512sums="7960acd95e296c41c82a3c3f7a6733ddeac31c484f812d57ce7a2cf5f811721f099fe57af45bae217d543f57930f4329d5613eac45fd0fc867f24273106181db wt86047-firmware_20161223.zip"
|
Loading…
Reference in a new issue