From e3ffc66577c17fa3a39b9bca72ffe75bf33d79c2 Mon Sep 17 00:00:00 2001
From: Richard Acayan <mailingradian@gmail.com>
Date: Tue, 6 Dec 2022 21:34:32 -0500
Subject: [PATCH] google-sargo: add modem support (MR 3695)

The modem needs more firmware. Some firmware is in the modem partition
and needs to be loaded.

[ci:skip-build]: Already built successfully in CI
---
 device/testing/device-google-sargo/APKBUILD   | 4 ++--
 device/testing/firmware-google-sargo/APKBUILD | 9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/device/testing/device-google-sargo/APKBUILD b/device/testing/device-google-sargo/APKBUILD
index 37a3cad3478..122d969702e 100644
--- a/device/testing/device-google-sargo/APKBUILD
+++ b/device/testing/device-google-sargo/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=device-google-sargo
 pkgdesc="Google Pixel 3a"
 pkgver=0.3
-pkgrel=2
+pkgrel=3
 url="https://postmarketos.org"
 license="MIT"
 arch="aarch64"
@@ -31,7 +31,7 @@ package() {
 
 nonfree_firmware() {
 	pkgdesc="Proprietary firmware blobs for the Google Pixel 3a"
-	depends="firmware-google-sargo linux-firmware-qca linux-firmware-qcom"
+	depends="firmware-google-sargo linux-firmware-qca linux-firmware-qcom msm-firmware-loader soc-qcom-sdm845-nonfree-firmware"
 
 	# Create an empty sub-package directory because this sub-package is empty
 	mkdir "$subpkgdir"
diff --git a/device/testing/firmware-google-sargo/APKBUILD b/device/testing/firmware-google-sargo/APKBUILD
index 45ac9b13c94..2fd99f2a83a 100644
--- a/device/testing/firmware-google-sargo/APKBUILD
+++ b/device/testing/firmware-google-sargo/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Richard Acayan <mailingradian@gmail.com>
 pkgname=firmware-google-sargo
 pkgver=220505.008
-pkgrel=0
+pkgrel=1
 pkgdesc="Proprietary firmware blobs from the Google Pixel 3a factory image"
 url="https://github.com/TheMuppets/proprietary_vendor_google_sargo"
 arch="aarch64"
@@ -14,13 +14,20 @@ options="!check !archcheck !strip !tracedeps pmb:cross-native"
 
 build() {
 	pil-squasher a615_zap.mbn proprietary/vendor/firmware/a615_zap.mdt
+	pil-squasher ipa_fws.mbn proprietary/vendor/firmware/ipa_fws.mdt
 }
 
 package() {
 	install -Dm755 "$builddir"/a615_zap.mbn \
 		       "$pkgdir"/lib/firmware/qcom/sdm670/sargo/a615_zap.mbn
+	install -Dm755 "$builddir"/ipa_fws.mbn \
+		       "$pkgdir"/lib/firmware/qcom/sdm670/sargo/ipa_fws.mbn
+	install -Dm755 "$builddir"/proprietary/vendor/firmware/modemuw.jsn \
+		       "$pkgdir"/lib/firmware/postmarketos/modemuw.jsn
 	install -Dm755 "$builddir"/proprietary/vendor/firmware/venus.mbn \
 		       "$pkgdir"/lib/firmware/qcom/sdm670/sargo/venus.mbn
+	install -Dm755 "$builddir"/proprietary/vendor/firmware/wlanmdsp.mbn \
+		       "$pkgdir"/lib/firmware/postmarketos/wlanmdsp.mbn
 }
 
 sha512sums="
-- 
GitLab