summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-08-17 06:41:58 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-09-18 03:46:54 +0000
commite64dbfecda49032aea78af41adb0d7ac2f846dfa (patch)
tree2682bd921c3fb92a5b54bd10ec623ab0138b78c0
parentefed2d255dccafb8ae44f7d71b92b937ad5c42d8 (diff)
meta-agl: gpsd: enable udev GPS device detection
enable the systemd device detection for GPS devices which autoenables it within the gpsd.socket Bug-AGL: SPEC-831 Change-Id: Ifec05c61c7802d0a246ac2c7c609de4ecd56b94d Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/10649 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
-rw-r--r--meta-agl/recipes-navigation/gpsd/gpsd_%.bbappend14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-agl/recipes-navigation/gpsd/gpsd_%.bbappend b/meta-agl/recipes-navigation/gpsd/gpsd_%.bbappend
new file mode 100644
index 000000000..af72aece9
--- /dev/null
+++ b/meta-agl/recipes-navigation/gpsd/gpsd_%.bbappend
@@ -0,0 +1,14 @@
+SYSTEMD_SERVICE_${PN} += " gpsdctl@.service"
+
+do_install_append() {
+ # use the systemd compatible gpsd.rules
+ install -d ${D}/${sysconfdir}/udev/rules.d
+ install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/60-gpsd.rules
+
+ #support for systemd
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${S}/systemd/gpsdctl@.service ${D}${systemd_unitdir}/system
+
+ #autoprobe usb gps devices
+ echo 'USBAUTO="true"' >> ${D}${sysconfdir}/default/gpsd.default
+}