Also include z3ntu's patch fixing a buffer overread issue which sadly
has not been merged for several months now.
rmtfs should be ideally started and stopped before NetworkManager
because otherwise the modem network interface might be removed before
NetworkManager can set it down. This has caused kernel issues at some
point (although it seems to be fine again at the moment).
At the moment, oFono/MM are usually stopped after rmtfs on shutdown.
This does not make sense, since the modem managed by oFono/MM will
disappear once rmtfs is stopped. Add a "before ofono modemmanager"
to make sure that OpenRC will stop oFono/MM before rmtfs on shutdown.
This may or may not fix some occasional hangs during shutdown,
but it definitely makes it possible for oFono/MM to shutdown cleanly.
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.
qrtr-ns is not needed (or working) on downstream, also it is no longer
needed for mainline starting with Linux 5.9. Convert the "need" dependency
to a "use" so qrtr-ns is only started if it is really needed.