Getgpsdate: Difference between revisions

From Phobos Wiki
Jump to navigation Jump to search
(Uus lehekülg: '=== 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 ...')
 
 
(6 intermediate revisions by the same user not shown)
Line 24: Line 24:
     && make (or scons equivalent) in gpsd source directory).
     && make (or scons equivalent) in gpsd source directory).


     In buildroot gpsd is set as a dependency for getgpsdate.
     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 is removed from $(TARGET_DIR)/usr/bin
    directory before the new firmware is packaged.
    gpsd init script (S50gpsd) is also removed from $(TARGET_DIR)/usr/bin.
    The script that removes is gw/buildroot/board/martem/post-build/rm-temp-files.sh


    After every firmware update a script S01remove-old-files.sh located in
    gw/buildroot/board/martem/telem-common/fs_skeleton/usr/local/bin/post_update/
    runs in the device and removes /usr/bin/gpsd and /etc/init.d/S50gpsd
    because we don't need them at the moment.


=== Relevant files in Telem-gw project: ===
=== Relevant files in Telem-gw project: ===
Line 36: Line 48:
* buildroot/package/getgpsdate/getgpsdate.mk
* buildroot/package/getgpsdate/getgpsdate.mk


=== Relevant commits ===
[[Kasutaja:MarkTomm|MarkTomm]] 17. veebruar 2015, kell 15:02 (EET)
 
<pre>
2addffadb7004912cf4a8f86b6f2e3264172271d
394199005b49ca11de9a808c32aae5b5e804fe95
b0e23ef1ecbdd6bb030f52e114a79e1079744d86
26910c4c0a803078d133590f6e6424d63ca1f5fe
91f50c95950c1886b306fe2f7bddaa55983c1d5f
7c0898c4a97e76a83426467de31193e0d8ca6247
67be7fab9024ffc42af7da56a91ba445746ef123
069a0c71a3d49cc17a052c46ffe3d4d35165dc0e
b727c94c450ebc43a783facf88011ae193a7203e
1eecf54be19e6679cb3a0eec8d500c277b5940b9
45945eac6bc7b88ca08a51e9e53ebb4ada4f32a7
f8963adf0723ecdd11362599d65dc24f88a6438f
</pre>
 
[[Kasutaja:MarkTomm|MarkTomm]] 14. jaanuar 2015, kell 19:32 (EET)

Latest revision as of 13:02, 17 February 2015

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 is removed from $(TARGET_DIR)/usr/bin 
   directory before the new firmware is packaged.
   gpsd init script (S50gpsd) is also removed from $(TARGET_DIR)/usr/bin.
   The script that removes is gw/buildroot/board/martem/post-build/rm-temp-files.sh
   After every firmware update a script S01remove-old-files.sh located in
   gw/buildroot/board/martem/telem-common/fs_skeleton/usr/local/bin/post_update/
   runs in the device and removes /usr/bin/gpsd and /etc/init.d/S50gpsd 
   because we don't need them at the moment.

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 17. veebruar 2015, kell 15:02 (EET)