summaryrefslogtreecommitdiff
path: root/recipes-core/udev
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/udev')
-rw-r--r--recipes-core/udev/eudev/cellular_radios.rules1
-rw-r--r--recipes-core/udev/eudev/cellular_radios.sh7
-rw-r--r--recipes-core/udev/eudev_%.bbappend10
3 files changed, 15 insertions, 3 deletions
diff --git a/recipes-core/udev/eudev/cellular_radios.rules b/recipes-core/udev/eudev/cellular_radios.rules
index d7c0521..a74ddf1 100644
--- a/recipes-core/udev/eudev/cellular_radios.rules
+++ b/recipes-core/udev/eudev/cellular_radios.rules
@@ -1,4 +1,5 @@
ACTION=="remove", GOTO="mlinux_end"
+ACTION=="add", RUN+="/etc/udev/scripts/cellular_radios.sh"
SUBSYSTEM!="tty", GOTO="mlinux_end"
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="mlinux_end"
diff --git a/recipes-core/udev/eudev/cellular_radios.sh b/recipes-core/udev/eudev/cellular_radios.sh
new file mode 100644
index 0000000..695831f
--- /dev/null
+++ b/recipes-core/udev/eudev/cellular_radios.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Let mts-io know when the radio is ready
+READYFILE=/sys/devices/platform/mts-io/radio-udev-discovery
+if [[ -f $READYFILE ]] ; then
+ echo 1 >$READYFILE
+fi
+
diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend
index 26bcceb..364288e 100644
--- a/recipes-core/udev/eudev_%.bbappend
+++ b/recipes-core/udev/eudev_%.bbappend
@@ -1,14 +1,18 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+RDEPENDS_${PN} += "bash"
-PR .= ".mlinux6"
+PR .= ".mlinux7"
# add custom rules for persistent modem device names
SRC_URI += "file://cellular_radios.rules \
+ file://cellular_radios.sh \
file://${MACHINE}.rules"
do_install_append() {
- install -m 644 ${WORKDIR}/cellular_radios.rules ${D}${sysconfdir}/udev/rules.d/
- install -m 644 ${WORKDIR}/${MACHINE}.rules ${D}${sysconfdir}/udev/rules.d/
+ install -m 644 ${WORKDIR}/cellular_radios.rules ${D}${sysconfdir}/udev/rules.d/
+ install -m 644 ${WORKDIR}/${MACHINE}.rules ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${sysconfdir}/udev/scripts
+ install -m 755 ${WORKDIR}/cellular_radios.sh ${D}${sysconfdir}/udev/scripts/
}