From b2862114199c39e60f2b6fb0c8e838ac427e8acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Sun, 10 Sep 2023 16:57:44 +0200 Subject: [PATCH] xiaomi-daisy: switch to msm-firmware-loader and clean ups (MR 4434) It utilize msm-firmware-loader for minimize device specific firmware package. It add necessary modules to initramfs for fix fde. modem package has been removed in favor of soc-qcom-msm8953-modem. 30-gpu-firmware-files has been removed. --- .../device-xiaomi-daisy/30-gpu-firmware.files | 6 --- device/testing/device-xiaomi-daisy/APKBUILD | 42 ++++++++++--------- .../device-xiaomi-daisy/modules-initfs | 6 ++- device/testing/firmware-xiaomi-daisy/APKBUILD | 31 +++++--------- 4 files changed, 36 insertions(+), 49 deletions(-) delete mode 100644 device/testing/device-xiaomi-daisy/30-gpu-firmware.files diff --git a/device/testing/device-xiaomi-daisy/30-gpu-firmware.files b/device/testing/device-xiaomi-daisy/30-gpu-firmware.files deleted file mode 100644 index 3364b8f4c..000000000 --- a/device/testing/device-xiaomi-daisy/30-gpu-firmware.files +++ /dev/null @@ -1,6 +0,0 @@ -/lib/firmware/postmarketos/a506_zap.b00 -/lib/firmware/postmarketos/a506_zap.b01 -/lib/firmware/postmarketos/a506_zap.b02 -/lib/firmware/postmarketos/a506_zap.mdt -/lib/firmware/postmarketos/a530_pfp.fw -/lib/firmware/postmarketos/a530_pm4.fw diff --git a/device/testing/device-xiaomi-daisy/APKBUILD b/device/testing/device-xiaomi-daisy/APKBUILD index a70d409ff..10d7e5334 100644 --- a/device/testing/device-xiaomi-daisy/APKBUILD +++ b/device/testing/device-xiaomi-daisy/APKBUILD @@ -1,24 +1,28 @@ -# Maintainer: Alikates +# Maintainer: Alejandro Tafalla # Reference: pkgname=device-xiaomi-daisy pkgdesc="Xiaomi Mi A2 Lite" -pkgver=6 -pkgrel=4 +pkgver=7 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="aarch64" options="!check !archcheck" -depends="postmarketos-base mkbootimg soc-qcom-msm8953 linux-postmarketos-qcom-msm8953 lk2nd-msm8953" +depends=" + linux-postmarketos-qcom-msm8953 + lk2nd-msm8953 + mkbootimg + postmarketos-base + soc-qcom-msm8953 +" makedepends="devicepkg-dev" subpackages=" - $pkgname-nonfree-firmware:nonfree_firmware - $pkgname-modem - " + $pkgname-nonfree-firmware:nonfree_firmware +" source=" deviceinfo modules-initfs - 30-gpu-firmware.files - " +" build() { devicepkg_build $startdir $pkgname @@ -26,23 +30,21 @@ build() { package() { devicepkg_package $startdir $pkgname - install -Dm0644 "$srcdir"/30-gpu-firmware.files "$pkgdir"/usr/share/mkinitfs/files/30-gpu-firmware.files } nonfree_firmware() { - pkgdesc="Wi-Fi, ADSP Firmware" - depends="firmware-xiaomi-daisy" - mkdir "$subpkgdir" -} - -modem() { - depends="qrtr rmtfs rmtfs-openrc msm-modem-uim-selection" - install_if="$pkgname=$pkgver-r$pkgrel $pkgname-nonfree-firmware" + pkgdesc="Modem, WiFi, BT, ADSP, Venus and GPU Firmware" + depends=" + firmware-xiaomi-daisy + msm-firmware-loader + qbootctl + soc-qcom-msm8953-initramfs + soc-qcom-msm8953-modem + " mkdir "$subpkgdir" } sha512sums=" 8c5980c1da9e5bc91f11bb8056ac9a225cb84a90a42a964dc0dc2966220c105683081055fdcb1caa8c198019d8373d8c5fe27155429c17814d34075d5f961aa4 deviceinfo -cb1729cae5703aaf3aee069af5f3440b84d0958f4c3a9c5c027d4e6b62ca0792d2e09cbb9afb86e00e192cc29de41ebdc8365c09a1656867941acff098e07fb8 modules-initfs -302c0bec754bb79ef561c1a8d4ff34ba52b904c853bce6a15a79ba7b5b7a3d02c1c75bbe86d59be7b608a6dc744dd3e3c638eaa4539c53d20fa55fa5ea397d74 30-gpu-firmware.files +0a1d769e4e60aca37dc71bdde9e6befbe74c09d775e19788d18a07e06546cbddd46efc876df0a89073f0819c9cc66e319f398772dec75f537ec5b82aa3032002 modules-initfs " diff --git a/device/testing/device-xiaomi-daisy/modules-initfs b/device/testing/device-xiaomi-daisy/modules-initfs index 7e4ecaff1..2093ccdec 100644 --- a/device/testing/device-xiaomi-daisy/modules-initfs +++ b/device/testing/device-xiaomi-daisy/modules-initfs @@ -1,4 +1,6 @@ -msm +bam_dma edt_ft5x06 -panel_mdss_ili7807_fhdplus +msm panel_himax_hx8399c_fhdplus +panel_mdss_ili7807_fhdplus +panel_mdss_otm1911_fhdplus diff --git a/device/testing/firmware-xiaomi-daisy/APKBUILD b/device/testing/firmware-xiaomi-daisy/APKBUILD index e3115d37b..0b6b854a9 100644 --- a/device/testing/firmware-xiaomi-daisy/APKBUILD +++ b/device/testing/firmware-xiaomi-daisy/APKBUILD @@ -1,36 +1,25 @@ +# Maintainer: Alejandro Tafalla pkgname=firmware-xiaomi-daisy -pkgver=1 -pkgrel=1 +pkgver=2 +pkgrel=0 pkgdesc="Firmware files for Xiaomi Mi A2 Lite" url="https://postmarketos.org" arch="aarch64" license="proprietary" -depends="wcnss-wlan" _repository="firmware-xiaomi-daisy" _commit="9ae200b57743088f83a6f2b02a6b7ce4596a77d6" source="$pkgname-$_commit.tar.gz::https://github.com/alikates/firmware-xiaomi-daisy/archive/$_commit.tar.gz" options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native" -builddir="$srcdir/firmware-xiaomi-daisy-$_commit" +builddir="$srcdir/firmware-xiaomi-daisy-$_commit/gpu" -_fwdir="/lib/firmware/postmarketos" +_fwdir="/lib/firmware" package() { - echo $source - - # Modem firmware - install -Dm0644 modem/mba.mbn -t "$pkgdir/$_fwdir" - install -Dm0644 modem/modem.* -t "$pkgdir/$_fwdir" - - # ADSP firmware - install -Dm0644 adsp/adsp.* -t "$pkgdir/$_fwdir" - - # GPU and video acceleration firmwares - install -Dm0644 gpu/a5* -t "$pkgdir/$_fwdir" - install -Dm0644 gpu/venus.* -t "$pkgdir/$_fwdir" - - # Wifi/BT firmware - install -Dm0644 wcnss/WCNSS_qcom_wlan_nv.bin -t "$pkgdir/$_fwdir"/wlan/prima - install -Dm0644 wcnss/wcnss.* -t "$pkgdir/$_fwdir" + # GPU firmwares + install -Dm644 a506_zap.b02 -t "$pkgdir/$_fwdir/postmarketos" + install -Dm644 a506_zap.mdt -t "$pkgdir/$_fwdir/postmarketos" + install -Dm644 a530_pfp.fw -t "$pkgdir/$_fwdir/qcom" + install -Dm644 a530_pm4.fw -t "$pkgdir/$_fwdir/qcom" } sha512sums="