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>
--- /dev/null
+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
+}