From 76a6dc238d84817d99b5086e0083581e2b31c1c1 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Sun, 19 Jul 2015 20:38:19 +0200 Subject: [PATCH] gpsd: create the /dev/gps0 symlink on the sysmocom-odu This is needed for the NTPd GPSd refclock. Also start GPSd using systemd. Signed-off-by: Jan Luebbe --- recipes-extra/gpsd/gpsd/sysmocom-odu/60-gpsd.rules | 1 + recipes-extra/gpsd/gpsd/sysmocom-odu/gpsd-default | 5 +++++ recipes-extra/gpsd/gpsd_3.10.bb | 8 +++----- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 recipes-extra/gpsd/gpsd/sysmocom-odu/60-gpsd.rules create mode 100644 recipes-extra/gpsd/gpsd/sysmocom-odu/gpsd-default diff --git a/recipes-extra/gpsd/gpsd/sysmocom-odu/60-gpsd.rules b/recipes-extra/gpsd/gpsd/sysmocom-odu/60-gpsd.rules new file mode 100644 index 0000000..6cb3d76 --- /dev/null +++ b/recipes-extra/gpsd/gpsd/sysmocom-odu/60-gpsd.rules @@ -0,0 +1 @@ +SUBSYSTEM=="tty", KERNEL=="ttyO2", SYMLINK="gps0" diff --git a/recipes-extra/gpsd/gpsd/sysmocom-odu/gpsd-default b/recipes-extra/gpsd/gpsd/sysmocom-odu/gpsd-default new file mode 100644 index 0000000..d1c4495 --- /dev/null +++ b/recipes-extra/gpsd/gpsd/sysmocom-odu/gpsd-default @@ -0,0 +1,5 @@ +# If you must specify a non-NMEA driver, uncomment and modify the next line +GPSD_SOCKET="/var/run/gpsd.sock" +GPSD_OPTIONS="" +GPS_DEVICES="/dev/gps0" + diff --git a/recipes-extra/gpsd/gpsd_3.10.bb b/recipes-extra/gpsd/gpsd_3.10.bb index 4e215ac..edf361e 100644 --- a/recipes-extra/gpsd/gpsd_3.10.bb +++ b/recipes-extra/gpsd/gpsd_3.10.bb @@ -18,9 +18,9 @@ SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \ file://gpsd-default \ file://gpsd \ file://60-gpsd.rules \ + file://gpsd.service \ " -SRC_URI_append_sysmocom-idu = " file://gpsd.service " SRC_URI[md5sum] = "fc5b03aae38b9b5b6880b31924d0ace3" SRC_URI[sha256sum] = "706fc2c1cf3dfbf87c941f543381bccc9c4dc9f8240eec407dcbf2f70b854320" @@ -106,9 +106,8 @@ do_install_append() { #support for python #install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps #install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps -} -do_install_append_sysmocom-idu() { + #support for systemd install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ install -m 0644 ${WORKDIR}/gpsd.service ${D}${systemd_unitdir}/system/ @@ -143,8 +142,7 @@ DESCRIPTION_libgps = "C service library used for communicating with gpsd" FILES_libgps = "${libdir}/libgps.so.*" DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts" -FILES_gpsd-conf = "${sysconfdir}" -FILES_gpsd-conf_append_sysmocom-idu = " ${systemd_unitdir}/system/ " +FILES_gpsd-conf = "${sysconfdir} ${systemd_unitdir}/system/" CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default" DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes"