Getgpsdate

From Phobos Wiki
Revision as of 08:48, 29 January 2015 by MarkTomm (talk | contribs)
Jump to navigation Jump to search

git repo

git@taru:users/mark/getgpsdate.git


Description

   Simple program that gets time straight form a gps device (via a file 
   handler in /dev/) using the low level gps interface libgpsd to 
   circumvent the need for GPS Daemons (e.g. when using Generic NMEA
   reference clocks).
   This program should be run once at system boot, otherwise, with no
   half-way valid clock, ntpd will receive the time from gps
   source, but will either refuse to adjust the clock by years of
   difference or make a sudden change of system time, which may result
   in system crash.


Building and dependencies

   getgpsdate util depends on libgpsd and libgps so files and on
   some additional headers (gpsd.h and its includes). All this can
   be obtained from compiled gpsd directory (after running ./configure
   && make (or scons equivalent) in gpsd source directory).
   In buildroot gpsd is set as a dependency for getgpsdate.


Relevant files in Telem-gw project:

  • buildroot/board/martem/post-build/rm-temp-files.sh

gpsd binary and S50gpsd init script are removed from system install directory at the end of the build. gpsd is not used in devices, only it's libraries and headers in staging for compiling getgpsdate utility.

  • buildroot/package/gpsd/gpsd.mk

cp $(@D)/gpsd.h $(STAGING_DIR)/usr/include line was added to INSTALL_STAGING define, because getgpsdate util includes <gpsd.h>

  • buildroot/package/getgpsdate/Config.in
  • buildroot/package/getgpsdate/getgpsdate.mk

MarkTomm 29. jaanuar 2015, kell 10:48 (EET)