summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2016-12-21 09:15:47 -0600
committerJohn Klug <john.klug@multitech.com>2016-12-21 09:15:47 -0600
commit0d53f1437fcdbae1c1b112b9892be8994cef3834 (patch)
tree2cf46a12b25f6b7d2fd1e080cc9b8d47300e1407
parent12465c3b11e4a7517a92480980f1ce2f8a877e71 (diff)
parent2ba73a35c4907336858320b31ce515a6aa10698f (diff)
downloadmeta-mlinux-0d53f1437fcdbae1c1b112b9892be8994cef3834.tar.gz
meta-mlinux-0d53f1437fcdbae1c1b112b9892be8994cef3834.tar.bz2
meta-mlinux-0d53f1437fcdbae1c1b112b9892be8994cef3834.zip
Change priority of gpsd and add multitech GPS device to default.
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--classes/mlinux-mirrors.bbclass2
-rw-r--r--conf/distro/mlinux.conf4
-rw-r--r--recipes-connectivity/lora/lora-gateway-usb_1.7.0mts.bb14
-rw-r--r--recipes-connectivity/lora/lora-network-server_1.0.18.bb (renamed from recipes-connectivity/lora/lora-network-server_1.0.17.bb)4
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder-usb_1.4.1.bb4
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/mtcap/lora-packet-forwarder.default (renamed from recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.default)0
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/mtcap/lora-packet-forwarder.init (renamed from recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init)0
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.default2
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init115
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb8
-rw-r--r--recipes-core/busybox/busybox-1.22.1/defconfig4
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch75
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch13
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch34
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch45
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch52
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch75
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch34
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16/0002-SConstruct-remove-rpath.patch45
-rw-r--r--recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch52
-rwxr-xr-xrecipes-navigation/gpsd/gpsd/gpsd8
-rw-r--r--recipes-navigation/gpsd/gpsd/gpsd-default5
-rw-r--r--recipes-navigation/gpsd/gpsd_3.16.20161219.bb158
-rw-r--r--recipes-navigation/gpsd/gpsd_3.16.bb152
-rwxr-xr-xrecipes-navigation/gpsd/gpsdupdater/bin/bldgpsd.sh61
-rwxr-xr-xrecipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh22
-rwxr-xr-xrecipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh15
-rw-r--r--recipes-support/ntp/files/ntp.conf.patch53
-rw-r--r--recipes-support/ntp/files/ntpd-init.patch11
-rw-r--r--recipes-support/ntp/ntp_4.2.6p5.bbappend26
31 files changed, 1073 insertions, 21 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ba2186a..e07d2a9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ before_script:
- (test -f env-oe.sh && ./setup.sh --update) || ./setup.sh
- source env-oe.sh
- cd layers/meta-mlinux
+ - git fetch
- git checkout $CI_BUILD_REF
- cd ../..
diff --git a/classes/mlinux-mirrors.bbclass b/classes/mlinux-mirrors.bbclass
index 17bd692..7f80d46 100644
--- a/classes/mlinux-mirrors.bbclass
+++ b/classes/mlinux-mirrors.bbclass
@@ -13,3 +13,5 @@ MIRRORS_append () {
ftp://.*/.* http://multitech.net/mlinux/sources/
https?$://.*/.* http://multitech.net/mlinux/sources/
}
+
+SAVANNAH_GNU_MIRROR = "http://download-mirror.savannah.gnu.org/releases"
diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf
index b4bc9a3..9a8011d 100644
--- a/conf/distro/mlinux.conf
+++ b/conf/distro/mlinux.conf
@@ -1,7 +1,7 @@
DISTRO = "mlinux"
DISTRO_NAME = "mLinux"
DISTRO_BASE_VERSION = "3.2"
-DISTRO_VERSION = "${DISTRO_BASE_VERSION}.3"
+DISTRO_VERSION = "${DISTRO_BASE_VERSION}.4"
DISTRO_CODENAME = ""
SDK_VENDOR = "-mlinux"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -74,3 +74,5 @@ require java.inc
PREFERRED_VERSION_nodejs ?= "0.10.44"
PREFERRED_VERSION_nodejs-native ?= "0.10.44"
+
+PREFERRED_VERSION_gpsd ?= "3.16"
diff --git a/recipes-connectivity/lora/lora-gateway-usb_1.7.0mts.bb b/recipes-connectivity/lora/lora-gateway-usb_1.7.0mts.bb
index 64ad81f..382328d 100644
--- a/recipes-connectivity/lora/lora-gateway-usb_1.7.0mts.bb
+++ b/recipes-connectivity/lora/lora-gateway-usb_1.7.0mts.bb
@@ -31,11 +31,11 @@ do_compile() {
}
do_install() {
- install -d ${D}${includedir}/lora
- install -d ${D}${libdir}/lora
- install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora
- install -m 0644 libloragw/library.cfg ${D}${libdir}/lora
- install -m 0644 libloragw/inc/* ${D}${includedir}/lora
+ install -d ${D}${includedir}/lora-usb
+ install -d ${D}${libdir}/lora-usb
+ install -m 0644 libloragw/libloragw.a ${D}${libdir}/lora-usb
+ install -m 0644 libloragw/library.cfg ${D}${libdir}/lora-usb
+ install -m 0644 libloragw/inc/* ${D}${includedir}/lora-usb
install -d ${D}/opt/lora
install -d ${D}/opt/lora/gateway-utils-usb
@@ -49,8 +49,8 @@ PACKAGES += "${PN}-utils ${PN}-utils-dbg"
FILES_${PN}-utils = "/opt/lora/gateway-utils-usb/*"
FILES_${PN}-utils-dbg = "/opt/lora/.debug"
-FILES_${PN}-dev = "${includedir}/lora ${libdir}/lora/library.cfg"
-FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a"
+FILES_${PN}-dev = "${includedir}/lora-usb ${libdir}/lora-usb/library.cfg"
+FILES_${PN}-staticdev = "${libdir}/lora-usb/libloragw.a"
# disable this on purpose for dev purposes
do_rm_work() {
diff --git a/recipes-connectivity/lora/lora-network-server_1.0.17.bb b/recipes-connectivity/lora/lora-network-server_1.0.18.bb
index 83e8f31..1a7aab6 100644
--- a/recipes-connectivity/lora/lora-network-server_1.0.17.bb
+++ b/recipes-connectivity/lora/lora-network-server_1.0.18.bb
@@ -13,8 +13,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${
file://lora-network-server.logrotate.conf \
"
-SRC_URI[md5sum] = "4c88bdf1f213f2e37eb12eb9efcb96b0"
-SRC_URI[sha256sum] = "84b20fa48fa70d58e147fa079a5986d498ec78ad076b99b4b3a7dcc4f6a70a8e"
+SRC_URI[md5sum] = "9e83c88149fc9b9c969034edcc6371f8"
+SRC_URI[sha256sum] = "1e94620eed249c0c431987ac64850e329f7506ddd2d3c2ff6de0a554cb76ed52"
# binaries are already stripped, so suppress warning
INSANE_SKIP_${PN} = "already-stripped"
diff --git a/recipes-connectivity/lora/lora-packet-forwarder-usb_1.4.1.bb b/recipes-connectivity/lora/lora-packet-forwarder-usb_1.4.1.bb
index 541247b..7ca1ffb 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder-usb_1.4.1.bb
+++ b/recipes-connectivity/lora/lora-packet-forwarder-usb_1.4.1.bb
@@ -26,8 +26,8 @@ S = "${WORKDIR}/git"
LORA_DIR = "/opt/lora"
-export LGW_PATH = "${STAGING_LIBDIR}/lora"
-export LGW_INC = "${STAGING_INCDIR}/lora"
+export LGW_PATH = "${STAGING_LIBDIR}/lora-usb"
+export LGW_INC = "${STAGING_INCDIR}/lora-usb"
CFLAGS += "-I${LGW_INC} -Iinc -I."
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.default b/recipes-connectivity/lora/lora-packet-forwarder/mtcap/lora-packet-forwarder.default
index be7dcd5..be7dcd5 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.default
+++ b/recipes-connectivity/lora/lora-packet-forwarder/mtcap/lora-packet-forwarder.default
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/mtcap/lora-packet-forwarder.init
index 9ffaf6d..9ffaf6d 100755
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
+++ b/recipes-connectivity/lora/lora-packet-forwarder/mtcap/lora-packet-forwarder.init
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.default b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.default
new file mode 100644
index 0000000..0f92640
--- /dev/null
+++ b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.default
@@ -0,0 +1,2 @@
+# set to "yes" or "no" to control starting on boot
+ENABLED="no"
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init
new file mode 100755
index 0000000..510f171
--- /dev/null
+++ b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init
@@ -0,0 +1,115 @@
+#!/bin/bash
+
+
+NAME="lora-packet-forwarder"
+ENABLED="yes"
+
+
+[ -f /etc/default/$NAME ] && source /etc/default/$NAME
+
+run_dir=/var/run/lora
+conf_dir=/var/config/lora
+
+pkt_fwd=$run_dir/1/lora_pkt_fwd
+pkt_fwd_log=/var/log/lora-pkt-fwd-1.log
+pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid
+
+
+port1=/sys/devices/platform/mts-io/ap1
+port2=/sys/devices/platform/mts-io/ap2
+
+
+lora_mtac_id="MTAC-LORA"
+lora_1_0_hw="MTAC-LORA-1.0"
+lora_1_5_h_hw="MTAC-LORA-1.5"
+
+
+read_card_info() {
+ # product-id of first lora card
+ lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null)
+ lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null)
+ # remove all colons
+ lora_eui_raw=${lora_eui//:/}
+ lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null)
+}
+
+
+card_found() {
+ if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then
+ ln -sf /dev/spidev32766.2 /dev/spidev0.0
+ elif [ -d $port2 ] && [[ $(cat $port2/hw-version) = $lora_hw ]]; then
+ ln -sf /dev/spidev32765.2 /dev/spidev0.0
+ fi
+
+ if [[ "$lora_id" =~ "$lora_mtac_id" ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+
+do_start() {
+
+ mkdir -p $run_dir/1
+ read_card_info
+
+ if ! [ -f $conf_file ]; then
+ echo "$0: $conf_file missing"
+ exit 1
+ fi
+
+
+ if card_found; then
+ echo "Found $lora_id with $lora_hw hardware"
+ else
+ echo "$0: MTAC-LORA not detected"
+ exit 1
+ fi
+ echo -n "Starting $NAME: "
+ # start packet forwarder
+ cp $conf_dir/global_conf.json $run_dir/1/global_conf.json
+ /usr/sbin/start-stop-daemon --chdir $run_dir/1 --background --start --make-pidfile \
+ --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd"
+
+ renice -n -20 -p $(pgrep $(basename $pkt_fwd))
+
+
+ echo "OK"
+}
+
+
+do_stop() {
+ echo -n "Stopping $NAME: "
+ start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5
+ rm -f $pkt_fwd_pidfile
+ echo "OK"
+}
+
+
+if [ "$ENABLED" != "yes" ]; then
+ echo "$NAME: disabled in /etc/default"
+ exit
+fi
+
+
+case "$1" in
+ "start")
+ do_start
+ ;;
+ "stop")
+ do_stop
+ ;;
+ "restart")
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ do_stop
+ do_start
+ ;;
+ *)
+ ## If no parameters are given, print which are avaiable.
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
index 85fb8e3..ada0493 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
+++ b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb
@@ -6,7 +6,7 @@ SECTION = "console/utils"
LICENSE = "SEMTECH"
LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45"
DEPENDS = "lora-gateway"
-PR = "r7"
+PR = "r9"
SRCREV = "v${PV}"
@@ -23,6 +23,7 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \
file://lora-packet-forwarder-remove-jit-power-check.patch \
"
+
S = "${WORKDIR}/git"
LORA_DIR = "/opt/lora"
@@ -52,6 +53,11 @@ do_install_append_mtcdt() {
install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json
install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0
install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder
}
do_install_append_mtcap() {
diff --git a/recipes-core/busybox/busybox-1.22.1/defconfig b/recipes-core/busybox/busybox-1.22.1/defconfig
index 0387a9d..aa1e514 100644
--- a/recipes-core/busybox/busybox-1.22.1/defconfig
+++ b/recipes-core/busybox/busybox-1.22.1/defconfig
@@ -570,8 +570,8 @@ CONFIG_HEXDUMP=y
CONFIG_HWCLOCK=y
CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
-# CONFIG_IPCRM is not set
-# CONFIG_IPCS is not set
+CONFIG_IPCRM=y
+CONFIG_IPCS=y
CONFIG_LOSETUP=y
# CONFIG_LSPCI is not set
# CONFIG_LSUSB is not set
diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch
new file mode 100644
index 0000000..2ea3226
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch
@@ -0,0 +1,75 @@
+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 --git a/SConstruct b/SConstruct
+index 6c93311..cde8b3d 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1148,6 +1148,12 @@ else:
+ basecflags += ' -coverage'
+ ldflags += ' -coverage'
+ ldshared += ' -coverage'
++
++ if env['sysroot']:
++ print "Prefixing includepy '%s' with sysroot prefix" % includepy
++ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy))
++ print "'%s'" % includepy
++
+ # in case CC/CXX was set to the scan-build wrapper,
+ # ensure that we build the python modules with scan-build, too
+ if env['CC'] is None or env['CC'].find('scan-build') < 0:
+@@ -1408,11 +1414,14 @@ if not env['python']:
+ python_install = []
+ else:
+ python_lib_dir = env['python_libdir']
++ python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
+ python_module_dir = python_lib_dir + 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_lib_dir, ))
+
+ python_modules_install = python_env.Install( DESTDIR + python_module_dir,
+ python_modules)
+--
+2.1.0
+
diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
new file mode 100644
index 0000000..d1eb2ad
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
@@ -0,0 +1,13 @@
+--- /home/jklug/3.17/old/SConstruct 2016-12-19 14:53:02.406689189 -0600
++++ ./SConstruct 2016-12-19 17:27:27.594669617 -0600
+@@ -1341,6 +1341,10 @@
+ python_config['BASECFLAGS'] += ' -coverage'
+ python_config['LDFLAGS'] += ' -coverage'
+ python_config['LDSHARED'] += ' -coverage'
++ if env['sysroot']:
++ print "Prefixing includepy '%s' with sysroot prefix" % python_config['INCLUDEPY']
++ python_config['INCLUDEPY'] = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY']))
++ print "Python Include: '%s'" % python_config['INCLUDEPY']
+ # in case CC/CXX was set to the scan-build wrapper,
+ # ensure that we build the python modules with scan-build, too
+ if env['CC'] is None or env['CC'].find('scan-build') < 0:
diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch
new file mode 100644
index 0000000..b27c671
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch
@@ -0,0 +1,34 @@
+From 543f79222520cc6ab65d20f9fa356dac5c848e3b 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>
+---
+Upstream-Status: Pending
+
+ gpsmon.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gpsmon.c b/gpsmon.c
+index bee05b8..daed818 100644
+--- a/gpsmon.c
++++ b/gpsmon.c
+@@ -20,6 +20,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/select.h>
++#include <sys/ttydefaults.h>
+ #include <fcntl.h>
+ #ifndef S_SPLINT_S
+ #include <unistd.h>
+--
+1.8.3.1
+
diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch
new file mode 100644
index 0000000..083a662
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch
@@ -0,0 +1,45 @@
+From d090638ff983e509162d5e3b62aa4918de4aa5fa Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 24 Apr 2012 16:24:35 +0200
+Subject: [PATCH 2/4] SConstruct: remove rpath
+
+* even with correct prefix (without DESTDIR) included it's redundant
+ WARNING: QA Issue: libgps:
+ /work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0
+ contains probably-redundant RPATH /usr/lib
+* and with prefix from scons.bbclass it's invalid
+ WARNING: QA Issue: package libgps contains bad RPATH
+ /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/image/usr/lib
+ in file
+ /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0
+
+Upstream-Status: Inapppropriate [embedded specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+---
+ SConstruct | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index f0cafa8..ff46713 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1340,8 +1340,11 @@ if qt_env:
+ binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib))
+
+ if env["shared"] and env["chrpath"]:
+- env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
+- % (installdir('libdir', False), ))
++ if not env['sysroot']:
++ env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
++ % (installdir('libdir', False), ))
++ else:
++ env.AddPostAction(binaryinstall, '$CHRPATH -d "$TARGET"')
+
+ if not env['debug'] and not env['profiling'] and env['strip']:
+ env.AddPostAction(binaryinstall, '$STRIP $TARGET')
+--
+1.8.5.5
+
diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
new file mode 100644
index 0000000..8527f0d
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch
@@ -0,0 +1,52 @@
+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 --git a/SConstruct b/SConstruct
+index 0e518e7..c01a71b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -704,12 +704,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size);
+
+ manbuilder = mangenerator = htmlbuilder = None
+ if env['manbuild']:
+- if config.CheckXsltproc():
++ if False and config.CheckXsltproc():
+ mangenerator = 'xsltproc'
+ build = "xsltproc --nonet %s $SOURCE >$TARGET"
+ htmlbuilder = build % docbook_html_uri
+ manbuilder = build % docbook_man_uri
+- elif WhereIs("xmlto"):
++ elif False and WhereIs("xmlto"):
+ mangenerator = 'xmlto'
+ xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`"
+ htmlbuilder = xmlto % "html-nochunks"
+--
+1.8.5.5
+
diff --git a/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
new file mode 100644
index 0000000..2ea3226
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch
@@ -0,0 +1,75 @@
+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 --git a/SConstruct b/SConstruct
+index 6c93311..cde8b3d 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1148,6 +1148,12 @@ else:
+ basecflags += ' -coverage'
+ ldflags += ' -coverage'
+ ldshared += ' -coverage'
++
++ if env['sysroot']:
++ print "Prefixing includepy '%s' with sysroot prefix" % includepy
++ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy))
++ print "'%s'" % includepy
++
+ # in case CC/CXX was set to the scan-build wrapper,
+ # ensure that we build the python modules with scan-build, too
+ if env['CC'] is None or env['CC'].find('scan-build') < 0:
+@@ -1408,11 +1414,14 @@ if not env['python']:
+ python_install = []
+ else:
+ python_lib_dir = env['python_libdir']
++ python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
+ python_module_dir = python_lib_dir + 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_lib_dir, ))
+
+ python_modules_install = python_env.Install( DESTDIR + python_module_dir,
+ python_modules)
+--
+2.1.0
+
diff --git a/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch b/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch
new file mode 100644
index 0000000..b27c671
--- /dev/null