meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/0003-tsip-configure-and-ena...

50 lines
1.7 KiB
Diff
Raw Normal View History

gpsd: upgrade to 3.24 Usually when upgrading packages, we just copy the upstream package and adjust it slightly. I've looked at the upstream package here: https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-navigation/gpsd (HEAD at f3d14d41ad60d2d52a0ea795ae10fe0882146ed1) But as I compared both packaging trees, I found ours is quite different than upstream. We have a lot of additional patches, still use python2 and have these extra files: ├── gpsd │ ├── 60-gpsd.rules │ ├── gpsd │ ├── gpsd-default │ ├── gpsd.service │ ├── oc2g │ │ ├── gpsd-default │ │ └── gpsd.service │ ├── sysmobts2100 │ │ └── gpsd-default │ ├── sysmobts-v2 │ │ └── gpsd-default │ └── sysmocom-idu │ └── gpsd-default Therefore I didn't start with the upstream packaging but instead increased the gpsd version in our packaging and went through each patch to see if it can be dropped or needs to be forward ported. Change the version by renaming the .bb file. Reset the version of the recipe (PR) back to "r0" again, as it is common practice after changing the package version. The previous value "r3.20" looked a bit like a package version, but it's not that. Rebase patches: * 0001-gps2udp-Add-a-label-timestamp-and-mac-address-to-eac.patch * 0002-gps2udp-leave-argv-untouched.patch (leave-argv-untouched.patch) * 0003-tsip-configure-and-enable-1PPS.patch (gpsd-tsip-pps.patch) Add build fixes: * 0004-SConscript-force-use-of-pthread.patch Drop patches: * 0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch: unused in previous version * 0001-SConstruct-disable-html-and-man-docs-building-becaus.patch: doesn't apply, instead disable docs building via manbuild='no' * 0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch: not needed anymore (no splintopts line in 3.24) * gpsd-3.3-ldflags.patch: fixed upstream * no-rpath-please.patch: doesn't apply, not needed anymore (see 5df2de36 in gpsd.git) Related: https://docs.yoctoproject.org/bitbake/2.2/bitbake-user-manual/bitbake-user-manual-ref-variables.html#term-PR Related: SYS#6222 Change-Id: I2debe481c5f1cc4ee8290ad0dc883d6a4ea73741
2022-12-13 12:28:40 +00:00
From 9b12594ed0ce769d923a3b4f4d42c3b25caa87d3 Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
Date: Tue, 13 Dec 2022 15:25:52 +0100
Subject: [PATCH] tsip: configure and enable 1PPS
Rebase of gpsd-tsip-pps.patch we have been carrying:
From www/time-service-intro.adoc:
> GPS enables receivers to generate a pulse-per-second
> signal ("1PPS" or just "PPS") accurate to the top of the current
> UTC second within 50 ns.
---
drivers/driver_tsip.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/driver_tsip.c b/drivers/driver_tsip.c
index 57b97513c..673bbef7e 100644
--- a/drivers/driver_tsip.c
+++ b/drivers/driver_tsip.c
@@ -4288,6 +4288,26 @@ void configuration_packets_generic(struct gps_device_t *session)
/* Primary Receiver Configuration Parameters Request (0xbb-00)
* returns Primary Receiver Configuration Block (0xbb-00) */
(void)tsip_write1(session, "\xbb\x00", 2);
+
+ GPSD_LOG(LOG_PROG, &session->context->errout,
+ "Configuring + Enabling 1PPS\n");
+ /* enable 1pps */
+ putbyte(buf, 0, 0x8e);
+ putbyte(buf, 1, 0x4a);
+ putbyte(buf, 2, 0x01);
+ (void)tsip_write1(session, buf, 3);
+
+ /* request PPS only if at least one sat is visible */
+ putbyte(buf, 0, 0x8e);
+ putbyte(buf, 1, 0x4e);
+ putbyte(buf, 2, 0x03);
+ (void)tsip_write1(session, buf, 3);
+
+ /* request PPS and TSIP to use UTC time, not GPS */
+ putbyte(buf, 0, 0x8e);
+ putbyte(buf, 1, 0xa2);
+ putbyte(buf, 2, 0x03);
+ (void)tsip_write1(session, buf, 3);
}
/* configure Acutime Gold to a known state */
--
2.34.1