From 1bf6638a8d7c654576dcab67c79b8bb1a4380c72 Mon Sep 17 00:00:00 2001
From: st s <s-gitlab@hilft.net>
Date: Sun, 11 Apr 2021 22:35:32 +0200
Subject: [PATCH] samsung-zeroltexx: Create common firmware package for
 zeroltexx and zerofltexx. For now only including Wifi drivers, as I wasn't
 yet able to successfully test audio and camera subsystems (but I
 intentionally left these firmware files commented out in the APKBUILD file).

---
 .../testing/device-samsung-zeroltexx/APKBUILD |  2 +-
 device/testing/firmware-samsung-zero/APKBUILD | 63 +++++++++++++++
 .../firmware-samsung-zeroltexx/APKBUILD       | 79 -------------------
 3 files changed, 64 insertions(+), 80 deletions(-)
 create mode 100644 device/testing/firmware-samsung-zero/APKBUILD
 delete mode 100644 device/testing/firmware-samsung-zeroltexx/APKBUILD

diff --git a/device/testing/device-samsung-zeroltexx/APKBUILD b/device/testing/device-samsung-zeroltexx/APKBUILD
index f9646905f92..137a11f4b36 100644
--- a/device/testing/device-samsung-zeroltexx/APKBUILD
+++ b/device/testing/device-samsung-zeroltexx/APKBUILD
@@ -33,7 +33,7 @@ package() {
 
 nonfree_firmware() {
 	pkgdesc="Non-free firmware for the Samsung Galaxy S6 edge"
-	depends="firmware-samsung-zeroltexx"
+	depends="firmware-samsung-zero"
 	mkdir "$subpkgdir"
 }
 
diff --git a/device/testing/firmware-samsung-zero/APKBUILD b/device/testing/firmware-samsung-zero/APKBUILD
new file mode 100644
index 00000000000..cec70b53cfd
--- /dev/null
+++ b/device/testing/firmware-samsung-zero/APKBUILD
@@ -0,0 +1,63 @@
+pkgname=firmware-samsung-zero
+pkgver=1
+pkgrel=0
+pkgdesc="Firmware for the Samsung Galaxy S6 / S6 edge (zerofltexx/zeroltexx)"
+url="https://github.com/Exynos7420/proprietary_vendor_samsung_zero-common"
+arch="noarch"
+license="proprietary"
+options="!check !archcheck !strip !spdx"
+
+# Source
+_commit="9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95"
+
+_vendor_files_media="
+seiren_fw_dram.bin
+seiren_fw_sram.bin
+fimc_is_fw2.bin
+fimc_is_fw2_2p2.bin
+fimc_is_fw2_imx240.bin
+mfc_fw.bin
+setfile_2p2.bin
+setfile_4e6.bin
+setfile_6b2.bin
+setfile_imx240.bin
+companion_2p2_master_setfile.bin
+companion_2p2_mode_setfile.bin
+companion_fw_2p2_evt1.bin
+companion_fw_imx240_evt1.bin
+companion_imx240_master_setfile.bin
+companion_imx240_mode_setfile.bin
+ois_fw_dom.bin
+ois_fw_sec.bin
+"
+
+# this is commented out because camera/sound subsystems not successfully tested yet
+# for _file in $_vendor_files_media; do
+#	source="$source $pkgname-$_commit-$_file::$url/raw/nx-10.0/proprietary/system/vendor/firmware/$_file"
+# done
+
+_vendor_files_wifi="
+bcmdhd_sta.bin
+nvram_net.txt
+"
+
+for _file in $_vendor_files_wifi; do
+	source="$source $pkgname-$_commit-$_file::$url/raw/nx-10.0/proprietary/system/vendor/etc/wifi/$_file"
+done
+
+
+package() {
+	local file
+# this is commented out because camera/sound subsystems not successfully tested yet
+#	for file in $_vendor_files_media; do
+#		install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
+#		    "$pkgdir/lib/firmware/postmarketos/$file"
+#	done
+	for file in $_vendor_files_wifi; do
+		install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
+		    "$pkgdir/lib/firmware/postmarketos/$file"
+	done
+}
+
+sha512sums="3b7f4bcc544762bb632cb4f47c73550f78d7d06e82503eae761a063b2f8871f177f03f9ee54b79297a798fd9c41868d99b985b38de23396a470dbf4e76bfb266  firmware-samsung-zero-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-bcmdhd_sta.bin
+8db9cb1c2ff6e659b8a3689758ae564785b840062864a71286176cf9f51a0e0a85bf081a9c3dfdcd1990bfb3dbf824a51c857ed459ff3fcbeb1e756cdd6add46  firmware-samsung-zero-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-nvram_net.txt"
diff --git a/device/testing/firmware-samsung-zeroltexx/APKBUILD b/device/testing/firmware-samsung-zeroltexx/APKBUILD
deleted file mode 100644
index d2cb0010ec7..00000000000
--- a/device/testing/firmware-samsung-zeroltexx/APKBUILD
+++ /dev/null
@@ -1,79 +0,0 @@
-pkgname=firmware-samsung-zeroltexx
-pkgver=1
-pkgrel=0
-pkgdesc="Firmware for the Samsung Galaxy S6 edge"
-url="https://github.com/Exynos7420/proprietary_vendor_samsung_zero-common"
-arch="noarch"
-license="proprietary"
-options="!check !archcheck !strip !spdx"
-
-# Source
-_commit="9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95"
-
-_vendor_files="
-seiren_fw_dram.bin
-seiren_fw_sram.bin
-fimc_is_fw2.bin
-fimc_is_fw2_2p2.bin
-fimc_is_fw2_imx240.bin
-mfc_fw.bin
-setfile_2p2.bin
-setfile_4e6.bin
-setfile_6b2.bin
-setfile_imx240.bin
-companion_2p2_master_setfile.bin
-companion_2p2_mode_setfile.bin
-companion_fw_2p2_evt1.bin
-companion_fw_imx240_evt1.bin
-companion_imx240_master_setfile.bin
-companion_imx240_mode_setfile.bin
-ois_fw_dom.bin
-ois_fw_sec.bin
-"
-
-for _file in $_vendor_files; do
-	source="$source $pkgname-$_commit-$_file::$url/raw/nx-10.0/proprietary/system/vendor/firmware/$_file"
-done
-
-_vendor_files_wifi="
-bcmdhd_sta.bin
-nvram_net.txt
-"
-
-for _file in $_vendor_files_wifi; do
-	source="$source $pkgname-$_commit-$_file::$url/raw/nx-10.0/proprietary/system/vendor/etc/wifi/$_file"
-done
-
-
-package() {
-	local file
-	for file in $_vendor_files; do
-		install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
-		    "$pkgdir/lib/firmware/postmarketos/$file"
-	done
-	for file in $_vendor_files_wifi; do
-		install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
-		    "$pkgdir/lib/firmware/postmarketos/$file"
-	done
-}
-
-sha512sums="eb727801466c172dcb818a56bbab053165439d2b89719207882d5c4e68ac9dd86048d0af1daaf5fa971f7657ae2bf8411099711d492dceb7c992bcf21a991bcf  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-seiren_fw_dram.bin
-f5646266e88be82da0c761b7a0e31293954509c818ea43743105c1da5f24b5e929af96ba8b6c8811d1a2b24c5ec8bb703ddb5afe1503399ce8d42a3d6e77cc59  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-seiren_fw_sram.bin
-aed74682dca236fd1033b5c958ad0024bb47d0f697bb3191de5148ed56c06ee65cf178f04aee1f46dab6f867c2309ba745090dae67aa85605f72bba932700aee  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-fimc_is_fw2.bin
-0fea4ff08d79df5824605ad562025a79221d295ad2ab93edf7f81c488aad4bb3ad2674ca640eb4e68a051c7c1b74fa591d62329f6580bf0941727a9272cba6fd  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-fimc_is_fw2_2p2.bin
-98e1d317c19c1580842d8012a09052cb3adbcd2624711d531b9648237fdd3b8c37f9ef4abc2dde0a2f74ff90fe83aca60a47863ec2618812bae2f5bab1900586  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-fimc_is_fw2_imx240.bin
-61ca56de5af0dcde8c91dd91914b55e76db2ac380c1a8481176ebf61144c28e9769670beeda0b3326140a9a8dfe88064bddb09d926208d4e312c08f18b77d541  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-mfc_fw.bin
-5b9a64a4357164ccd19ecbf30fb2de14091446896549913918644d9c7e95b7abdc8aef9e22212b92ddf8fd86a8fb5d7233c1e14aba3fd96d2e379b03f03c779e  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-setfile_2p2.bin
-357149745ec2fc322443b0e5e294ca1460ffa3cd88f8e0304fd9abd2ce2d238d25696ab3e79d001d2fc2f719e744b0c0f48b765cb1780038af1a38c4c26d18e4  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-setfile_4e6.bin
-9783894f3f54938cb14318472ca13b3d139f0c3924290645da5a13b213b488a0e7cbe65fbfe9209813a7a27908a6f2cd45f259fe36d61e7b5734aa4a3c9cdbce  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-setfile_6b2.bin
-ba5ba3cbe2658077c4fe607a1fef3954c3af9b72157919d8d189309378e87a8f743565ec57b71d063072f3c61dea67f20a47410483a1fe7bb2d35c5d632a6e06  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-setfile_imx240.bin
-a23c2c0dbc980ae34e9ab26fd217b30a7e482230d14d84b0ca69c810922683aa9bf267960ba4fe626195c71a1b0ccb96ec07244383355c816f986198cb86a2d8  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-companion_2p2_master_setfile.bin
-f23d1373342a94be774edbf293243afd721cda528cf6fcee52659b4ff2d840850feb32b2dc27ad06c8c84b1056558d1820f1bf6e33249cf73e38509f30a040a6  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-companion_2p2_mode_setfile.bin
-5c38241f9fba1050c8b97c3a4938a5ead0ec7e9151971710b6185d487c511bd7ca3adb92c7bab0a49b56ce0856cc940299e4dd5bd7c8f49273719ad41b269e8a  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-companion_fw_2p2_evt1.bin
-ca1faf92e44a43ecb7b72c5063bf076fa94809b81bf0fbdaf94b3e8d88e14f449e07618a827b81d64da7b8c3aef70da56ad9eb2bee27e63f0016eb54566556ea  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-companion_fw_imx240_evt1.bin
-b1b52edc851e33ad20f3da6bcef6c80ce8e730b7f4a75de5b8a70fdd4818dd5671d073c8266a86cc3112fcad57b41ff68953452e499e402d96174cc77e220ec7  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-companion_imx240_master_setfile.bin
-62db855f5c8f3c1fa561d1816c02658fd10f0f92844eb800cc169ef8d4d841c3b665ab41228ffda0425075b81d1390a1abe8399427dea43ee27f38b1022ea301  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-companion_imx240_mode_setfile.bin
-e0490fbb804637b75c375e3b7746ebec8dac5f7a4c324ab05f99bf6dc734323034861d8db36b0a69f5118c20156bed2dd9d1d458a71a9d53e085ad745d1fd4ff  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-ois_fw_dom.bin
-db84ab9f4115ae7a04b35f6f9fd67b8d7b57017ca12bbb427f3021496c7b4e419eb971cd1a09bd100decccda515dac8de920b273353a28cc5e859f918ac6cca2  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-ois_fw_sec.bin
-3b7f4bcc544762bb632cb4f47c73550f78d7d06e82503eae761a063b2f8871f177f03f9ee54b79297a798fd9c41868d99b985b38de23396a470dbf4e76bfb266  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-bcmdhd_sta.bin
-8db9cb1c2ff6e659b8a3689758ae564785b840062864a71286176cf9f51a0e0a85bf081a9c3dfdcd1990bfb3dbf824a51c857ed459ff3fcbeb1e756cdd6add46  firmware-samsung-zeroltexx-9ff5ecfd76e05e7b8fd2210675af51f3acf2eb95-nvram_net.txt"
-- 
GitLab