summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-06-22 08:31:24 -0500
committerJohn Klug <john.klug@multitech.com>2021-06-22 08:31:24 -0500
commit553f6c7df79d3604010e9b6bbadf49ce203837e5 (patch)
tree8bf88bb49c686ef8a068687a5f9bd0b60331cc4e /recipes-navigation/gpsd
parent7422062e618b0f39b5cb4e70e5c8a32b9a31408f (diff)
downloadmeta-mlinux-553f6c7df79d3604010e9b6bbadf49ce203837e5.tar.gz
meta-mlinux-553f6c7df79d3604010e9b6bbadf49ce203837e5.tar.bz2
meta-mlinux-553f6c7df79d3604010e9b6bbadf49ce203837e5.zip
add gpsd 3.19/3.20
Diffstat (limited to 'recipes-navigation/gpsd')
-rw-r--r--recipes-navigation/gpsd/gpsd-3.19/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch88
-rw-r--r--recipes-navigation/gpsd/gpsd-3.19/0001-include-sys-ttydefaults.h.patch35
-rw-r--r--recipes-navigation/gpsd/gpsd-3.19/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch47
-rw-r--r--recipes-navigation/gpsd/gpsd-3.19/0006-itu_r_tf_460_6.patch23
-rw-r--r--recipes-navigation/gpsd/gpsd-3.19/0006-ubxtimelps.patch190
-rw-r--r--recipes-navigation/gpsd/gpsd-3.19/leap2017Aug31.readme.txt169
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch108
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch79
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0002-SConstruct-fix.patch43
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0006-itu_r_tf_460_6.patch23
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch85
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch72
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/leap2017Aug31.readme.txt169
-rw-r--r--recipes-navigation/gpsd/gpsd_3.16.bb.old8
-rw-r--r--recipes-navigation/gpsd/gpsd_3.18.1.bb.old (renamed from recipes-navigation/gpsd/gpsd_3.18.1.bb)0
-rw-r--r--recipes-navigation/gpsd/gpsd_3.19.bb.old (renamed from recipes-navigation/gpsd/gpsd_3.16.bb)118
-rw-r--r--recipes-navigation/gpsd/gpsd_3.20.bb258
-rw-r--r--recipes-navigation/gpsd/libgps25_3.20.bb.old (renamed from recipes-navigation/gpsd/libgps24_3.18.1.bb)21
18 files changed, 1472 insertions, 64 deletions
diff --git a/recipes-navigation/gpsd/gpsd-3.19/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.19/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
new file mode 100644
index 0000000..a1e71cf
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.19/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
@@ -0,0 +1,88 @@
+From 1e2cea8945bc2183fbe1a012dcd633a352125952 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 24 Apr 2012 18:45:14 +0200
+Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot
+ from python_lib_dir
+
+* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix
+ and with PYTHONPATH from OE it's pointing to native python dir
+
+ $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/
+ $ python
+ Python 2.7.2 (default, Apr 18 2012, 09:19:59)
+ [GCC 4.6.2] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from distutils import sysconfig
+ >>> sysconfig.get_config_vars('INCLUDEPY')
+ ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
+ >>>
+ $ unset PYTHONPATH
+ $ python
+ Python 2.7.2 (default, Apr 18 2012, 09:19:59)
+ [GCC 4.6.2] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from distutils import sysconfig
+ >>> sysconfig.get_config_vars('INCLUDEPY')
+ ['/python2.7']
+ >>> import sysconfig
+ >>> sysconfig.get_config_vars('INCLUDEPY')
+ ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
+* python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
+ returns path to target sysroot
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+---
+ SConstruct | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff -Naru gpsd-3.18.1.orig/SConstruct gpsd-3.18.1/SConstruct
+--- gpsd-3.18.1.orig/SConstruct 2018-10-26 15:31:33.890410700 -0500
++++ gpsd-3.18.1/SConstruct 2018-10-26 17:25:45.202207869 -0500
+@@ -980,7 +980,7 @@
+
+ # Set up configuration for target Python
+
+-PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib()'
++PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib(plat_specific=1)'
+
+ PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'BASECFLAGS',
+ 'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY', 'LDFLAGS']
+@@ -1034,8 +1034,8 @@
+ # follow FHS, put in /usr/local/libXX, not /usr/libXX
+ # may be lib, lib32 or lib64
+ python_libdir = polystr(python_libdir)
+- python_libdir = python_libdir.replace("/usr/lib",
+- "/usr/local/lib")
++# python_libdir = python_libdir.replace("/usr/lib",
++# "/usr/local/lib")
+
+ py_config_text = config.GetPythonValue('config vars',
+ PYTHON_SYSCONFIG_IMPORT,
+@@ -1506,7 +1506,7 @@
+ LINK=ldshared,
+ SHLIBPREFIX="",
+ SHLIBSUFFIX=python_config['SO'],
+- CPPPATH=[python_config['INCLUDEPY']],
++ CPPPATH=[os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY']))] if env['sysroot'] else [python_config['INCLUDEPY']],
+ CPPFLAGS=python_config['OPT'],
+ CFLAGS=python_config['BASECFLAGS'],
+ CXXFLAGS=python_config['BASECFLAGS'])
+@@ -1808,12 +1808,15 @@
+ env.AddPostAction(binaryinstall, '$STRIP $TARGET')
+
+ if env['python']:
++ python_libdir = python_libdir.replace(env['sysroot'], '')
+ python_module_dir = str(python_libdir) + os.sep + 'gps'
+ python_extensions_install = python_env.Install(DESTDIR + python_module_dir,
+ python_built_extensions)
+ if ((not env['debug'] and not env['profiling'] and
+ not env['nostrip'] and not sys.platform.startswith('darwin'))):
+ python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET')
++ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \
++ % (python_libdir, ))
+
+ python_modules_install = python_env.Install(DESTDIR + python_module_dir,
+ python_modules)
diff --git a/recipes-navigation/gpsd/gpsd-3.19/0001-include-sys-ttydefaults.h.patch b/recipes-navigation/gpsd/gpsd-3.19/0001-include-sys-ttydefaults.h.patch
new file mode 100644
index 0000000..e91e4e9
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.19/0001-include-sys-ttydefaults.h.patch
@@ -0,0 +1,35 @@
+From f221fa959c80b43c65426500a6836a1b5cf6fe0c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 17 Aug 2016 02:16:12 +0000
+Subject: [PATCH] include sys/ttydefaults.h
+
+This is needed for CTRL definition, as exposed by musl on glibc
+this include file gets pulled indirectly.
+
+/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL'
+clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
+scons: *** [gpsmon] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Foreward port to gpsd 3.16
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ gpsmon.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gpsmon.c b/gpsmon.c
+index 89c43ee2..5cc0dabd 100644
+--- a/gpsmon.c
++++ b/gpsmon.c
+@@ -24,6 +24,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/select.h>
++#include <sys/ttydefaults.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+
+--
+2.12.0
+
diff --git a/recipes-navigation/gpsd/gpsd-3.19/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/recipes-navigation/gpsd/gpsd-3.19/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
new file mode 100644
index 0000000..ad690ce
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.19/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
@@ -0,0 +1,47 @@
+From 697e2e9ff97487266d817cdd41bacc83f681e3d7 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sun, 29 Apr 2012 00:05:59 +0200
+Subject: [PATCH 4/4] SConstruct: disable html and man docs building because
+ xmlto-native from OE is broken
+
+It will try to load dtd and fail:
+| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1
+| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3)
+| xmlto: Fix document syntax or use --skip-validation option
+| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+| "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+| ^
+| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate
+| mv: cannot stat `gpsctl.1': No such file or directory
+| scons: *** [gpsctl.1] Error 1
+| scons: building terminated because of errors.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+---
+ SConstruct | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff -Naru gpsd-3.18.1.orig/SConstruct gpsd-3.18.1/SConstruct
+--- gpsd-3.18.1.orig/SConstruct 2018-10-26 18:17:17.102116334 -0500
++++ gpsd-3.18.1/SConstruct 2018-10-26 18:18:40.102113877 -0500
+@@ -935,11 +935,11 @@
+
+ manbuilder = htmlbuilder = None
+ if env['manbuild']:
+- if config.CheckXsltproc():
++ if False and config.CheckXsltproc():
+ build = "xsltproc --nonet %s $SOURCE >$TARGET"
+ htmlbuilder = build % docbook_html_uri
+ manbuilder = build % docbook_man_uri
+- elif WhereIs("xmlto"):
++ elif False and WhereIs("xmlto"):
+ xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` " \
+ "`dirname $TARGET`"
+ htmlbuilder = xmlto % "html-nochunks"
diff --git a/recipes-navigation/gpsd/gpsd-3.19/0006-itu_r_tf_460_6.patch b/recipes-navigation/gpsd/gpsd-3.19/0006-itu_r_tf_460_6.patch
new file mode 100644
index 0000000..8e8d814
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.19/0006-itu_r_tf_460_6.patch
@@ -0,0 +1,23 @@
+diff -Naur old/ntpshmwrite.c new/ntpshmwrite.c
+--- old/ntpshmwrite.c 2017-01-23 10:00:05.497129473 -0600
++++ new/ntpshmwrite.c 2017-01-23 09:47:58.881627772 -0600
+@@ -32,11 +32,18 @@
+ * NTP expects leap pending for only 1 month prior to insertion
+ * Per http://bugs.ntp.org/1090 */
+ (void)gmtime_r( &(td->real.tv_sec), &tm);
++/* This code contradicts page 3 section 2.1 of ITU-R RV.460-6 that
++ * leap second may occur at the last second of a month, with
++ * preference for December and June, 2nd preference to March and
++ * September.
++ * https://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-200202-I!!PDF-E.pdf
++ */
++#ifdef NOTITU_R_TF_460_6
+ if ( 5 != tm.tm_mon && 11 != tm.tm_mon ) {
+ /* Not june, not December, no way */
+ leap_notify = LEAP_NOWARNING;
+ }
+-
++#endif /* NOTITU_R_TF_460_6 */
+ /* we use the shmTime mode 1 protocol
+ *
+ * ntpd does this:
diff --git a/recipes-navigation/gpsd/gpsd-3.19/0006-ubxtimelps.patch b/recipes-navigation/gpsd/gpsd-3.19/0006-ubxtimelps.patch
new file mode 100644
index 0000000..e4a4171
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.19/0006-ubxtimelps.patch
@@ -0,0 +1,190 @@
+From f3e7feaccddd5bc249be06dadd7cc96d10dcee22 Mon Sep 17 00:00:00 2001
+From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
+Date: Thu, 3 Dec 2020 12:59:37 +0200
+Subject: [PATCH] ubx time leap seconds
+
+---
+ driver_ubx.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 127 insertions(+), 1 deletion(-)
+
+diff --git a/driver_ubx.c b/driver_ubx.c
+index 6464d94..a5f3737 100644
+--- a/driver_ubx.c
++++ b/driver_ubx.c
+@@ -61,6 +61,29 @@
+ #define UBX_CFG_LEN 20
+ #define outProtoMask 14
+
++#ifdef UBLOXTIMELS_ENABLE
++/* UBX-NAV-TIMELS support */
++static char *srcOfCurrLs[] = {
++ "firmware",
++ "GPS GLONASS difference",
++ "GPS",
++ "SBAS",
++ "BeiDou",
++ "Galileo",
++ "Aided data",
++ "Configured"
++};
++static char *srcOfLsChange[] = {
++ "No Source",
++ "Undefined",
++ "GPS",
++ "SBAS",
++ "BeiDou",
++ "Galileo",
++ "GLONOSS",
++};
++#endif /* UBLOXTIMELS_ENABLE */
++
+ static gps_mask_t ubx_parse(struct gps_device_t *session, unsigned char *buf,
+ size_t len);
+ static gps_mask_t ubx_msg_nav_eoe(struct gps_device_t *session,
+@@ -810,6 +833,90 @@ static void ubx_msg_nav_timels(struct gps_device_t *session,
+ }
+ }
+
++#ifdef UBLOXTIMELS_ENABLE
++/**
++ * Navigation time to leap second
++ *
++ * Sets leap_notify if leap second is < 23 hours away.
++ */
++static void
++ubx_msg_nav_timels(struct gps_device_t *session, unsigned char *buf,
++ size_t data_len)
++{
++ int version;
++ unsigned int flags;
++ int valid_curr_ls;
++ int valid_time_to_ls_event;
++
++ if (data_len != 24) {
++ gpsd_log(&session->context->errout, LOG_WARN,
++ "UBX-NAV-TIMELS: unexpected length %d, expecting 24\n",
++ data_len);
++ return;
++ }
++ version = getsb(buf,4);
++ /* Only version 0 is defined so far. */
++ flags = (unsigned int)getub(buf, 23);
++ gpsd_log(&session->context->errout, LOG_DATA,
++ "UBX-NAV-TIMELS: flags 0x%x message version %d\n",flags, version);
++ valid_curr_ls = flags & UBX_TIMELS_VALID_CURR_LS;
++ valid_time_to_ls_event = flags & UBX_TIMELS_VALID_TIME_LS_EVT;
++ if(valid_curr_ls) {
++ unsigned int src_of_curr_ls = getub(buf,8);
++ int curr_ls = getsb(buf,9);
++ char *src = "Unknown";
++
++ if(src_of_curr_ls < (sizeof srcOfCurrLs/(sizeof srcOfCurrLs[0])))
++ src = srcOfCurrLs[src_of_curr_ls];
++
++ gpsd_log(&session->context->errout, LOG_DATA,
++ "UBX-NAV-TIMELS: source_of_current_leapsecond=%u:%s curr_ls=%d\n",
++ src_of_curr_ls,src,curr_ls);
++ session->context->leap_seconds = curr_ls;
++ session->context->valid |= LEAP_SECOND_VALID;
++ } /* Valid current leap second */
++ if(valid_time_to_ls_event) {
++ char *src="Unknown";
++ unsigned int src_of_ls_change;
++ unsigned short dateOfLSGpsWn, dateOfLSGpsDn;
++ int lsChange = getsb(buf,11);
++ int timeToLsEvent = getles32(buf,12);
++ src_of_ls_change = getub(buf,10);
++ if(src_of_ls_change < (sizeof srcOfLsChange/(sizeof srcOfLsChange[0])))
++ src = srcOfLsChange[src_of_ls_change];
++ dateOfLSGpsWn = getles16(buf,16);
++ dateOfLSGpsDn = getles16(buf,18);
++ gpsd_log(&session->context->errout, LOG_DATA,
++ "UBX_NAV_TIMELS: source_of_leapsecond_change=%u:%s "
++ "leapSecondChage=%d timeToLsEvent=%d\n",
++ src_of_ls_change,src,lsChange,timeToLsEvent);
++ gpsd_log(&session->context->errout, LOG_DATA,
++ "UBX_NAV_TIMELS: dateOfLSGpsWn=%d dateOfLSGpsDn=%d\n",
++ dateOfLSGpsWn,dateOfLSGpsDn);
++ if(timeToLsEvent < 60*60*23 && timeToLsEvent > 0) {
++ if(lsChange == 0)
++ session->context->leap_notify = LEAP_NOWARNING;
++ else if (lsChange == 1)
++ session->context->leap_notify = LEAP_ADDSECOND;
++ else if (lsChange == -1)
++ session->context->leap_notify = LEAP_DELSECOND;
++ } else
++ session->context->leap_notify = LEAP_NOWARNING;
++
++ if (session->context->leap_notify == LEAP_ADDSECOND)
++ gpsd_log(&session->context->errout,LOG_INF,
++ "UBX_NAV_TIMELS: Add leap second today\n");
++ else if (session->context->leap_notify == LEAP_DELSECOND)
++ gpsd_log(&session->context->errout,LOG_INF,
++ "UBX_NAV_TIMELS: Remove leap second today\n");
++
++ gpsd_log(&session->context->errout, LOG_DATA,
++ "UBX_NAV_TIMELS: leaving: leap_notify=%d\n",
++ session->context->leap_notify);
++ }
++}
++#endif /* UBLOXTIMELS_ENABLE */
++
+ /**
+ * Geodetic position solution message
+ * UBX-NAV-POSLLH, Class 1, ID 2
+@@ -1767,7 +1874,10 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
+ mask = ubx_msg_nav_timegps(session, &buf[UBX_PREFIX_LEN], data_len);
+ break;
+ case UBX_NAV_TIMELS:
+- ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN], data_len);
++ gpsd_log(&session->context->errout, LOG_DATA, "UBX_NAV_TIMELS\n");
++#ifdef UBLOXTIMELS_ENABLE
++ ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN],data_len);
++#endif // UBLOXTIMELS_ENABLE
+ break;
+ case UBX_NAV_TIMEUTC:
+ gpsd_log(&session->context->errout, LOG_DATA, "UBX-NAV-TIMEUTC\n");
+@@ -1811,6 +1921,7 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
+ gpsd_log(&session->context->errout, LOG_DATA, "UBX-RXM-RTCM\n");
+ break;
+ case UBX_RXM_SFRB:
++ gpsd_log(&session->context->errout, LOG_DATA, "UBX_RXM_SFRB\n");
+ mask = ubx_rxm_sfrb(session, &buf[UBX_PREFIX_LEN], data_len);
+ break;
+ case UBX_RXM_SFRBX:
+@@ -2154,11 +2265,19 @@ static void ubx_cfg_prt(struct gps_device_t *session,
+ msg[2] = 0x00; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+
++#ifdef UBLOXTIMELS_ENABLE
++ msg[0] = 0x01; /* class */
++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
++ msg[2] = 0xff; /* rate */
++#endif /* UBLOXTIMELS_ENABLE */
++ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
++
+ /* NAV-SVINFO became NAV-SAT */
+ msg[0] = 0x01; /* class */
+ msg[1] = 0x30; /* msg id = NAV-SVINFO */
+ msg[2] = 0x00; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
++
+ msg[0] = 0x01; /* class */
+ msg[1] = 0x35; /* msg id = NAV-SAT */
+ msg[2] = 0x00; /* rate */
+@@ -2263,6 +2382,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
+ msg[2] = 0x01; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+
++#ifdef UBLOXTIMELS_ENABLE
++ msg[0] = 0x01; /* class */
++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
++ msg[2] = 0xff; /* rate */
++ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
++#endif /* UBLOXTIMELS_ENABLE */
++
+ /* UBX-NAV-SVINFO deprecated in u-blox 8, gone in u-blox 9.
+ * Use UBX-NAV-SAT after u-blox 7 */
+ if (10 > session->driver.ubx.protver) {
+--
+2.7.4
diff --git a/recipes-navigation/gpsd/gpsd-3.19/leap2017Aug31.readme.txt b/recipes-navigation/gpsd/gpsd-3.19/leap2017Aug31.readme.txt
new file mode 100644
index 0000000..d9bf4b1
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.19/leap2017Aug31.readme.txt
@@ -0,0 +1,169 @@
+The purpose of this test is to verify leap second operation with ntp. This is done
+by artificially setting the leap second offset in gpsd. ntp is not modified.
+Software levels:
+ gpsd - 3.16-m2.9 + the Aug 31 test patch
+ ntp - 4.2.8p9-r0.mlinux3.0. Release candidate for mLinux 4.0
+
+ntpd leap second test gpsd artificially causes a leap second on Aug 31, 2017 23:59:59 UTC.
+
+The patch for this test is leap2017Aug31.patch. This patch replaces 0006-ubxtimelps.patch.
+
+
+Kernel Log:
+
+2017-07-31T18:50:02.012018-05:00 leaptest CROND[5205]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+2017-07-31T18:55:01.119140-05:00 leaptest CROND[5223]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+2017-07-31T18:59:59.016393-05:00 leaptest kernel: Clock: inserting leap second 23:59:60 UTC
+2017-07-31T19:00:01.215873-05:00 leaptest CROND[5240]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+2017-07-31T19:00:07.381218-05:00 leaptest ntpd[501]: kernel reports leap second has occurred
+2017-07-31T19:00:07.381528-05:00 leaptest ntpd[501]: kernel reports leap second has occurred
+2017-07-31T19:05:01.313170-05:00 leaptest CROND[5258]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+
+
+Time log from user space. 18:59:59 repeats twice 19:00:00 appears only once.:
+
+2017-07-31T18:59:57.855895-05:00 leaptest CTST: epoch: 1501545597.855 boot: 442607.123
+2017-07-31T18:59:58.106318-05:00 leaptest CTST: epoch: 1501545598.106 boot: 442607.373
+2017-07-31T18:59:58.356758-05:00 leaptest CTST: epoch: 1501545598.356 boot: 442607.624
+2017-07-31T18:59:58.607171-05:00 leaptest CTST: epoch: 1501545598.606 boot: 442607.874
+2017-07-31T18:59:58.857621-05:00 leaptest CTST: epoch: 1501545598.857 boot: 442608.124
+2017-07-31T18:59:59.108072-05:00 leaptest CTST: epoch: 1501545599.107 boot: 442608.375
+2017-07-31T18:59:59.358506-05:00 leaptest CTST: epoch: 1501545599.358 boot: 442608.625
+2017-07-31T18:59:59.608952-05:00 leaptest CTST: epoch: 1501545599.608 boot: 442608.876
+2017-07-31T18:59:59.859364-05:00 leaptest CTST: epoch: 1501545599.859 boot: 442609.126
+2017-07-31T18:59:59.109780-05:00 leaptest CTST: epoch: 1501545599.109 boot: 442609.377
+2017-07-31T18:59:59.360195-05:00 leaptest CTST: epoch: 1501545599.359 boot: 442609.627
+2017-07-31T18:59:59.610608-05:00 leaptest CTST: epoch: 1501545599.610 boot: 442609.877
+2017-07-31T18:59:59.861023-05:00 leaptest CTST: epoch: 1501545599.860 boot: 442610.128
+2017-07-31T19:00:00.111461-05:00 leaptest CTST: epoch: 1501545600.111 boot: 442610.378
+2017-07-31T19:00:00.361916-05:00 leaptest CTST: epoch: 1501545600.361 boot: 442610.629
+2017-07-31T19:00:00.612329-05:00 leaptest CTST: epoch: 1501545600.612 boot: 442610.879
+2017-07-31T19:00:00.862825-05:00 leaptest CTST: epoch: 1501545600.862 boot: 442611.130
+2017-07-31T19:00:01.113251-05:00 leaptest CTST: epoch: 1501545601.112 boot: 442611.380
+2017-07-31T19:00:01.363695-05:00 leaptest CTST: epoch: 1501545601.363 boot: 442611.630
+2017-07-31T19:00:01.614114-05:00 leaptest CTST: epoch: 1501545601.613 boot: 442611.881
+2017-07-31T19:00:01.864524-05:00 leaptest CTST: epoch: 1501545601.864 boot: 442612.131
+
+
+
+Leap second flag set artifically by gpsd, and noticed by ntp (leap=01 for SHM(0) and SHM(2) and leap_armed):
+2017-07-31T18:59:22.952281-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:22.962756-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T18:59:22.964152-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:23.130829-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T18:59:23.131062-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T18:59:23.131258-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T18:59:23.131451-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T18:59:23.131647-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T18:59:23.131840-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T18:59:23.132031-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T18:59:23.132220-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T18:59:23.138000-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:23.138206-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T18:59:23.138404-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:23.434429-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T18:59:23.434666-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T18:59:23.434863-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 20 64 377 0.000 6.410 1.265
+2017-07-31T18:59:23.435055-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 19 64 377 0.000 0.062 0.008
+2017-07-31T18:59:23.435249-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:00:22.459905-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.460141-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+
+
+
+2017-07-31T19:00:22.460343-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.618627-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:00:22.618857-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:00:22.619057-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:00:22.619252-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:00:22.619444-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:00:22.619634-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:00:22.619824-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:00:22.620016-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:00:22.628414-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.628654-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:00:22.628868-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.922779-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:00:22.924191-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:00:22.925595-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 16 64 377 0.000 7.369 0.661
+2017-07-31T19:00:22.927000-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 15 64 377 0.000 0.059 0.008
+2017-07-31T19:00:22.928402-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:01:22.942937-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:22.943171-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:01:22.943371-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.118319-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:01:23.118551-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:01:23.118750-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:01:23.118943-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:01:23.119137-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:01:23.119330-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:01:23.119520-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:01:23.119710-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:01:23.128565-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.128809-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:01:23.129026-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.417707-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:01:23.417942-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:01:23.418140-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 13 64 377 0.000 1007.48 1000.36
+2017-07-31T19:01:23.418337-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 12 64 377 0.000 1000.05 999.994
+2017-07-31T19:01:23.418529-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:02:23.442898-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.443131-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:02:23.443332-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.617413-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+
+
+Offset goes to one second, because there was no leap second:
+2017-07-31T19:00:22.618857-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:00:22.619057-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:00:22.619252-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:00:22.619444-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:00:22.619634-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:00:22.619824-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:00:22.620016-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:00:22.628414-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.628654-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:00:22.628868-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.922779-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:00:22.924191-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:00:22.925595-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 16 64 377 0.000 7.369 0.661
+2017-07-31T19:00:22.927000-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 15 64 377 0.000 0.059 0.008
+2017-07-31T19:00:22.928402-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:01:22.942937-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:22.943171-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:01:22.943371-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.118319-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:01:23.118551-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:01:23.118750-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:01:23.118943-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:01:23.119137-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:01:23.119330-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:01:23.119520-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:01:23.119710-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:01:23.128565-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.128809-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:01:23.129026-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.417707-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:01:23.417942-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:01:23.418140-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 13 64 377 0.000 1007.48 1000.36
+2017-07-31T19:01:23.418337-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 12 64 377 0.000 1000.05 999.994
+2017-07-31T19:01:23.418529-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:02:23.442898-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.443131-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:02:23.443332-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.617413-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+
+
+Leap second flag is clear, leap_armed is removed so no leap second on Aug 1, 2017:
+2017-07-31T19:38:42.630432-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:38:42.630636-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:38:42.791369-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:38:42.791605-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:38:42.791803-05:00 leaptest ntpstatus.sh: 1 18654 945a yes yes none candidate sys_peer 5
+2017-07-31T19:38:42.791994-05:00 leaptest ntpstatus.sh: 2 18655 966a yes yes none sys.peer sys_peer 6
+2017-07-31T19:38:42.792189-05:00 leaptest ntpstatus.sh: 3 18656 8033 yes no none reject unreachable 3
+2017-07-31T19:38:42.792379-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=00, stratum=0
+2017-07-31T19:38:42.802875-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=00, stratum=0
+2017-07-31T19:38:42.804254-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=00, stratum=14
+
+
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch b/recipes-navigation/gpsd/gpsd-3.20/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch
new file mode 100644
index 0000000..b021d0b
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch
@@ -0,0 +1,108 @@
+Subject: [PATCH] Revert "SConstruct: Add test for sizeof(time_t), result in
+ SIZEOF_TIME_T."
+
+This reverts commit b32ff1a86c44fa738dabaf63de1b5462e0071ad3.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+---
+ SConstruct | 54 ++++--------------------------------------
+ android/gpsd_config.in | 1 -
+ 2 files changed, 5 insertions(+), 50 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 33e0ff326..e3c62fa3c 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -597,42 +597,6 @@ def CheckHeaderDefines(context, file, define):
+ return ret
+
+
+-def CheckSizeOf(context, type):
+- """Check sizeof 'type'"""
+- context.Message('Checking size of ' + type + '... ')
+-
+- program = """
+-#include <stdlib.h>
+-#include <stdio.h>
+-
+-/*
+- * The CheckSizeOf function does not have a way for the caller to
+- * specify header files to be included to provide the type being
+- * checked. As a workaround until that is remedied, include the
+- * header required for time_t, which is the sole current use of this
+- * function.
+- */
+-#include <time.h>
+-
+-int main() {
+- printf("%d", (int)sizeof(""" + type + """));
+- return 0;
+-}
+-"""
+-
+- # compile it
+- ret = context.TryCompile(program, '.c')
+- if 0 == ret:
+- announce('ERROR: TryCompile failed\n')
+- # fall back to sizeof(time_t) is 8
+- return '8'
+-
+- # run it
+- ret = context.TryRun(program, '.c')
+- context.Result(ret[0])
+- return ret[1]
+-
+-
+ def CheckCompilerDefines(context, define):
+ context.Message('Checking if compiler supplies %s... ' % (define,))
+ ret = context.TryLink("""
+@@ -703,15 +667,13 @@ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
+
+ # CheckXsltproc works, but result is incorrectly saved as "no"
+ config = Configure(env, custom_tests={
+- 'CheckC11': CheckC11,
+- 'CheckCompilerDefines': CheckCompilerDefines,
+- 'CheckCompilerOption': CheckCompilerOption,
+- 'CheckHeaderDefines': CheckHeaderDefines,
+ 'CheckPKG': CheckPKG,
+- 'CheckSizeOf': CheckSizeOf,
+ 'CheckXsltproc': CheckXsltproc,
+- 'GetPythonValue': GetPythonValue,
+- })
++ 'CheckCompilerOption': CheckCompilerOption,
++ 'CheckCompilerDefines': CheckCompilerDefines,
++ 'CheckC11': CheckC11,
++ 'CheckHeaderDefines': CheckHeaderDefines,
++ 'GetPythonValue': GetPythonValue})
+
+ # Use print, rather than announce, so we see it in -s mode.
+ print("This system is: %s" % sys.platform)
+@@ -1043,12 +1005,6 @@ else:
+ confdefs.append("/* #undef HAVE_%s_H */\n"
+ % hdr.replace("/", "_").upper())
+
+- sizeof_time_t = config.CheckSizeOf("time_t")
+- confdefs.append("#define SIZEOF_TIME_T %s\n" % sizeof_time_t)
+- announce("sizeof(time_t) is %s" % sizeof_time_t)
+- if 4 >= int(sizeof_time_t):
+- announce("WARNING: time_t is too small. It will fail in 2038")
+-
+ # check function after libraries, because some function require libraries
+ # for example clock_gettime() require librt on Linux glibc < 2.17
+ for f in ("cfmakeraw", "clock_gettime", "daemon", "fcntl", "fork",
+diff --git a/android/gpsd_config.in b/android/gpsd_config.in
+index 758251986..d240f6d34 100644
+--- a/android/gpsd_config.in
++++ b/android/gpsd_config.in
+@@ -19,7 +19,6 @@
+ #define HAVE_ARPA_INET_H 1
+ #define HAVE_SYSLOG_H 1
+ #define HAVE_DAEMON 1
+-#define SIZEOF_TIME_T 8
+ #define HAVE_CLOCK_GETTIME 1
+ #define HAVE_STRPTIME 1
+ #define HAVE_GMTIME_R 1
+--
+2.26.2
+
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.20/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
new file mode 100644
index 0000000..23ae5e5
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
@@ -0,0 +1,79 @@
+From 5464d9e1bfd1a1c54338ec7c4148cad1b222ef93 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 24 Apr 2012 18:45:14 +0200
+Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot
+ from python_lib_dir
+
+* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix
+ and with PYTHONPATH from OE it's pointing to native python dir
+
+ $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/
+ $ python
+ Python 2.7.2 (default, Apr 18 2012, 09:19:59)
+ [GCC 4.6.2] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from distutils import sysconfig
+ >>> sysconfig.get_config_vars('INCLUDEPY')
+ ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
+ >>>
+ $ unset PYTHONPATH
+ $ python
+ Python 2.7.2 (default, Apr 18 2012, 09:19:59)
+ [GCC 4.6.2] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from distutils import sysconfig
+ >>> sysconfig.get_config_vars('INCLUDEPY')
+ ['/python2.7']
+ >>> import sysconfig
+ >>> sysconfig.get_config_vars('INCLUDEPY')
+ ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
+* python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
+ returns path to target sysroot
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+
+---
+ SConstruct | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index b8f3fb1..883e06d 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -980,7 +980,7 @@ else:
+
+ # Set up configuration for target Python
+
+-PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib()'
++PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib(plat_specific=1)'
+
+ PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'BASECFLAGS',
+ 'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY', 'LDFLAGS']
+@@ -1506,7 +1506,7 @@ else:
+ LINK=ldshared,
+ SHLIBPREFIX="",
+ SHLIBSUFFIX=python_config['SO'],
+- CPPPATH=[python_config['INCLUDEPY']],
++ CPPPATH=[os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY']))] if env['sysroot'] else [python_config['INCLUDEPY']],
+ CPPFLAGS=python_config['OPT'],
+ CFLAGS=python_config['BASECFLAGS'],
+ CXXFLAGS=python_config['BASECFLAGS'])
+@@ -1808,12 +1808,14 @@ if ((not env['debug'] and not env['profiling'] and not env['nostrip'] and
+ env.AddPostAction(binaryinstall, '$STRIP $TARGET')
+
+ if env['python']:
+- python_module_dir = str(python_libdir) + os.sep + 'gps'
++ python_module_dir = python_libdir.replace(env['sysroot'], '') + os.sep + 'gps'
+ python_extensions_install = python_env.Install(DESTDIR + python_module_dir,
+ python_built_extensions)
+ if ((not env['debug'] and not env['profiling'] and
+ not env['nostrip'] and not sys.platform.startswith('darwin'))):
+ python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET')
++ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \
++ % (python_libdir, ))
+
+ python_modules_install = python_env.Install(DESTDIR + python_module_dir,
+ python_modules)
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0002-SConstruct-fix.patch b/recipes-navigation/gpsd/gpsd-3.20/0002-SConstruct-fix.patch
new file mode 100644
index 0000000..111e304
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0002-SConstruct-fix.patch
@@ -0,0 +1,43 @@
+From f59c31cc7c36944e9a45ac920ce14233060a7a11 Mon Sep 17 00:00:00 2001
+From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
+Date: Tue, 8 Dec 2020 11:04:12 +0200
+Subject: [PATCH] fix unbuildable SConstruct. the fix was taken from previous
+ versions
+
+---
+ SConstruct | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 6546f73..3742e43 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -386,17 +386,19 @@ env['SC_PYTHON'] = sys.executable # Path to SCons Python
+ # So we rely on MergeFlags/ParseFlags to do the right thing for us.
+ env['STRIP'] = "strip"
+ env['PKG_CONFIG'] = "pkg-config"
+-for i in ["AR", "CC", "CXX", "LD",
+- "PKG_CONFIG", "STRIP", "TAR"]:
++for i in ["AR", "ARFLAGS", "CC", "CCFLAGS", "CFLAGS", "CXX", "CXXFLAGS", "LD",
++ "LINKFLAGS", "PKG_CONFIG", "STRIP", "TAR"]:
+ if i in os.environ:
+ j = i
+ if i == "LD":
+ i = "SHLINK"
+- env[i] = os.getenv(j)
+-for i in ["ARFLAGS", "CFLAGS", "CXXFLAGS", "LDFLAGS", "SHLINKFLAGS",
+- "CPPFLAGS", "CCFLAGS", "LINKFLAGS"]:
++ if i in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
++ env.Replace(**{j: Split(os.getenv(i))})
++ else:
++ env.Replace(**{j: os.getenv(i)})
++for flag in ["LDFLAGS", "SHLINKFLAGS", "CPPFLAGS"]:
+ if i in os.environ:
+- env.MergeFlags(Split(os.getenv(i)))
++ env.MergeFlags({flag: Split(os.getenv(flag))})
+
+
+ # Keep scan-build options in the environment
+--
+2.7.4
+
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0006-itu_r_tf_460_6.patch b/recipes-navigation/gpsd/gpsd-3.20/0006-itu_r_tf_460_6.patch
new file mode 100644
index 0000000..8e8d814
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0006-itu_r_tf_460_6.patch
@@ -0,0 +1,23 @@
+diff -Naur old/ntpshmwrite.c new/ntpshmwrite.c
+--- old/ntpshmwrite.c 2017-01-23 10:00:05.497129473 -0600
++++ new/ntpshmwrite.c 2017-01-23 09:47:58.881627772 -0600
+@@ -32,11 +32,18 @@
+ * NTP expects leap pending for only 1 month prior to insertion
+ * Per http://bugs.ntp.org/1090 */
+ (void)gmtime_r( &(td->real.tv_sec), &tm);
++/* This code contradicts page 3 section 2.1 of ITU-R RV.460-6 that
++ * leap second may occur at the last second of a month, with
++ * preference for December and June, 2nd preference to March and
++ * September.
++ * https://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-200202-I!!PDF-E.pdf
++ */
++#ifdef NOTITU_R_TF_460_6
+ if ( 5 != tm.tm_mon && 11 != tm.tm_mon ) {
+ /* Not june, not December, no way */
+ leap_notify = LEAP_NOWARNING;
+ }
+-
++#endif /* NOTITU_R_TF_460_6 */
+ /* we use the shmTime mode 1 protocol
+ *
+ * ntpd does this:
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch b/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch
new file mode 100644
index 0000000..695130b
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch
@@ -0,0 +1,85 @@
+From 9c84fb9f0ceda3575f322a7da8021b1a30613906 Mon Sep 17 00:00:00 2001
+From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
+Date: Tue, 8 Dec 2020 16:23:30 +0200
+Subject: [PATCH] add missing leap seconds parts
+
+---
+ SConstruct | 1 +
+ driver_ubx.c | 21 ++++++++++++++++++++-
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 33e0ff3..cd1a063 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -192,6 +192,7 @@ boolopts = (
+ ("tripmate", True, "DeLorme TripMate support"),
+ ("tsip", True, "Trimble TSIP support"),
+ ("ublox", True, "u-blox Protocol support"),
++ ("ubloxtimels", False, "u-blox UBX-NAV-TIMELS support (leap second)"),
+ # Non-GPS protocols
+ ("aivdm", True, "AIVDM support"),
+ ("gpsclock", True, "GPSClock support"),
+diff --git a/driver_ubx.c b/driver_ubx.c
+index c2965ee..57cff58 100644
+--- a/driver_ubx.c
++++ b/driver_ubx.c
+@@ -886,6 +886,7 @@ static void ubx_msg_nav_timels(struct gps_device_t *session,
+ }
+ }
+
++
+ /**
+ * Geodetic position solution message
+ * UBX-NAV-POSLLH, Class 1, ID 2
+@@ -1932,7 +1933,10 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
+ mask = ubx_msg_nav_timegps(session, &buf[UBX_PREFIX_LEN], data_len);
+ break;
+ case UBX_NAV_TIMELS:
+- ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN], data_len);
++ GPSD_LOG(LOG_PROG, &session->context->errout, "UBX_NAV_TIMELS\n");
++#ifdef UBLOXTIMELS_ENABLE
++ ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN],data_len);
++#endif // UBLOXTIMELS_ENABLE
+ break;
+ case UBX_NAV_TIMEUTC:
+ GPSD_LOG(LOG_DATA, &session->context->errout, "UBX-NAV-TIMEUTC\n");
+@@ -1977,6 +1981,7 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
+ GPSD_LOG(LOG_DATA, &session->context->errout, "UBX-RXM-RTCM\n");
+ break;
+ case UBX_RXM_SFRB:
++ GPSD_LOG(LOG_DATA, &session->context->errout, "UBX_RXM_SFRB\n");
+ mask = ubx_rxm_sfrb(session, &buf[UBX_PREFIX_LEN], data_len);
+ break;
+ case UBX_RXM_SFRBX:
+@@ -2322,6 +2327,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
+ msg[2] = 0x00; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+
++#ifdef UBLOXTIMELS_ENABLE
++ msg[0] = 0x01; /* class */
++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
++ msg[2] = 0xff; /* rate */
++#endif /* UBLOXTIMELS_ENABLE */
++ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
++
+ /* NAV-SVINFO became NAV-SAT */
+ msg[0] = 0x01; /* class */
+ msg[1] = 0x30; /* msg id = NAV-SVINFO */
+@@ -2431,6 +2443,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
+ msg[2] = 0x01; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+
++#ifdef UBLOXTIMELS_ENABLE
++ msg[0] = 0x01; /* class */
++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
++ msg[2] = 0xff; /* rate */
++ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
++#endif /* UBLOXTIMELS_ENABLE */
++
+ /* UBX-NAV-SVINFO deprecated in u-blox 8, gone in u-blox 9.
+ * Use UBX-NAV-SAT after u-blox 7 */
+ if (10 > session->driver.ubx.protver) {
+--
+2.7.4
+
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch b/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch
new file mode 100644
index 0000000..7ae2a7c
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch
@@ -0,0 +1,72 @@
+From 7ed7a9063a65b16b90ea03465a83cbbd16e3abb4 Mon Sep 17 00:00:00 2001
+From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
+Date: Wed, 9 Dec 2020 18:51:48 +0200
+Subject: [PATCH] add GLL and VTG to 'gpspipe -r' output in binary mode
+
+---
+ pseudonmea.c | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+
+diff --git a/pseudonmea.c b/pseudonmea.c
+index 444be3d..398511b 100644
+--- a/pseudonmea.c
++++ b/pseudonmea.c
+@@ -168,6 +168,20 @@ void gpsd_position_fix_dump(struct gps_device_t *session,
+ * Differential base station ID */
+ (void)strlcat(bufp, ",", len);
+ nmea_add_checksum(bufp);
++ //$GNGGA,103527.00,4957.22994,N,03618.97862,E,1,12,0.89,180.3,M,17.0,M,,*4B
++ //$GNGLL,4957.22997,N,03618.97858,E,103526.00,A,A*7B
++ //we use the same values as in GGA sentence
++ char *bufgll = &bufp[strlen(bufp)];
++ (void)snprintf(bufgll, len,
++ "$GPGLL,%s,%c,%s,%c,%s,%c,A,",
++ lat_str,
++ ((session->gpsdata.fix.latitude > 0) ? 'N' : 'S'),
++ lon_str,
++ ((session->gpsdata.fix.longitude > 0) ? 'E' : 'W'),
++ time_str,
++ session->gpsdata.status ? 'A' : 'V'
++ );
++ nmea_add_checksum(bufgll);
+ }
+ }
+
+@@ -180,6 +194,7 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
+ char lat_str[BUF_SZ];
+ char lon_str[BUF_SZ];
+ char speed_str[BUF_SZ];
++ char kspeed_str[BUF_SZ];
+ char track_str[BUF_SZ];
+ char var_str[BUF_SZ];
+ char *var_dir = "";
+@@ -219,6 +234,26 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
+ time2_str,
+ var_str, var_dir);
+ nmea_add_checksum(bufp);
++ //$GNRMC,114740.00,A,4957.22826,N,03618.97015,E,0.054,,091220,,,A*65
++ //$GNVTG,,T,,M,0.054,N,0.100,K,A*3D
++ //1 = Track made good
++ //2 = Fixed text 'T' indicates that track made good is relative to true north
++ //3 = Track made good, degrees Magnetic
++ //4 = Magnetic track indicator - 'M'
++ //5 = Speed over ground in knots
++ //6 = Fixed text 'N' indicates that speed over ground in in knots
++ //7 = Speed over ground in kilometers/hour
++ //8 = Fixed text 'K' indicates that speed over ground is in kilometers/hour
++ //we use the same values as in RMC sentence
++ char *bufvtg = &bufp[strlen(bufp)];
++ (void)snprintf(bufvtg, len,
++ "$GPVTG,%s,T,%s,M,%s,N,%s,K,A,",
++ track_str,
++ track_str,//it is not Magnetic track, but may be it is enough
++ speed_str,
++ f_str(session->gpsdata.fix.speed, "%.4f", kspeed_str)
++ );
++ nmea_add_checksum(bufvtg);
+ }
+
+ static void gpsd_binary_satellite_dump(struct gps_device_t *session,
+--
+2.7.4
+
diff --git a/recipes-navigation/gpsd/gpsd-3.20/leap2017Aug31.readme.txt b/recipes-navigation/gpsd/gpsd-3.20/leap2017Aug31.readme.txt
new file mode 100644
index 0000000..d9bf4b1
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/leap2017Aug31.readme.txt
@@ -0,0 +1,169 @@
+The purpose of this test is to verify leap second operation with ntp. This is done
+by artificially setting the leap second offset in gpsd. ntp is not modified.
+Software levels:
+ gpsd - 3.16-m2.9 + the Aug 31 test patch
+ ntp - 4.2.8p9-r0.mlinux3.0. Release candidate for mLinux 4.0
+
+ntpd leap second test gpsd artificially causes a leap second on Aug 31, 2017 23:59:59 UTC.
+
+The patch for this test is leap2017Aug31.patch. This patch replaces 0006-ubxtimelps.patch.
+
+
+Kernel Log:
+
+2017-07-31T18:50:02.012018-05:00 leaptest CROND[5205]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+2017-07-31T18:55:01.119140-05:00 leaptest CROND[5223]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+2017-07-31T18:59:59.016393-05:00 leaptest kernel: Clock: inserting leap second 23:59:60 UTC
+2017-07-31T19:00:01.215873-05:00 leaptest CROND[5240]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+2017-07-31T19:00:07.381218-05:00 leaptest ntpd[501]: kernel reports leap second has occurred
+2017-07-31T19:00:07.381528-05:00 leaptest ntpd[501]: kernel reports leap second has occurred
+2017-07-31T19:05:01.313170-05:00 leaptest CROND[5258]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf)
+
+
+Time log from user space. 18:59:59 repeats twice 19:00:00 appears only once.:
+
+2017-07-31T18:59:57.855895-05:00 leaptest CTST: epoch: 1501545597.855 boot: 442607.123
+2017-07-31T18:59:58.106318-05:00 leaptest CTST: epoch: 1501545598.106 boot: 442607.373
+2017-07-31T18:59:58.356758-05:00 leaptest CTST: epoch: 1501545598.356 boot: 442607.624
+2017-07-31T18:59:58.607171-05:00 leaptest CTST: epoch: 1501545598.606 boot: 442607.874
+2017-07-31T18:59:58.857621-05:00 leaptest CTST: epoch: 1501545598.857 boot: 442608.124
+2017-07-31T18:59:59.108072-05:00 leaptest CTST: epoch: 1501545599.107 boot: 442608.375
+2017-07-31T18:59:59.358506-05:00 leaptest CTST: epoch: 1501545599.358 boot: 442608.625
+2017-07-31T18:59:59.608952-05:00 leaptest CTST: epoch: 1501545599.608 boot: 442608.876
+2017-07-31T18:59:59.859364-05:00 leaptest CTST: epoch: 1501545599.859 boot: 442609.126
+2017-07-31T18:59:59.109780-05:00 leaptest CTST: epoch: 1501545599.109 boot: 442609.377
+2017-07-31T18:59:59.360195-05:00 leaptest CTST: epoch: 1501545599.359 boot: 442609.627
+2017-07-31T18:59:59.610608-05:00 leaptest CTST: epoch: 1501545599.610 boot: 442609.877
+2017-07-31T18:59:59.861023-05:00 leaptest CTST: epoch: 1501545599.860 boot: 442610.128
+2017-07-31T19:00:00.111461-05:00 leaptest CTST: epoch: 1501545600.111 boot: 442610.378
+2017-07-31T19:00:00.361916-05:00 leaptest CTST: epoch: 1501545600.361 boot: 442610.629
+2017-07-31T19:00:00.612329-05:00 leaptest CTST: epoch: 1501545600.612 boot: 442610.879
+2017-07-31T19:00:00.862825-05:00 leaptest CTST: epoch: 1501545600.862 boot: 442611.130
+2017-07-31T19:00:01.113251-05:00 leaptest CTST: epoch: 1501545601.112 boot: 442611.380
+2017-07-31T19:00:01.363695-05:00 leaptest CTST: epoch: 1501545601.363 boot: 442611.630
+2017-07-31T19:00:01.614114-05:00 leaptest CTST: epoch: 1501545601.613 boot: 442611.881
+2017-07-31T19:00:01.864524-05:00 leaptest CTST: epoch: 1501545601.864 boot: 442612.131
+
+
+
+Leap second flag set artifically by gpsd, and noticed by ntp (leap=01 for SHM(0) and SHM(2) and leap_armed):
+2017-07-31T18:59:22.952281-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:22.962756-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T18:59:22.964152-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:23.130829-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T18:59:23.131062-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T18:59:23.131258-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T18:59:23.131451-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T18:59:23.131647-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T18:59:23.131840-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T18:59:23.132031-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T18:59:23.132220-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T18:59:23.138000-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:23.138206-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T18:59:23.138404-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T18:59:23.434429-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T18:59:23.434666-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T18:59:23.434863-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 20 64 377 0.000 6.410 1.265
+2017-07-31T18:59:23.435055-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 19 64 377 0.000 0.062 0.008
+2017-07-31T18:59:23.435249-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:00:22.459905-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.460141-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+
+
+
+2017-07-31T19:00:22.460343-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.618627-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:00:22.618857-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:00:22.619057-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:00:22.619252-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:00:22.619444-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:00:22.619634-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:00:22.619824-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:00:22.620016-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:00:22.628414-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.628654-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:00:22.628868-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.922779-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:00:22.924191-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:00:22.925595-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 16 64 377 0.000 7.369 0.661
+2017-07-31T19:00:22.927000-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 15 64 377 0.000 0.059 0.008
+2017-07-31T19:00:22.928402-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:01:22.942937-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:22.943171-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:01:22.943371-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.118319-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:01:23.118551-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:01:23.118750-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:01:23.118943-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:01:23.119137-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:01:23.119330-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:01:23.119520-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:01:23.119710-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:01:23.128565-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.128809-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:01:23.129026-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.417707-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:01:23.417942-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:01:23.418140-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 13 64 377 0.000 1007.48 1000.36
+2017-07-31T19:01:23.418337-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 12 64 377 0.000 1000.05 999.994
+2017-07-31T19:01:23.418529-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:02:23.442898-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.443131-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:02:23.443332-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.617413-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+
+
+Offset goes to one second, because there was no leap second:
+2017-07-31T19:00:22.618857-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:00:22.619057-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:00:22.619252-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:00:22.619444-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:00:22.619634-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:00:22.619824-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:00:22.620016-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:00:22.628414-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.628654-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:00:22.628868-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:00:22.922779-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:00:22.924191-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:00:22.925595-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 16 64 377 0.000 7.369 0.661
+2017-07-31T19:00:22.927000-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 15 64 377 0.000 0.059 0.008
+2017-07-31T19:00:22.928402-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:01:22.942937-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:22.943171-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:01:22.943371-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.118319-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:01:23.118551-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:01:23.118750-05:00 leaptest ntpstatus.sh: 1 18654 943a yes yes none candidate sys_peer 3
+2017-07-31T19:01:23.118943-05:00 leaptest ntpstatus.sh: 2 18655 9649 yes yes none sys.peer leap_armed 4
+2017-07-31T19:01:23.119137-05:00 leaptest ntpstatus.sh: 3 18656 8011 yes no none reject mobilize 1
+2017-07-31T19:01:23.119330-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=01, stratum=0
+2017-07-31T19:01:23.119520-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=01, stratum=0
+2017-07-31T19:01:23.119710-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=11, stratum=14
+2017-07-31T19:01:23.128565-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.128809-05:00 leaptest ntpstatus.sh: ntpq -p
+2017-07-31T19:01:23.129026-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:01:23.417707-05:00 leaptest ntpstatus.sh: remote refid st t when poll reach delay offset jitter
+2017-07-31T19:01:23.417942-05:00 leaptest ntpstatus.sh: ==============================================================================
+2017-07-31T19:01:23.418140-05:00 leaptest ntpstatus.sh: +SHM(0) .GPS. 0 l 13 64 377 0.000 1007.48 1000.36
+2017-07-31T19:01:23.418337-05:00 leaptest ntpstatus.sh: *SHM(2) .PPS. 0 l 12 64 377 0.000 1000.05 999.994
+2017-07-31T19:01:23.418529-05:00 leaptest ntpstatus.sh: LOCAL(0) .LOCL. 14 l - 32 0 0.000 0.000 0.000
+2017-07-31T19:02:23.442898-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.443131-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:02:23.443332-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:02:23.617413-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+
+
+Leap second flag is clear, leap_armed is removed so no leap second on Aug 1, 2017:
+2017-07-31T19:38:42.630432-05:00 leaptest ntpstatus.sh: ntpq -c lassoc -c mrv &1 &999 leap,srcadr,stratum
+2017-07-31T19:38:42.630636-05:00 leaptest ntpstatus.sh: ==========================================================
+2017-07-31T19:38:42.791369-05:00 leaptest ntpstatus.sh: ind assid status conf reach auth condition last_event cnt
+2017-07-31T19:38:42.791605-05:00 leaptest ntpstatus.sh: ===========================================================
+2017-07-31T19:38:42.791803-05:00 leaptest ntpstatus.sh: 1 18654 945a yes yes none candidate sys_peer 5
+2017-07-31T19:38:42.791994-05:00 leaptest ntpstatus.sh: 2 18655 966a yes yes none sys.peer sys_peer 6
+2017-07-31T19:38:42.792189-05:00 leaptest ntpstatus.sh: 3 18656 8033 yes no none reject unreachable 3
+2017-07-31T19:38:42.792379-05:00 leaptest ntpstatus.sh: srcadr=SHM(0), leap=00, stratum=0
+2017-07-31T19:38:42.802875-05:00 leaptest ntpstatus.sh: srcadr=SHM(2), leap=00, stratum=0
+2017-07-31T19:38:42.804254-05:00 leaptest ntpstatus.sh: srcadr=LOCAL(0), leap=00, stratum=14
+
+
diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb.old b/recipes-navigation/gpsd/gpsd_3.16.bb.old
index 1464981..26a8963 100644
--- a/recipes-navigation/gpsd/gpsd_3.16.bb.old
+++ b/recipes-navigation/gpsd/gpsd_3.16.bb.old
@@ -4,7 +4,7 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools"
PROVIDES = "virtual/gpsd"
-PR="m12"
+PR="m14"
EXTRANATIVEPATH += "chrpath-native"
@@ -22,6 +22,8 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
file://gpsd \
file://gpsd_ubx_fixed.sh \
file://gpsd_ubx_settime.sh \
+ file://gpsd_settime.sh \
+ file://gpsd_fixed.sh \
file://gpsd.rules \
file://gpsd.service \
"
@@ -123,6 +125,8 @@ do_install_append() {
install -d ${D}${sbindir}
install -m 0755 ${WORKDIR}/gpsd_ubx_fixed.sh ${D}${sbindir}/gpsd_ubx_fixed
install -m 0755 ${WORKDIR}/gpsd_ubx_settime.sh ${D}${sbindir}/gpsd_ubx_settime
+ install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed
+ install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime
#support for udev
install -d ${D}/${sysconfdir}/udev/rules.d
@@ -169,7 +173,7 @@ PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gp
# FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
# ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps"
-FILES_${PN} += "${sbindir}/gpsd_ubx_fixed ${sbindir}/gpsd_ubx_settime"
+FILES_${PN} += "${sbindir}/gpsd_*"
FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb.old
index 0b0a287..0b0a287 100644
--- a/recipes-navigation/gpsd/gpsd_3.18.1.bb
+++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb.old
diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.19.bb.old
index 26a8963..da03106 100644
--- a/recipes-navigation/gpsd/gpsd_3.16.bb
+++ b/recipes-navigation/gpsd/gpsd_3.19.bb.old
@@ -1,42 +1,32 @@
SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
SECTION = "console/network"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
+LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53"
DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools"
PROVIDES = "virtual/gpsd"
-PR="m14"
+PR="m7"
EXTRANATIVEPATH += "chrpath-native"
-# file://0002-SConstruct-remove-rpath.patch
+# sysclockcrash is fixed for gpsd
+# suppress text in binary is fixed for gpsctl
+
SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ ${SAVANNAH_GNU_MIRROR}/gpsd/gpsd-${PV}.tar.gz \
file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
- file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \
- file://0001-include-sys-ttydefaults.h.patch \
- file://0005-suppress-text-in-binary.patch \
file://0006-ubxtimelps.patch \
file://0006-itu_r_tf_460_6.patch \
- file://0006-sysclockcrash.patch \
- file://0008-major_gnu.patch \
file://gpsd-default \
file://gpsd \
file://gpsd_ubx_fixed.sh \
file://gpsd_ubx_settime.sh \
- file://gpsd_settime.sh \
file://gpsd_fixed.sh \
+ file://gpsd_settime.sh \
file://gpsd.rules \
file://gpsd.service \
"
-# Fixed
-# file://0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch
-# file://0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch
-# file://0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch
-# file://0001-Include-stdatomic.h-only-in-C-mode.patch
-# file://0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch
-
-SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63"
-SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029"
-
+SRC_URI[md5sum] = "b3bf88706794eb8e5f2c2543bf7ba87b"
+SRC_URI[sha256sum] = "27dd24d45b2ac69baab7933da2bf6ae5fb0be90130f67e753c110a3477155f39"
inherit scons update-rc.d python-dir pythonnative systemd
@@ -55,6 +45,8 @@ export HOST_SYS
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}"
PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free"
+
+# Remove unneeded features. netfeed is needed by gpsmon
EXTRA_OESCONS = " \
sysroot=${STAGING_DIR_TARGET} \
libQgpsmm='false' \
@@ -63,36 +55,48 @@ EXTRA_OESCONS = " \
chrpath='yes' \
systemd='${SYSTEMD_OESCONS}' \
libdir='${libdir}' \
- ashtech='no' \
- earthmate='no' \
- evermore='no' \
- fury='no' \
- fv18='no' \
- garmin='no' \
- garmintxt='no' \
- geostar='no' \
- greis='no' \
- itrax='no' \
- mtk3301='no' \
- navcom='no' \
- nmea0183='yes' \
- nmea2000='no' \
- oncore='no' \
- sirf='no' \
- skytraq='yes' \
- superstar2='no' \
- tnt='no' \
- tripmate='no' \
- tsip='no' \
ublox='yes' \
ubloxtimels='yes' \
- aivdm='no' \
- gpsclock='no' \
- oceanserver='no' \
- fixed_stop_bits='1' \
pps='yes' \
gpsd_group='gps' \
ntpshm='yes' \
+ prefix='usr' \
+ control_socket='false' \
+ nofloats='yes' \
+ ashtech='false' \
+ earthmate='false' \
+ evermore='false' \
+ fury='false' \
+ fv18='false' \
+ garmin='false' \
+ garmintxt='false' \
+ geostar='false' \
+ greis='false' \
+ itrax='false' \
+ mtk3301='false' \
+ navcom='false' \
+ nmea0183='true' \
+ nmea2000='false' \
+ oncore='false' \
+ sirf='false' \
+ skytraq='false' \
+ superstar2='false' \
+ tnt='false' \
+ tripmate='false' \
+ tsip='false' \
+ ublox='true' \
+ aivdm='false' \
+ gpsclock='false' \
+ isync='false' \
+ ntrip='false' \
+ oceanserver='false' \
+ passthrough='false' \
+ rtcm104v2='false' \
+ rtcm104v3='false' \
+ bluez='false' \
+ ipv6='false' \
+ netfeed='true' \
+ usb='false' \
${PACKAGECONFIG_CONFARGS} \
"
# this cannot be used, because then chrpath is not found and only static lib is built
@@ -128,9 +132,10 @@ do_install_append() {
install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed
install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime
+
#support for udev
install -d ${D}/${sysconfdir}/udev/rules.d
- install -m 0644 ${WORKDIR}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d
+ install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d
install -d ${D}${base_libdir}/udev/
install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
@@ -146,15 +151,16 @@ do_install_append() {
# support for dev (development)
mkdir -p -m 0644 ${D}/${includedir}/gps
install -m 0644 ${S}/gpsd.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/os_compat.h ${D}/${includedir}/gps
install -m 0644 ${S}/revision.h ${D}/${includedir}/gps
install -m 0644 ${S}/gpsdclient.h ${D}/${includedir}/gps
install -m 0644 ${S}/gpsd_config.h ${D}/${includedir}/gps
install -m 0644 ${S}/compiler.h ${D}/${includedir}/gps
install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps
-}
-# Use libgps recipe for sysroot.
-do_populate_sysroot() {
+ # New ubxtool
+ install -m 0755 ${S}/ubxtool ${D}/${bindir}
+ #install -m 0644 ${S}/ubxtool.1 ${D}/${mandir}/man1
}
RDEPENDS_${PN}-conf += "bash"
@@ -170,19 +176,22 @@ pkg_postrm_${PN}-conf() {
PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils"
# File does not exist: ${libdir}/libQgpsmm.prl
-# FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
-# ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps"
+FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
+ ${libdir}/libQgpsmm.prl \
+ ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps"
FILES_${PN} += "${sbindir}/gpsd_*"
FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
RDEPENDS_${PN} = "gpsd-gpsctl bash"
+
+# gpsd-udev is for USB, which we are not using
RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf"
SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging"
FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
-RDEPENDS_${PN}-udev += "udev gpsd-conf"
+RDEPENDS_${PN}-udev += "eudev gpsd-conf"
SUMMARY_libgpsd = "C service library used for communicating with gpsd"
FILES_libgpsd = "${libdir}/libgpsd.so.*"
@@ -218,4 +227,9 @@ RDEPENDS_python-pygps = " \
RPROVIDES_${PN} += "${PN}-systemd"
RREPLACES_${PN} += "${PN}-systemd"
RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "${PN}.socket"
+SYSTEMD_SERVICE_${PN} = "${BPN}.socket ${BPN}ctl@.service"
+
+
+ALTERNATIVE_${PN} = "gpsd-defaults"
+ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
+ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb
new file mode 100644
index 0000000..9238cc2
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -0,0 +1,258 @@
+SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53"
+DEPENDS = "dbus dbus-glib ncurses python3 libusb1 chrpath-replacement-native pps-tools"
+PROVIDES = "virtual/gpsd"
+PR="m1"
+
+EXTRANATIVEPATH += "chrpath-native"
+
+# sysclockcrash is fixed for gpsd
+# suppress text in binary is fixed for gpsctl
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ ${SAVANNAH_GNU_MIRROR}/gpsd/gpsd-${PV}.tar.gz \
+ file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
+ file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \
+ file://0002-SConstruct-fix.patch \
+ file://0006-ubxtimelps.patch \
+ file://0006-itu_r_tf_460_6.patch \
+ file://0007-add-gll-vtg.patch \
+ file://gpsd-default \
+ file://gpsd \
+ file://gpsd_ubx_fixed.sh \
+ file://gpsd_ubx_settime.sh \
+ file://gpsd_fixed.sh \
+ file://gpsd_settime.sh \
+ file://gpsd.rules \
+ file://gpsd.service \
+"
+SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"
+SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50"
+
+inherit scons update-rc.d python3-dir python3native systemd
+
+INITSCRIPT_NAME = "gpsd"
+INITSCRIPT_PARAMS = "defaults 10"
+
+SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
+
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# Necessary for python
+export BUILD_SYS
+export HOST_SYS
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
+PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}"
+PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free"
+
+# Remove unneeded features. netfeed is needed by gpsmon
+EXTRA_OESCONS = " \
+ sysroot=${STAGING_DIR_TARGET} \
+ libQgpsmm='false' \
+ debug='true' \
+ strip='false' \
+ chrpath='yes' \
+ systemd='${SYSTEMD_OESCONS}' \
+ libdir='${libdir}' \
+ ublox='yes' \
+ ubloxtimels='yes' \
+ pps='yes' \
+ gpsd_group='gps' \
+ ntpshm='yes' \
+ prefix='usr' \
+ control_socket='false' \
+ nofloats='yes' \
+ ashtech='false' \
+ earthmate='false' \
+ evermore='false' \
+ fury='false' \
+ fv18='false' \
+ garmin='false' \
+ garmintxt='false' \
+ geostar='false' \
+ greis='false' \
+ itrax='false' \
+ mtk3301='false' \
+ navcom='false' \
+ nmea0183='true' \
+ nmea2000='false' \
+ oncore='false' \
+ sirf='false' \
+ skytraq='false' \
+ superstar2='false' \
+ tnt='false' \
+ tripmate='false' \
+ tsip='false' \
+ ublox='true' \
+ aivdm='false' \
+ gpsclock='false' \
+ isync='false' \
+ ntrip='false' \
+ python='false' \
+ oceanserver='false' \
+ passthrough='false' \
+ rtcm104v2='false' \
+ rtcm104v3='false' \
+ bluez='false' \
+ ipv6='false' \
+ netfeed='true' \
+ usb='false' \
+ ${PACKAGECONFIG_CONFARGS} \
+"
+# this cannot be used, because then chrpath is not found and only static lib is built
+# target=${HOST_SYS}
+
+do_compile_prepend() {
+ export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+ export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
+ export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
+ export LINKFLAGS="${LDFLAGS}"
+}
+
+do_install() {
+ export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+ export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
+ export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
+ export LINKFLAGS="${LDFLAGS}"
+
+ export DESTDIR="${D}"
+ # prefix is used for RPATH and DESTDIR/prefix for instalation
+ ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \
+ bbfatal "scons install execution failed."
+}
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
+ install -d ${D}/${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/gpsd_ubx_fixed.sh ${D}${sbindir}/gpsd_ubx_fixed
+ install -m 0755 ${WORKDIR}/gpsd_ubx_settime.sh ${D}${sbindir}/gpsd_ubx_settime
+ install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed
+ install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime
+
+
+ #support for udev
+ install -d ${D}/${sysconfdir}/udev/rules.d
+ install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d
+ install -d ${D}${base_libdir}/udev/
+ install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
+
+ #support for python
+ install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
+ install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
+
+ #support for systemd
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service
+ install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket
+
+ # support for dev (development)
+ mkdir -p -m 0644 ${D}/${includedir}/gps
+ install -m 0644 ${S}/gpsd.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/os_compat.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/revision.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/gpsdclient.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/gpsd_config.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/compiler.h ${D}/${includedir}/gps
+ install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps
+
+ # New ubxtool
+ install -m 0755 ${S}/ubxtool ${D}/${bindir}
+ #install -m 0644 ${S}/ubxtool.1 ${D}/${mandir}/man1
+ install -m 0644 ${S}/gps.h ${D}/${includedir}
+ install -m 0644 ${S}/timespec.h ${D}/${includedir}
+ install -m 0644 ${S}/libgpsmm.h ${D}/${includedir}
+}
+
+RDEPENDS_${PN}-conf += "bash"
+
+pkg_postinst_${PN}-conf() {
+ update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
+}
+
+pkg_postrm_${PN}-conf() {
+ update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
+}
+
+PACKAGES =+ "libgps libgpsd python3-pygps-dbg python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils"
+# PACKAGES =+ "${PN} ${PN}-dbg ${PN}-dev"
+
+# File does not exist: ${libdir}/libQgpsmm.prl
+FILES_${PN}-dev += "${libdir}/pkgconfig/libgpsd.pc ${libdir}/pkgconfig/libgps.pc \
+ ${libdir}/libQgpsmm.prl \
+ ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps"
+
+FILES_${PN} += "${sbindir}/gpsd_*"
+FILES_${PN}-doc += "${docdir}"
+
+FILES_${PN}-conf = "${sysconfdir}/default ${sysconfdir}/init.d"
+
+FILES_python3-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
+
+RDEPENDS_${PN}-conf = "gpsd-gpsctl bash"
+RDEPENDS_${PN} = "bash"
+
+# gpsd-udev is for USB, which we are not using
+# RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf"
+
+SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging"
+FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
+RDEPENDS_${PN}-udev += "eudev"
+
+SUMMARY_libgpsd = "C service library used for communicating with gpsd"
+FILES_libgpsd = "${libdir}/libgpsd.so.*"
+
+SUMMARY_libgps = "C service library used for communicating with gpsd"
+FILES_libgps = "${libdir}/libgps.so.*"
+
+SUMMARY_${PN}-conf = "gpsd configuration files and init scripts"
+FILES_${PN}-conf = "${sysconfdir}"
+CONFFILES_${PN}-conf = "${sysconfdir}/default/gpsd.default"
+
+SUMMARY_${PN}-gpsctl = "Tool for tweaking GPS modes"
+FILES_${PN}-gpsctl = "${bindir}/gpsctl"
+
+SUMMARY_gpspipe = "Tool to connectg to gpsd and retrieve sentences"
+FILES_gpspipe = "${bindir}/gpspipe"
+
+SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS"
+FILES_gps-utils = "${bindir}/*"
+RDEPENDS_gps-utils = "python3-pygps"
+
+SUMMARY_python3-pygps = "Python bindings to gpsd"
+FILES_python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python-pygps = " \
+ python3-core \
+ python3-io \
+ python3-threading \
+ python3-terminal \
+ python3-curses \
+ gpsd \
+ python3-json"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${BPN}.socket ${BPN}ctl@.service"
+
+
+ALTERNATIVE_${PN} = "gpsd-defaults"
+ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
+ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
+
+
+FILES_${PN}-dev_append = " ${includedir}/gps.h ${includedir}/timespec.h ${includedir}/libgpsmm.h ${includedir}/gps ${libdir}/libgps.so"
+FILES_${PN}-dev_remove = "${includedir} ${FILES_SOLIBSDEV} \
+ ${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig \
+ ${datadir}/pkgconfig ${datadir}/aclocal \
+ ${base_libdir}/*.o ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
+
+SUMMARY_${PN}-dbg = "Debug the C service library used for communicating with gpsd"
+
+FILES_${PN}-dbg_replace = "${prefix}/src/* ${libdir}/.debug/*"
diff --git a/recipes-navigation/gpsd/libgps24_3.18.1.bb b/recipes-navigation/gpsd/libgps25_3.20.bb.old
index 8f1b811..eb40643 100644
--- a/recipes-navigation/gpsd/libgps24_3.18.1.bb
+++ b/recipes-navigation/gpsd/libgps25_3.20.bb.old
@@ -1,10 +1,10 @@
SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
SECTION = "console/network"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
+LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53"
DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools"
PROVIDES = "${PN} ${PN}-dbg ${PN}-dev"
-PR="m5"
+PR="m2"
#BPN="gpsd"
#BP="${BPN}-${PV}"
@@ -17,13 +17,13 @@ S = "${WORKDIR}/gpsd-${PV}"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/gpsd/gpsd-${PV}.tar.gz \
file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
- file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \
- file://0001-include-sys-ttydefaults.h.patch \
+ file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \
+ file://0002-SConstruct-fix.patch \
file://0006-ubxtimelps.patch \
file://0006-itu_r_tf_460_6.patch \
"
-SRC_URI[md5sum] = "3b11f26b295010666b1767b308f90bc5"
-SRC_URI[sha256sum] = "5cb1e6d880ec9a52c62492dd0e3d77451b7c7ad625895bd652f6354215aec23e"
+SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"
+SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50"
inherit scons python-dir pythonnative systemd
@@ -97,9 +97,9 @@ do_install() {
export DESTDIR="${D}"
install -d 755 ${D}${libdir}
- install libgps.so.24.* ${D}${libdir}
- cp -a libgps.so.24 ${D}${libdir}
- (cd ${D}${libdir};ln -sf libgps.so.24.* libgps.so)
+ install libgps.so.25.* ${D}${libdir}
+ cp -a libgps.so.25 ${D}${libdir}
+ (cd ${D}${libdir};ln -sf libgps.so.25.* libgps.so)
# support for dev (development)
mkdir -p -m 0644 ${D}/${includedir}/gps
@@ -111,11 +111,12 @@ do_install() {
install -m 0644 ${S}/compiler.h ${D}/${includedir}/gps
install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps
install -m 0644 ${S}/gps.h ${D}/${includedir}
+ install -m 0644 ${S}/timespec.h ${D}/${includedir}
install -m 0644 ${S}/libgpsmm.h ${D}/${includedir}
}
-FILES_${PN}-dev_append = " ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps ${libdir}/libgps.so"
+FILES_${PN}-dev_append = " ${includedir}/gps.h ${includedir}/timespec.h ${includedir}/libgpsmm.h ${includedir}/gps ${libdir}/libgps.so"
FILES_${PN}-dev_remove = "${includedir} ${FILES_SOLIBSDEV} \
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig \
${datadir}/pkgconfig ${datadir}/aclocal \