ofono QMI: mainline kernel support (#1381)
Add modem-qcom-msm-downstream-common package that pulls in the dependencies. qcom_rmtfs now has udev rules to find the storage partitions. My hope is they can be written flexibly enough to cover all devices and kernel flavors.
This commit is contained in:
parent
b65ae44275
commit
0272a7de51
12 changed files with 114 additions and 38 deletions
|
@ -2,13 +2,13 @@
|
|||
pkgname="device-samsung-i9195"
|
||||
pkgdesc="Samsung Galaxy S4 Mini"
|
||||
pkgver=0.3
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="postmarketos-base linux-samsung-i9195 mkbootimg"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-rmtfs"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
|
@ -23,19 +23,8 @@ package() {
|
|||
nonfree_firmware() {
|
||||
pkgdesc="Firmware for Modem and Wifi"
|
||||
# Non-firmware packages placed here, because they aren't useful without firmware
|
||||
depends="firmware-samsung-i9195-modem firmware-samsung-i9195-wlan qcom_rmtfs libqipcrtr4msmipc libsmdpkt_wrapper"
|
||||
depends="firmware-samsung-i9195-modem firmware-samsung-i9195-wlan modem-qcom-msm-downstream-common"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
rmtfs() {
|
||||
install_if="$pkgname qcom_rmtfs"
|
||||
|
||||
local _linkpath="$subpkgdir"/etc/qcom_rmtfs/partition-symlinks
|
||||
mkdir -p $_linkpath
|
||||
cd $_linkpath
|
||||
ln -s /dev/disk/by-partlabel/modemst1 modem_fs1
|
||||
ln -s /dev/disk/by-partlabel/modemst2 modem_fs2
|
||||
ln -s /dev/disk/by-partlabel/fsg modem_fsg
|
||||
}
|
||||
|
||||
sha512sums="8e4ff08c7f2a7e7c55370be0547908b088bdb96e1d51d45e8d2840958bacb31fab0b9774b29332509270b2e18d8b569a159ed96fc9c6c2ed2f360fbb9b5cb26e deviceinfo"
|
||||
|
|
18
modem/modem-qcom-msm-downstream-common/APKBUILD
Normal file
18
modem/modem-qcom-msm-downstream-common/APKBUILD
Normal file
|
@ -0,0 +1,18 @@
|
|||
pkgname=modem-qcom-msm-downstream-common
|
||||
pkgver=0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Common support for Qualcomm MSM modems on the downstream kernel"
|
||||
url="https://postmarketos.org/"
|
||||
arch="armhf"
|
||||
license="GPL-3.0-or-later"
|
||||
depends="qcom_rmtfs libqipcrtr4msmipc libsmdpkt_wrapper"
|
||||
makedepends=""
|
||||
options="!check"
|
||||
subpackages=""
|
||||
source="udev.rules"
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/55-$pkgname.rules"
|
||||
}
|
||||
|
||||
sha512sums="64a40fb88d40ae0ff64d3545f7a54c6f10f2ab366ef75b8b158c2d5a3733223839c87aed8d5c6685d5056a5840d3943e68c76bd1bda2b48388161849d5e253f3 udev.rules"
|
1
modem/modem-qcom-msm-downstream-common/udev.rules
Normal file
1
modem/modem-qcom-msm-downstream-common/udev.rules
Normal file
|
@ -0,0 +1 @@
|
|||
KERNEL=="smdcntl0", SYMLINK += "modem"
|
18
modem/modem-qcom-msm-mainline-common/APKBUILD
Normal file
18
modem/modem-qcom-msm-mainline-common/APKBUILD
Normal file
|
@ -0,0 +1,18 @@
|
|||
pkgname=modem-qcom-msm-mainline-common
|
||||
pkgver=0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Common support for Qualcomm MSM modems on the mainline kernel"
|
||||
url="https://postmarketos.org/"
|
||||
arch="armhf"
|
||||
license="GPL-3.0-or-later"
|
||||
depends="qcom_rmtfs rpmsgexport"
|
||||
makedepends=""
|
||||
options="!check"
|
||||
subpackages=""
|
||||
source="udev.rules"
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/55-$pkgname.rules"
|
||||
}
|
||||
|
||||
sha512sums="a68d91d2747ee2c8ff3940ae02d7c6874b151ecbee6798d2b0215625b1d1e336c6d7c9ee9bebefa70c79c594bd00c9b8d059d958e875234d3bc348cfb1051147 udev.rules"
|
12
modem/modem-qcom-msm-mainline-common/udev.rules
Normal file
12
modem/modem-qcom-msm-mainline-common/udev.rules
Normal file
|
@ -0,0 +1,12 @@
|
|||
SUBSYSTEM!="rpmsg", GOTO="qcom_rpmsg_end"
|
||||
|
||||
# symlink rpmsg endpoints under useful names
|
||||
ATTR{rpmsg_name}=="DATA5_CNTL", SYMLINK+="modem"
|
||||
|
||||
# open SMD channels when the remoteproc comes up
|
||||
KERNEL!="rpmsg_ctrl[0-9]*", GOTO="qcom_rpmsg_end"
|
||||
ATTRS{rpmsg_name}!="modem", GOTO="qcom_rpmsg_end"
|
||||
|
||||
ACTION=="add", RUN+="/usr/sbin/rpmsgexport /dev/$name DATA5_CNTL"
|
||||
|
||||
LABEL="qcom_rpmsg_end"
|
|
@ -2,7 +2,7 @@
|
|||
pkgname=ofono
|
||||
_upstreamver=1.21
|
||||
pkgver=1.21_p20180307
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Infrastructure for building mobile telephony (GSM/UMTS) applications"
|
||||
url="https://01.org/ofono"
|
||||
arch="all"
|
||||
|
@ -16,7 +16,9 @@ subpackages="$pkgname-dev $pkgname-doc"
|
|||
source="https://www.kernel.org/pub/linux/network/$pkgname/$pkgname-$_upstreamver.tar.xz
|
||||
$pkgname.initd
|
||||
0001-nokia-gpio-do-not-create-links-to-gpios-in-dev-cmt.patch::https://git.alpinelinux.org/cgit/aports/plain/testing/ofono/0001-nokia-gpio-do-not-create-links-to-gpios-in-dev-cmt.patch?id=014ae282b4a9152a5b64451f2815f34fcb53507c
|
||||
support-smdpkt.patch"
|
||||
support-smdpkt.patch
|
||||
udev.rules
|
||||
"
|
||||
|
||||
builddir="$srcdir"/$pkgname-$_upstreamver
|
||||
|
||||
|
@ -34,11 +36,12 @@ package() {
|
|||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 "$srcdir/$pkgname-${_upstreamver}/plugins/ofono.rules" "$pkgdir/usr/lib/udev/rules.d/60-ofono.rules"
|
||||
install -Dm644 "$srcdir/$pkgname-${_upstreamver}/plugins/ofono-smdpkt.rules" "$pkgdir/usr/lib/udev/rules.d/60-ofono-smdpkt.rules"
|
||||
install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/60-ofono-pmos.rules"
|
||||
install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
|
||||
}
|
||||
|
||||
sha512sums="bbc7fdb1d05294839eee5f31ec345866315a80feac8ccc2a67e0ca2c1030c55e0fb4fd6faee82133c00ec287730a5fd8df0610146a4f6a099e6b90703e621945 ofono-1.21.tar.xz
|
||||
fd0d303ca71df6953155aac0624c847f273030ebc5fb12efe2fa2ae7b8d75380e2885ab08d9c65c80cf756ef952569832ffdc25317e86a99552b4caac322b3ed ofono.initd
|
||||
a1f66f3f40c1aa4af5f5b66436414408b46f3c90f2a2c88fa12e09ca6a1732334d2f47687478d652a3a176ee93c1905752635246fd01412834565626c021ca64 0001-nokia-gpio-do-not-create-links-to-gpios-in-dev-cmt.patch
|
||||
1eb3fb4e6181e9b4f0afd1b68045750229e6c383380b98111d8238b397ea8dd26dda40b16d64f56f5187fafa97c0613139393e62a1ce58d2631a072903c273a4 support-smdpkt.patch"
|
||||
b946ac618aa2ab864876f7a81b689a0c3b776ad66657aaac508a52ea803d7031378dab0d7292ee41caba3e35b6e15d7309910c754a5762de7754be813c257b82 support-smdpkt.patch
|
||||
8f2893dfc291fc210ef217c4bc74d79436a0997001dd2773809625d52dd19d092cc75d3f9aa5ed2f3d4a6248d4a4e17013a7655323f7dad951f744c55b572417 udev.rules"
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
diff -rN -U3 a/plugins/ofono-smdpkt.rules b/plugins/ofono-smdpkt.rules
|
||||
--- a/plugins/ofono-smdpkt.rules 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ b/plugins/ofono-smdpkt.rules 2018-03-08 05:46:35.000000000 +0000
|
||||
@@ -0,0 +1,2 @@
|
||||
+# SMD serial device on MSM devices
|
||||
+KERNEL=="smdcntl0", ENV{OFONO_DRIVER}="gobi"
|
||||
diff -rN -U3 a/plugins/udevng.c b/plugins/udevng.c
|
||||
--- a/plugins/udevng.c 2017-10-05 14:32:37.000000000 +0000
|
||||
+++ b/plugins/udevng.c 2018-03-08 05:29:16.000000000 +0000
|
||||
|
@ -79,11 +73,12 @@ diff -rN -U3 a/plugins/udevng.c b/plugins/udevng.c
|
|||
|
||||
DBG("qmi=%s net=%s mdm=%s gps=%s diag=%s", qmi, net, mdm, gps, diag);
|
||||
|
||||
@@ -1708,6 +1712,7 @@
|
||||
@@ -1708,6 +1712,8 @@
|
||||
return;
|
||||
|
||||
udev_enumerate_add_match_subsystem(enumerate, "tty");
|
||||
+ udev_enumerate_add_match_subsystem(enumerate, "smdpkt");
|
||||
+ udev_enumerate_add_match_subsystem(enumerate, "rpmsg");
|
||||
udev_enumerate_add_match_subsystem(enumerate, "usb");
|
||||
udev_enumerate_add_match_subsystem(enumerate, "usbmisc");
|
||||
udev_enumerate_add_match_subsystem(enumerate, "net");
|
||||
|
|
2
modem/ofono/udev.rules
Normal file
2
modem/ofono/udev.rules
Normal file
|
@ -0,0 +1,2 @@
|
|||
SYMLINK=="modem", SUBSYSTEM=="smdpkt", ENV{OFONO_DRIVER}="gobi"
|
||||
SYMLINK=="modem", SUBSYSTEM=="rpmsg", ENV{OFONO_DRIVER}="gobi"
|
|
@ -1,6 +1,6 @@
|
|||
pkgname=qcom_rmtfs
|
||||
pkgver=0.0_git20180131
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Qualcomm Remote Filesystem Service Implementation"
|
||||
url="https://github.com/andersson/rmtfs"
|
||||
arch="all"
|
||||
|
@ -12,8 +12,9 @@ _commit="0f800fa4334b03a47941ce1b577f51a69552e414"
|
|||
source="
|
||||
rmtfs.tgz::https://github.com/andersson/rmtfs/archive/"$_commit".tar.gz
|
||||
support-uio.patch
|
||||
point-storage-to-paths-in-etc.patch
|
||||
update-storage-paths.patch
|
||||
qcom_rmtfs.initd
|
||||
udev.rules
|
||||
"
|
||||
builddir="$srcdir""/rmtfs-"$_commit
|
||||
options="!check"
|
||||
|
@ -27,12 +28,13 @@ build() {
|
|||
package() {
|
||||
cd "$builddir"
|
||||
install -D -m 755 rmtfs "$pkgdir"/usr/sbin/"$pkgname"
|
||||
mkdir -p "$pkgdir"/etc/qcom_rmtfs/partition-symlinks
|
||||
install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
|
||||
install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/65-qcom_rmtfs.rules"
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING
|
||||
}
|
||||
|
||||
sha512sums="4b49cdf9d778bf6ae5e838c1da48e76b1004786a0dafefb0097fe3a73e4652c13ed1b011c051a712017f10b43ffc96b2fa133809715577b65fa4ca30cbdc191b rmtfs.tgz
|
||||
a216dc36a7f12bbc125120ac7cc3e3030f3718f7d894c9e6d5e586375cbd76eae897160fdf780da8e3089dbfc0a31f1631dca4a2e850e193135ab825aa8d05cf support-uio.patch
|
||||
3d205bb7e662cca2a3c87a57c1a129cf6c42afbe179f810069843f521decfd869bc82d1c1a367c507eaf880cf33316a2f7b3dbce9c2d9e8150b1500c3910c843 point-storage-to-paths-in-etc.patch
|
||||
21f5ba8b30d4e39046056e131b8eeb4d3bc7b11897b59b800d2d5162acc1629102fdc00b5df1df1ae7497c0cb6bbb0a40fa983c20733210ac01b76f6eaa848ee qcom_rmtfs.initd"
|
||||
877bdc84fdb4a851d94f29e2c6dd391afdb7812d19d0b10dc4449a6a7d0ed86fb3c01fd315bef7bfe24a644b3af102fc1e24194cb76c4e8966b8044a110ed639 update-storage-paths.patch
|
||||
21f5ba8b30d4e39046056e131b8eeb4d3bc7b11897b59b800d2d5162acc1629102fdc00b5df1df1ae7497c0cb6bbb0a40fa983c20733210ac01b76f6eaa848ee qcom_rmtfs.initd
|
||||
2c889f1161fb27cb0a57079e7f7fce78cf3c6a5c33a9e839164d02a23fd6a6910d5f22c955c22608b69bd4515c61733089db0f8e9c46d1fc330e89f8707bd57d udev.rules"
|
||||
|
|
9
modem/qcom_rmtfs/udev.rules
Normal file
9
modem/qcom_rmtfs/udev.rules
Normal file
|
@ -0,0 +1,9 @@
|
|||
# check for mmcblk0 so that an SD card or something doesn't match
|
||||
KERNEL!="mmcblk0p[0-9]*", GOTO="qcom_rmtfs_end"
|
||||
|
||||
ENV{ID_PART_ENTRY_NAME}=="modemst1", SYMLINK+="disk/qcom_rmtfs/modem_fs1"
|
||||
ENV{ID_PART_ENTRY_NAME}=="modemst2", SYMLINK+="disk/qcom_rmtfs/modem_fs2"
|
||||
ENV{ID_PART_ENTRY_NAME}=="fsc", SYMLINK+="disk/qcom_rmtfs/modem_fsc"
|
||||
ENV{ID_PART_ENTRY_NAME}=="fsg", SYMLINK+="disk/qcom_rmtfs/modem_fsg"
|
||||
|
||||
LABEL="qcom_rmtfs_end"
|
|
@ -1,10 +1,9 @@
|
|||
From c8af1ceccfa1c69845a0afb0068917cb16a4ef5b Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hewitt <joey@joeyhewitt.com>
|
||||
Date: Sat, 10 Mar 2018 17:38:00 -0700
|
||||
Subject: [PATCH] point storage to paths in /etc
|
||||
Date: Sat, 2 Apr 2018 17:38:00 -0700
|
||||
Subject: [PATCH] point storage to udev-linked paths
|
||||
|
||||
Device packages will put symlinks there pointing to their storage
|
||||
partitions.
|
||||
udev rules in this package create symlinks the daemon opens
|
||||
---
|
||||
storage.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
@ -21,10 +20,10 @@ index 997b428..8754b98 100644
|
|||
- { "/boot/modem_fs2", "/boot/modem_fs2" },
|
||||
- { "/boot/modem_fsc", "/boot/modem_fsc" },
|
||||
- { "/boot/modem_fsg", "/boot/modem_fsg" },
|
||||
+ { "/boot/modem_fs1", "/etc/qcom_rmtfs/partition-symlinks/modem_fs1" },
|
||||
+ { "/boot/modem_fs2", "/etc/qcom_rmtfs/partition-symlinks/modem_fs2" },
|
||||
+ { "/boot/modem_fsc", "/etc/qcom_rmtfs/partition-symlinks/modem_fsc" },
|
||||
+ { "/boot/modem_fsg", "/etc/qcom_rmtfs/partition-symlinks/modem_fsg" },
|
||||
+ { "/boot/modem_fs1", "/dev/disk/qcom_rmtfs/modem_fs1" },
|
||||
+ { "/boot/modem_fs2", "/dev/disk/qcom_rmtfs/modem_fs2" },
|
||||
+ { "/boot/modem_fsc", "/dev/disk/qcom_rmtfs/modem_fsc" },
|
||||
+ { "/boot/modem_fsg", "/dev/disk/qcom_rmtfs/modem_fsg" },
|
||||
{}
|
||||
};
|
||||
|
28
modem/rpmsgexport/APKBUILD
Normal file
28
modem/rpmsgexport/APKBUILD
Normal file
|
@ -0,0 +1,28 @@
|
|||
pkgname=rpmsgexport
|
||||
pkgver=0.0_git20180228
|
||||
pkgrel=0
|
||||
pkgdesc="Create rpmsg endpoint devices"
|
||||
url="https://github.com/andersson/rpmsgexport"
|
||||
arch="all"
|
||||
license="BSD-3-Clause"
|
||||
depends=""
|
||||
makedepends=""
|
||||
subpackages=""
|
||||
_commit="324d88d668f36c6a5e6a9c2003a050b8a5a3cd60"
|
||||
source="
|
||||
rpmsgexport.tgz::https://github.com/andersson/rpmsgexport/archive/"$_commit".tar.gz
|
||||
"
|
||||
builddir="$srcdir""/rpmsgexport-"$_commit
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
install -D -m 755 rpmsgexport "$pkgdir"/usr/sbin/rpmsgexport
|
||||
}
|
||||
|
||||
sha512sums="c5915bd217afc19dd92d2eefebe17abfeacc54345e7717d6171ad997e07403d5cb54963ed991fe4858937f6be1208de0d823692229f76fb1c8e875c0a3b1004b rpmsgexport.tgz"
|
Loading…
Reference in a new issue