diff options
-rw-r--r-- | recipes-bsp/multitech/mts-io.inc | 9 | ||||
-rw-r--r-- | recipes-bsp/multitech/mts-io/radio-reset.default | 2 | ||||
-rw-r--r-- | recipes-bsp/multitech/mts-io/radio-reset.init | 7 |
3 files changed, 16 insertions, 2 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index a71084b..5f17458 100644 --- a/recipes-bsp/multitech/mts-io.inc +++ b/recipes-bsp/multitech/mts-io.inc @@ -16,6 +16,7 @@ SRC_URI = " \ file://led-status_heartbeat_trigger \ file://mts-io.init \ file://radio-reset.init \ + file://radio-reset.default \ " S = "${WORKDIR}/git" @@ -78,4 +79,12 @@ fakeroot do_install () { install -d ${D}${libdir}/mts-io-sysfs install -m 0755 io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs install -m 0755 io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs + + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/radio-reset.default ${D}${sysconfdir}/default/radio-reset +} + +# disable radio-reset for the mtp hardware +do_install_append_mtp() { + sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/radio-reset } diff --git a/recipes-bsp/multitech/mts-io/radio-reset.default b/recipes-bsp/multitech/mts-io/radio-reset.default new file mode 100644 index 0000000..69f4bb7 --- /dev/null +++ b/recipes-bsp/multitech/mts-io/radio-reset.default @@ -0,0 +1,2 @@ +# set to "no" to disable radio-reset on reboot +ENABLED="yes" diff --git a/recipes-bsp/multitech/mts-io/radio-reset.init b/recipes-bsp/multitech/mts-io/radio-reset.init index 6fec217..3ce07c7 100644 --- a/recipes-bsp/multitech/mts-io/radio-reset.init +++ b/recipes-bsp/multitech/mts-io/radio-reset.init @@ -1,5 +1,10 @@ #!/bin/sh +ENABLED="yes" + +[ -r /etc/default/radio-reset ] && source /etc/default/radio-reset +[ "$ENABLED" == "yes" ] || exit 0 + case $1 in stop) echo "Resetting cellular radio" @@ -11,5 +16,3 @@ case $1 in exit 2 ;; esac - - |