summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2015-03-26 16:34:50 -0500
committerJesse Gilles <jgilles@multitech.com>2015-03-26 16:34:50 -0500
commit8ffce0d8733757e896e434a725913829de1b416e (patch)
tree19efb0f029fafec7d7604fadeeae66933f41034c /recipes-bsp
parent2b8f80f62f7fa1ef603cbce5dcd8e7469ef39f01 (diff)
downloadmeta-multitech-8ffce0d8733757e896e434a725913829de1b416e.tar.gz
meta-multitech-8ffce0d8733757e896e434a725913829de1b416e.tar.bz2
meta-multitech-8ffce0d8733757e896e434a725913829de1b416e.zip
mts-io: add radio-reset on reboot
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/multitech/mts-io.inc19
-rw-r--r--recipes-bsp/multitech/mts-io/radio-reset.init15
2 files changed, 27 insertions, 7 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index 8a38e01..47e9cae 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -7,14 +7,15 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19
file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
"
DEPENDS = "virtual/kernel"
-INC_PR = "r5"
+INC_PR = "r6"
SRCREV = "${PV}"
SRC_URI = " \
- file://mts-io.init \
git://git.multitech.net/mts-io.git;protocol=git \
file://led-status_heartbeat_trigger \
+ file://mts-io.init \
+ file://radio-reset.init \
"
S = "${WORKDIR}/git"
@@ -40,11 +41,9 @@ do_compile () {
PACKAGES = "${PN}"
FILES_${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko"
-FILES_${PN} += "${sysconfdir}/init.d/mts-io"
+FILES_${PN} += "${sysconfdir}"
FILES_${PN} += "${libdir}/mts-io-sysfs*"
FILES_${PN} += "${sbindir}/mts-io-sysfs"
-FILES_${PN} += "${sysconfdir}/init.d/led-status_heartbeat_trigger"
-FILES_${PN} += "${sysconfdir}/rc5.d/S99led-status_heartbeat_trigger"
INITSCRIPT_NAME = "mts-io"
INITSCRIPT_PARAMS = "start 39 S ."
@@ -64,9 +63,15 @@ fakeroot do_install () {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/mts-io.init ${D}${sysconfdir}/init.d/mts-io
-
- install -d ${D}/${sysconfdir}/rc5.d
+ install -m 0755 ${WORKDIR}/radio-reset.init ${D}${sysconfdir}/init.d/radio-reset
install -m 0755 ${WORKDIR}/led-status_heartbeat_trigger ${D}/${sysconfdir}/init.d/
+
+ # run radio-reset on reboot
+ install -d ${D}${sysconfdir}/rc6.d
+ ln -sf ${sysconfdir}/init.d/radio-reset ${D}/${sysconfdir}/rc6.d/S30radio-reset
+
+ # blink status LED after booted
+ install -d ${D}${sysconfdir}/rc5.d
ln -sf ${sysconfdir}/init.d/led-status_heartbeat_trigger ${D}/${sysconfdir}/rc5.d/S99led-status_heartbeat_trigger
install -m 0755 -d ${D}${sbindir}
diff --git a/recipes-bsp/multitech/mts-io/radio-reset.init b/recipes-bsp/multitech/mts-io/radio-reset.init
new file mode 100644
index 0000000..6fec217
--- /dev/null
+++ b/recipes-bsp/multitech/mts-io/radio-reset.init
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+case $1 in
+ stop)
+ echo "Resetting cellular radio"
+ mts-io-sysfs store radio-reset 0
+ ;;
+
+ *)
+ echo "Usage: $0 {stop}"
+ exit 2
+ ;;
+esac
+
+