pmaports/device/testing/device-fairphone-fp2/APKBUILD
Minecrell 8e080015d7
modem/msm-modem: rename msm-modem-mainline to msm-modem-rpmsg (MR 1356)
Newer Qualcomm SoCs (e.g. SDM845. MSM8953) seem to use a different
method to talk to the modem. There are no longer separate rpmsg/SMD
channels for QMI messags, instead the modem is also available through QRTR.

On these newer SoCs, installing msm-modem-mainline is pointless,
because the created /dev/modem device will not actually allow
communicating with the modem. However, you still need the part from
the base package (msm-modem), which installs+enables rmtfs.

To avoid confusion, rename the msm-modem-mainline subpackage to
msm-modem-rpmsg. Install only "msm-modem" on SDM845 because that
likely does not allow communication with the modem through RPMSG
anyway.
2020-06-25 09:41:35 +02:00

74 lines
2.3 KiB
Text

# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-fairphone-fp2
pkgdesc="Fairphone 2"
pkgver=2
pkgrel=13
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base mkbootimg"
makedepends="devicepkg-dev"
source="deviceinfo
FP2.conf
hifi"
subpackages="
$pkgname-kernel-downstream:kernel_downstream
$pkgname-kernel-mainline:kernel_mainline
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-downstream-firmware:downstream_firmware
$pkgname-mainline-firmware:mainline_firmware
$pkgname-alsa
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
kernel_downstream() {
pkgdesc="Downstream kernel"
depends="linux-fairphone-fp2 mesa-dri-swrast ofono"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline() {
pkgdesc="Mainline kernel"
depends="linux-postmarketos-qcom-msm8974 mesa-dri-freedreno"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
nonfree_firmware() {
pkgdesc="Firmware for WiFi, Audio, etc."
depends="firmware-fairphone-fp2-adsp firmware-fairphone-fp2-modem firmware-fairphone-fp2-wcnss"
mkdir "$subpkgdir"
}
downstream_firmware() {
pkgdesc="Firmware support packages for downstream kernel"
depends="$pkgname-alsa adsp-audio msm-modem-downstream wcnss-wlan"
install_if="$pkgname-kernel-downstream $pkgname-nonfree-firmware"
mkdir "$subpkgdir"
}
mainline_firmware() {
pkgdesc="Firmware support packages for mainline kernel"
depends="msm-modem-rpmsg firmware-adreno"
install_if="$pkgname-kernel-mainline $pkgname-nonfree-firmware"
mkdir "$subpkgdir"
}
alsa() {
pkgdesc="Audio configuration files"
mkdir -p "$subpkgdir"/usr/share/alsa/ucm/FP2
install -Dm644 "$srcdir"/FP2.conf "$subpkgdir"/usr/share/alsa/ucm/FP2/
install -Dm644 "$srcdir"/hifi "$subpkgdir"/usr/share/alsa/ucm/FP2/
}
sha512sums="af14d0dbe3c04d0eea28028e4051b9f63239dda9476e4667bd00be0bec57768e3da76d7ca188b319d4012ae932078d994a219f5bec074fa5f21f1e7059d5befc deviceinfo
55360b1ba4ddadea341c9edb13c32ba5f19aabf75ab28602f30cfb79b9df8834f115ef979c70569f23ec1293b1fcd408baf320d87803293ce7106bdc73a26c9f FP2.conf
b834461c6866bb0c473dd089dd5da641dd42a00f610aad6503117aa50fe6e200db9ad0a264bb609f12350d59faee1f772907bacd75439f702ea7d52f6f85e2b1 hifi"