Getgpsdate
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 automatically selected when choosing getgpsdate. First the gpsd package is installed to the staging directory, so getgpsdate could use the lib files and gpsd.h is copied from the gpsd package direcory to $(STAGING_DIR)/usr/include/ After that the getgpsdate utility installation is scheduled. At the end of buildroot build gpsd binary and init.d script is removed from /usr/bin
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 13. veebruar 2015, kell 09:36 (EET)