pmaports/modem/rmtfs/rmtfs.initd
Minecrell 799821e163
modem/rmtfs: fix downstream (MR 1640)
The -s switch to automatically start/stop the modem remoteproc only
works on mainline, on downstream it fails with "Failed to get rprocfd".

Let's abuse /usr/lib/preload/libqipcrtr4msmipc.so to check if we are
(probably) running on a downstream installation, and omit the -s
argument in this case. The modem remoteproc needs to be started
differently on downstream.
2020-10-25 18:34:57 +01:00

27 lines
707 B
Text

#!/sbin/openrc-run
supervisor=supervise-daemon
name="RMTFS"
description="Qualcomm remote file system service"
# -P: find and use raw EFS partitions
# -r: avoid writing to storage
command="/usr/sbin/rmtfs"
command_args="-P -r"
# https://github.com/andersson/rmtfs/commit/dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1
respawn_delay=1
# Downstream hacks: use libqipcrtr4msmipc.so
if [ -f /usr/lib/preload/libqipcrtr4msmipc.so ]; then
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
else
# -s: enable sync for the mss rproc instance (works only on mainline)
# Basically: start/stop modem remoteproc together with rmtfs
command_args="$command_args -s"
fi
depend() {
after udev-settle
use qrtr-ns
}