summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrecipes-navigation/gpsd/gpsd/gpsd40
-rw-r--r--recipes-navigation/gpsd/gpsd_3.20.bb2
2 files changed, 23 insertions, 19 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd
index 36ca387..1f14107 100755
--- a/recipes-navigation/gpsd/gpsd/gpsd
+++ b/recipes-navigation/gpsd/gpsd/gpsd
@@ -38,24 +38,6 @@ CAPABILITY=/sys/devices/platform/mts-io/capability/gps
([[ -n $GPS_LINE ]]) || exit 0
-((numtries = 10))
-if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
- while ((numtries > 0)) ; do
- if [ -c $GPS_LINE ];then
- logger -s -t 'gpsd info' -p daemon.info $GPS_LINE" found"
- break
- fi
- sleep 1
- done
- if ((numtries == 0));then
- logger -s -t 'gpsd info' -p daemon.info $GPS_LINE" not found. gpsd will not start"
- exit 0
- fi
-else
- # Exit if no gps found
- ([[ -c $GPS_LINE ]]) || exit 0
-fi
-
# Assemble the GPS devices
# PPS device is needed so GPSD finds the PPS.
if [[ -c $GPS_PPS ]] ; then
@@ -81,6 +63,28 @@ fi
#
do_start()
{
+ # Don't bother starting GPSD if the device does not exist
+ # Wait a little bit in case the device has not yet
+ # been enumerated.
+ ((numtries = 10))
+ if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
+ while ((numtries > 0)) ; do
+ ((numtries--))
+ if [[ -c $GPS_LINE ]];then
+ logger -s -t 'gpsd info' -p daemon.info $GPS_LINE" found"
+ break
+ fi
+ sleep 1
+ done
+ if ((numtries == 0));then
+ logger -s -t 'gpsd info' -p daemon.info $GPS_LINE" not found. gpsd will not start"
+ exit 0
+ fi
+ else
+ # Exit if no gps found
+ ([[ -c $GPS_LINE ]]) || exit 0
+ fi
+
/usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \
-- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \
|| return 1
diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb
index ba1b33e..514ca0a 100644
--- a/recipes-navigation/gpsd/gpsd_3.20.bb
+++ b/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -4,7 +4,7 @@ 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="m6"
+PR="m7"
#TODO
#the recipe generates python2 pygps package for Atmel based devices and python3 pygps package for TI based devices.