soc-qcom-sdm845: encapsulate cellular specific stuff (MR 4047)

The upcoming db845c doesn't have cellular modem capabilities, but still
has wifi. Avoid installing modem related configs and services by default
and only install it for devices that need it.
This commit is contained in:
Caleb Connolly 2023-04-29 23:09:49 +01:00
parent 01d084c777
commit 6c27c1c460
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
11 changed files with 49 additions and 29 deletions

View file

@ -4,7 +4,7 @@
pkgname=device-oneplus-enchilada
pkgdesc="OnePlus 6"
pkgver=9
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -36,7 +36,8 @@ package() {
nonfree_firmware() {
pkgdesc="Modem, WiFi and GPU Firmware, also needed for osk-sdl"
depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs soc-qcom-sdm845-nonfree-firmware"
depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
mkdir "$subpkgdir"
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced

View file

@ -4,7 +4,7 @@
pkgname=device-oneplus-fajita
pkgdesc="OnePlus 6T"
pkgver=9
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -36,7 +36,8 @@ package() {
nonfree_firmware() {
pkgdesc="Modem, WiFi and GPU Firmware, also needed for osk-sdl"
depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs soc-qcom-sdm845-nonfree-firmware"
depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
mkdir "$subpkgdir"
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced

View file

@ -5,7 +5,7 @@
pkgname=device-shift-axolotl
pkgdesc="SHIFT6mq"
pkgver=8
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -42,7 +42,8 @@ package() {
nonfree_firmware() {
pkgdesc="Modem, GPU and WiFi Firmware, also needed for osk-sdl"
depends="firmware-shift-sdm845 firmware-shift-sdm845-initramfs soc-qcom-sdm845-nonfree-firmware"
depends="firmware-shift-sdm845 firmware-shift-sdm845-initramfs
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
mkdir "$subpkgdir"
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced

View file

@ -4,7 +4,7 @@
pkgname=device-xiaomi-beryllium
pkgdesc="Xiaomi Poco F1"
pkgver=8
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -40,7 +40,8 @@ package() {
nonfree_firmware() {
pkgdesc="GPU, venus, modem firmware"
depends="firmware-xiaomi-beryllium soc-qcom-sdm845-nonfree-firmware"
depends="firmware-xiaomi-beryllium soc-qcom-sdm845-nonfree-firmware
soc-qcom-sdm845-modem"
mkdir "$subpkgdir"
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced

View file

@ -3,7 +3,7 @@
pkgname=soc-qcom-sdm845
pkgdesc="Common package for Qualcomm SDM845 devices"
pkgver=14
pkgrel=1
pkgrel=2
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64"
@ -13,6 +13,7 @@ depends="
"
replaces="upower"
subpackages="
$pkgname-modem
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-qbootctl
$pkgname-ucm
@ -40,20 +41,14 @@ package() {
"$pkgdir"/etc/UPower/UPower.conf
}
nonfree_firmware() {
pkgdesc="Modem, WiFi and GPU Firmware"
modem() {
pkgdesc="Modem services and configuration"
depends="
pd-mapper
pd-mapper-openrc
tqftpserv
tqftpserv-openrc
q6voiced
q6voiced-openrc
msm-modem
msm-modem-uim-selection
bootmac
alsa-utils
"
q6voiced
q6voiced-openrc
msm-modem-uim-selection
"
install="$subpkgname.post-install $subpkgname.post-upgrade"
mkdir "$subpkgdir"
@ -72,6 +67,22 @@ nonfree_firmware() {
"$subpkgdir"/etc/conf.d/call_audio_idle_suspend_workaround
}
nonfree_firmware() {
pkgdesc="Modem, WiFi and GPU Firmware"
depends="
pd-mapper
pd-mapper-openrc
tqftpserv
tqftpserv-openrc
msm-modem
bootmac
alsa-utils
"
install="$subpkgname.post-install $subpkgname.post-upgrade"
mkdir "$subpkgdir"
}
ucm() {
provides="alsa-ucm-conf"
provider_priority=1

View file

@ -0,0 +1,3 @@
#!/bin/sh
rc-update add q6voiced default
rc-update add call_audio_idle_suspend_workaround default

View file

@ -0,0 +1 @@
soc-qcom-sdm845-modem.post-install

View file

@ -1,5 +1,3 @@
#!/bin/sh
rc-update add tqftpserv boot
rc-update add pd-mapper boot
rc-update add q6voiced default
rc-update add call_audio_idle_suspend_workaround default

View file

@ -3,7 +3,7 @@
pkgname=device-google-sargo
pkgdesc="Google Pixel 3a"
pkgver=0.4
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -31,7 +31,8 @@ package() {
nonfree_firmware() {
pkgdesc="Proprietary firmware blobs for the Google Pixel 3a"
depends="firmware-google-sargo linux-firmware-qca linux-firmware-qcom msm-firmware-loader soc-qcom-sdm845-nonfree-firmware"
depends="firmware-google-sargo linux-firmware-qca linux-firmware-qcom
msm-firmware-loader soc-qcom-sdm845-modem soc-qcom-sdm845-nonfree-firmware"
# Create an empty sub-package directory because this sub-package is empty
mkdir "$subpkgdir"

View file

@ -4,7 +4,7 @@
pkgname=device-xiaomi-polaris
pkgdesc="Xiaomi Mi Mix 2S"
pkgver=0.1
pkgrel=1
pkgrel=2
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@ -37,7 +37,8 @@ package() {
nonfree_firmware() {
pkgdesc="Modem, WiFi and GPU Firmware, also needed for osk-sdl"
depends="firmware-xiaomi-polaris firmware-xiaomi-polaris-initramfs soc-qcom-sdm845-nonfree-firmware"
depends="firmware-xiaomi-polaris firmware-xiaomi-polaris-initramfs
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
mkdir "$subpkgdir"
}

View file

@ -2,7 +2,7 @@
pkgname=soc-qcom-msm8998
pkgdesc="Common package for Qualcomm MSM8998 devices"
pkgver=1
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64"
@ -18,6 +18,7 @@ package() {
nonfree_firmware() {
pkgdesc="Modem, WiFi and GPU Firmware"
depends="
soc-qcom-sdm845-modem
soc-qcom-sdm845-nonfree-firmware
qcom-diag
qcom-diag-openrc