From 7af2394e0ce6d8667d1aeadcab2ac2599fa8498a Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Wed, 25 Oct 2023 19:37:42 +0200 Subject: [PATCH] samsung-klimtlte: select firmware pkg variant in device package (MR 4721) We want both klimtwifi and klimtlte to be able to depend on firmware-samsung-klimt, for both their downstream and mainline kernel variants. Previously we used install_if like: install_if="device-samsung-klimtlte-kernel-mainline" which will only work for klimtlte and not klimtwifi. Instead we add two nonfree subpackages to the device packages that install_if's depending on kernel choice. --- .../testing/device-samsung-klimtlte/APKBUILD | 19 +++++++++++++++++-- .../testing/firmware-samsung-klimt/APKBUILD | 6 ++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/device/testing/device-samsung-klimtlte/APKBUILD b/device/testing/device-samsung-klimtlte/APKBUILD index 18b4a71ca..9506a7c49 100644 --- a/device/testing/device-samsung-klimtlte/APKBUILD +++ b/device/testing/device-samsung-klimtlte/APKBUILD @@ -19,6 +19,8 @@ subpackages=" $pkgname-kernel-downstream:kernel_downstream $pkgname-kernel-mainline:kernel_mainline $pkgname-nonfree-firmware:nonfree_firmware + $pkgname-nonfree-firmware-downstream:nonfree_firmware_downstream + $pkgname-nonfree-firmware-mainline:nonfree_firmware_mainline " build() { @@ -46,8 +48,21 @@ kernel_mainline() { } nonfree_firmware() { - pkgdesc="Non-free firmware for the Samsung Galaxy Tab S" - depends="firmware-samsung-klimt" + pkgdesc="Non-free firmware for the Samsung Galaxy Tab S 8.4" + mkdir "$subpkgdir" +} + +nonfree_firmware_downstream() { + pkgdesc="Non-free firmware for klimtlte when using downstream kernel" + install_if="$pkgname=$pkgver-r$pkgrel $pkgname-nonfree-firmware=$pkgver-r$pkgrel $pkgname-kernel-downstream" + depends="firmware-samsung-klimt-downstream>=3.0-r0" + mkdir "$subpkgdir" +} + +nonfree_firmware_mainline() { + pkgdesc="Non-free firmware for klimtlte when using mainline kernel" + install_if="$pkgname=$pkgver-r$pkgrel $pkgname-nonfree-firmware=$pkgver-r$pkgrel $pkgname-kernel-mainline" + depends="firmware-samsung-klimt-mainline>=3.0-r0" mkdir "$subpkgdir" } diff --git a/device/testing/firmware-samsung-klimt/APKBUILD b/device/testing/firmware-samsung-klimt/APKBUILD index db079bb2a..de99b4293 100644 --- a/device/testing/firmware-samsung-klimt/APKBUILD +++ b/device/testing/firmware-samsung-klimt/APKBUILD @@ -1,5 +1,5 @@ pkgname=firmware-samsung-klimt -pkgver=2.1 +pkgver=3.0 pkgrel=0 pkgdesc="Firmware for Samsung klimtwifi and klimtlte" url="https://github.com/exynos5420/android_vendor_samsung_klimt-common" @@ -9,7 +9,7 @@ options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native" subpackages=" $pkgname-downstream:downstream $pkgname-mainline:mainline - " +" _klimt_commit="cedd082ae12290218c2c33ffd31bbecc713b7cd9" _klimt_url="https://github.com/exynos5420/android_vendor_samsung_klimt-common/raw/$_klimt_commit" @@ -33,7 +33,6 @@ package() { downstream() { pkgdesc="Firmware for Samsung klimt* when using downstream kernel" - install_if="device-samsung-klimtlte-kernel-downstream" depends="firmware-samsung-exynos5420-downstream" mkdir -p "$subpkgdir" @@ -46,7 +45,6 @@ downstream() { mainline() { pkgdesc="Firmware for Samsung klimt* when using mainline kernel" - install_if="device-samsung-klimtlte-kernel-mainline" depends="linux-firmware-s5p-mfc" mkdir -p "$subpkgdir" }