diff options
author | John Klug <john.klug@multitech.com> | 2021-08-19 13:49:48 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-09-07 10:08:04 -0500 |
commit | f7b9504a8dd624c73a2cfcfaa1d4b0c5879a5d60 (patch) | |
tree | 3fa511ffb8cbbb3910c70a723cadd5cc8d58f6d3 /recipes-core | |
parent | 06c091d9b4afcb18cd442eb927f08ebc371f38cc (diff) | |
download | meta-mlinux-f7b9504a8dd624c73a2cfcfaa1d4b0c5879a5d60.tar.gz meta-mlinux-f7b9504a8dd624c73a2cfcfaa1d4b0c5879a5d60.tar.bz2 meta-mlinux-f7b9504a8dd624c73a2cfcfaa1d4b0c5879a5d60.zip |
Have eudev notify mts-io when cellular modem is ready to use after reset
Diffstat (limited to 'recipes-core')
-rw-r--r-- | recipes-core/udev/eudev/cellular_radios.rules | 1 | ||||
-rw-r--r-- | recipes-core/udev/eudev/cellular_radios.sh | 7 | ||||
-rw-r--r-- | recipes-core/udev/eudev_%.bbappend | 10 |
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/ } |