Skip to content
Snippets Groups Projects
Verified Commit 89003fbc authored by Barnabás Czémán's avatar Barnabás Czémán Committed by Alexey Minnekhanov
Browse files

soc-qcom-msm8953: add moto-modem-rfs-setup service (MR 6041)

Add an openrc service for motorola modems.

[ci:skip-vercheck]
[ci:skip-build]: already built successfully in CI
parent 037f96ff
No related branches found
No related tags found
No related merge requests found
# Maintainer: Barnabas Czeman <trabarni@gmail.com>
pkgname=soc-qcom-msm8953
pkgdesc="Common package for Qualcomm MSM8953 devices"
pkgver=11
pkgrel=2
pkgver=12
pkgrel=0
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64"
......@@ -21,6 +21,7 @@ source="
90-feedbackd-pm8xxx-vib.rules
q6voiced.conf
adreno-a506-quirks.sh
moto-modem-rfs-setup.openrc
"
package() {
......@@ -57,8 +58,7 @@ modem_openrc() {
rmtfs-openrc
tqftpserv-openrc
"
mkdir -p "$subpkgdir"
install -Dm755 $srcdir/moto-modem-rfs-setup.openrc "$subpkgdir"/etc/init.d/moto-modem-rfs-setup
}
gpu() {
......@@ -74,4 +74,5 @@ sha512sums="
90fca4a3291a2c84c0b20e41308c4698374ba896e9365ca80dbfd0c0c4f7dc08317f3dd865a3c7f6707c81b02f5bb24136d1172253d2e4fdd50039bbbf02a178 90-feedbackd-pm8xxx-vib.rules
3a4a9322839d4b3ef9d79668a37840a9f444954759ae3c512e694051d2f9a2573db42ad6c4c1a5c75eeb861232a27ba1a8cef9b503decd54ead25a96e3dd6f98 q6voiced.conf
d546c99ca8d406b4e2e3901a417e4e461314a38f2f01c48525e44ca524ad57af7bfc280f416bda90573b0bfb1cca27d45cb0a0ed44e999ef8d406a380d1fdbb2 adreno-a506-quirks.sh
d4fd0f3406c9f004e9cae7bc500c5713aab75f102f8e3ea1af820865f01eb03def01cd9ed3e8a184c7dfc22ab419628fad17957a3782885d96eb36e94461e842 moto-modem-rfs-setup.openrc
"
#!/sbin/openrc-run
description="Setup modem firmware for tqftpserv"
depend() {
before tqftpserv
}
start()
{
MODEM_FIRMWARE_DIR="/lib/firmware/postmarketos/persist"
# The firmware present here is unique to each device
# Using the firmware of one device on another can will simply fail
# This is needed because motorola devices derive IMEI and other unique
# IDs from these files
# See also: https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
if [ ! -d $MODEM_FIRMWARE_DIR ]; then
# Make a copy of the firmware if its not already made
# Use the copy instead of the original, because if due to some error
# somehow the firmware gets corrupted, the original firmware will
# still be available on the 'persist' partition
PERSIST_PATH="/tmp/persist"
PERSIST_DEV="/dev/disk/by-partlabel/persist"
mkdir -p $PERSIST_PATH
mount $PERSIST_DEV -o ro,noatime $PERSIST_PATH
mkdir $MODEM_FIRMWARE_DIR
cp -R "$PERSIST_PATH"/rfs/msm/mpss/ "$MODEM_FIRMWARE_DIR"/readwrite
umount $PERSIST_DEV
rmdir $PERSIST_PATH
fi
ln -s "$MODEM_FIRMWARE_DIR"/readwrite/ /tmp/tqftpserv
}
#!/bin/sh
rc-update add -q q6voiced default
rc-update add -q moto-modem-rfs-setup boot
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment