summaryrefslogtreecommitdiffstats
path: root/recipes-navigation
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2019-04-22 20:48:47 -0400
committerScott Murray <scott.murray@konsulko.com>2019-04-23 10:58:40 -0400
commite64cdaccca7309e2d3c5da798e01fbea227bd465 (patch)
tree60025a0074482b69d8982af4c1dbd8eec4d46554 /recipes-navigation
Define telematics demo platform. This layer is similar to meta-agl-demo and meta-agl-cluster-demo, except it defines a small platform for the telematics demo, based on the agl-profile-telematics profile. There is a "agl-telematics-demo" feature defined to enable building the platform. The defined agl-telematics-demo-platform image contains a minimal amount of services to host a simple demo application that reads CAN events and logs them via the MQTT protocol. At the moment, only the raspberrypi3 version has been built and tested, but there is nothing platform specific in the agl-telematics-demo-recorder application that would prevent use on another platform. Change-Id: I0ed94eefeff703afdcec81884bf16c10c63de28f Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'recipes-navigation')
-rw-r--r--recipes-navigation/gpsd/gpsd/sw-device-hook23
-rw-r--r--recipes-navigation/gpsd/gpsd_%.bbappend9
2 files changed, 32 insertions, 0 deletions
diff --git a/recipes-navigation/gpsd/gpsd/sw-device-hook b/recipes-navigation/gpsd/gpsd/sw-device-hook
new file mode 100644
index 0000000..e1e6f7a
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd/sw-device-hook
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Figure out the parent usb device
+USBDEV=`ls -l "$1" |sed -ne 's!^c[^ ]* [0-9]* [^ ]* [^ ]* \([0-9]*\), \([0-9]*\) .*!/sys/dev/char/\1:\2/device/../..!p'`
+
+# Silently ignore any non-USB ports
+if [ ! -r "$USBDEV/idVendor" ] || [ ! -r "$USBDEV/idProduct" ]; then
+ exit 0
+fi
+
+VID=`cat "$USBDEV/idVendor"`
+PID=`cat "$USBDEV/idProduct"`
+case "$2" in
+ ACTIVATE) CMD=START ;;
+ *) CMD=STOP ;;
+esac
+
+case "$VID:$PID" in
+ "1199:9071"|"1199:9079") echo \$GPS_$CMD >"$1" ;;
+ *) ;;
+esac
+
+exit 0
diff --git a/recipes-navigation/gpsd/gpsd_%.bbappend b/recipes-navigation/gpsd/gpsd_%.bbappend
new file mode 100644
index 0000000..80e91f0
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://sw-device-hook"
+
+do_install_append() {
+ # Install device-hook script for starting NMEA output on Sierra Wireless modems
+ install -d ${D}${sysconfdir}/gpsd
+ install -m 0755 ${WORKDIR}/sw-device-hook ${D}${sysconfdir}/gpsd/device-hook
+}