modem/msm-modem(-downstream): start modem if necessary (MR 1640)
On some downstream kernels it seems like we need to explicitly keep /dev/subsys_modem open (without writing anything), otherwise the modem will be stopped (or never started). Weird.
This commit is contained in:
parent
36eb719b51
commit
2d10cc697a
3 changed files with 30 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
pkgname=msm-modem
|
||||
pkgver=2
|
||||
pkgver=3
|
||||
pkgrel=0
|
||||
pkgdesc="Common support for Qualcomm MSM modems"
|
||||
url="https://postmarketos.org/"
|
||||
|
@ -8,7 +8,7 @@ license="GPL-3.0-or-later"
|
|||
depends="rmtfs rmtfs-openrc"
|
||||
install="$pkgname.post-install"
|
||||
subpackages="$pkgname-rpmsg $pkgname-downstream"
|
||||
source="udev-rpmsg.rules udev-downstream.rules"
|
||||
source="msm-modem-downstream.initd udev-rpmsg.rules udev-downstream.rules"
|
||||
options="!check"
|
||||
|
||||
package() {
|
||||
|
@ -24,10 +24,13 @@ rpmsg() {
|
|||
|
||||
downstream() {
|
||||
pkgdesc="$pkgdesc (downstream)"
|
||||
depends="$pkgname libqipcrtr4msmipc libsmdpkt_wrapper"
|
||||
depends="$pkgname libqipcrtr4msmipc libsmdpkt_wrapper keepfileopen"
|
||||
install="$subpkgname.post-install"
|
||||
|
||||
install -Dm755 "$srcdir/$subpkgname.initd" "$subpkgdir/etc/init.d/$subpkgname"
|
||||
install -Dm644 "$srcdir/udev-downstream.rules" "$subpkgdir/usr/lib/udev/rules.d/55-$pkgname.rules"
|
||||
}
|
||||
|
||||
sha512sums="11437625988fcf57aa0b70f11496c458d4516de16391c2869ae975362f282d21d3af521a41dea00312797d20d52be5112dbf0041986bfb40f3b9fa5948d2c695 udev-rpmsg.rules
|
||||
sha512sums="3172f8c409f552f13d1da29f14ab6c79072cd6da4acab151a1a0ea1858a416974456852609f14fe29cf97a6a45e60b99d0a57ddcde751da243ee5ac6fa8b672c msm-modem-downstream.initd
|
||||
11437625988fcf57aa0b70f11496c458d4516de16391c2869ae975362f282d21d3af521a41dea00312797d20d52be5112dbf0041986bfb40f3b9fa5948d2c695 udev-rpmsg.rules
|
||||
2a511c2e249d0ec5a52f04ffe1ef3d29cf3c4813143b103e54879ff89176ea45b1a5ffe21cb7dc2f1cdd84c3102ba45ef9926ed37e00b1ae12a36d01de35ea5a udev-downstream.rules"
|
||||
|
|
21
modem/msm-modem/msm-modem-downstream.initd
Normal file
21
modem/msm-modem/msm-modem-downstream.initd
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/sbin/openrc-run
|
||||
supervisor=supervise-daemon
|
||||
|
||||
name="Modem Subsystem"
|
||||
description="Qualcomm MSM modem subsystem service"
|
||||
|
||||
_subsys="/dev/subsys_modem"
|
||||
command="/usr/bin/keepfileopen"
|
||||
command_args="$_subsys"
|
||||
|
||||
respawn_delay=1
|
||||
respawn_max=3
|
||||
|
||||
depend() {
|
||||
need rmtfs
|
||||
}
|
||||
|
||||
start() {
|
||||
# Subsystem misc file is only available on some downstream kernels
|
||||
[ ! -c "$_subsys" ] || default_start
|
||||
}
|
2
modem/msm-modem/msm-modem-downstream.post-install
Normal file
2
modem/msm-modem/msm-modem-downstream.post-install
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
rc-update add msm-modem-downstream
|
Loading…
Reference in a new issue