Revert "gpsd: Clearly separate NetModule from mainline version"
This reverts commit 791d40ccd7.
It is bringing licenses problem, leading to errors. This has to be fixed
first.
BugzID: 62684
This commit is contained in:
parent
791d40ccd7
commit
c1ec2a0207
|
|
@ -0,0 +1 @@
|
|||
KERNEL=="ttyACM?", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a8", SYMLINK+="gps0"
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From 2a4b3bcde0d73a3a4a6644d5f944ac9d16023ba9 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Bunk <bunk@stusta.de>
|
||||
Date: Mon, 21 Oct 2019 13:53:25 +0300
|
||||
Subject: gps_shm_close: Free privdata
|
||||
|
||||
Previously every open/close cycle leaked privdata.
|
||||
|
||||
Signed-off-by: Adrian Bunk <bunk@stusta.de>
|
||||
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
---
|
||||
libgps_shm.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgps_shm.c b/libgps_shm.c
|
||||
index d93972bba..12bb3760b 100644
|
||||
--- a/libgps_shm.c
|
||||
+++ b/libgps_shm.c
|
||||
@@ -163,8 +163,12 @@ int gps_shm_read(struct gps_data_t *gpsdata)
|
||||
|
||||
void gps_shm_close(struct gps_data_t *gpsdata)
|
||||
{
|
||||
- if (PRIVATE(gpsdata) && PRIVATE(gpsdata)->shmseg != NULL)
|
||||
- (void)shmdt((const void *)PRIVATE(gpsdata)->shmseg);
|
||||
+ if (PRIVATE(gpsdata)) {
|
||||
+ if (PRIVATE(gpsdata)->shmseg != NULL)
|
||||
+ (void)shmdt((const void *)PRIVATE(gpsdata)->shmseg);
|
||||
+ free(PRIVATE(gpsdata));
|
||||
+ gpsdata->privdata = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
int gps_shm_mainloop(struct gps_data_t *gpsdata, int timeout,
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -1,13 +1,48 @@
|
|||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
TTY_DEVICE = "/dev/gnss0"
|
||||
RDEPENDS_${PN} += "python3-pyserial"
|
||||
|
||||
SRC_URI_prepend = " \
|
||||
git://gitlab.com/netmodule/third-party/gpsd.git;protocol=ssh;user=git;branch=3.20/netmodule \
|
||||
file://60-ublox-neo.rules \
|
||||
file://0001-Revert-Fix-the-handling-of-defaults-from-the-environ.patch \
|
||||
"
|
||||
SRC_URI_remove = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz"
|
||||
|
||||
SRC_URI_append = " \
|
||||
file://gnss0.ubx \
|
||||
"
|
||||
|
||||
# overwrite default gpsd.service file with our configuration
|
||||
SRCREV = "${AUTOREV}"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
SYSTEMD_SERVICE_${PN} += "${BPN}.service \
|
||||
"
|
||||
TTY_DEVICE = "/dev/ttyS3"
|
||||
TTY_DEVICE_imx8-nmhw23 = "/dev/gps0"
|
||||
TTY_DEVICE_am335x-nmhw24 = "/dev/ttyS3"
|
||||
|
||||
USBAUTO_STATE = "false"
|
||||
|
||||
do_install_append () {
|
||||
install -d ${D}${sysconfdir}/udev/rules.d
|
||||
install -m 0644 ${WORKDIR}/60-ublox-neo.rules ${D}${sysconfdir}/udev/rules.d
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 744 ${WORKDIR}/git/neom8tool ${D}${bindir}/neom8tool
|
||||
|
||||
install -d ${D}${sysconfdir}/gnss
|
||||
install -m 644 ${WORKDIR}/gnss0.ubx ${D}${sysconfdir}/gnss/gnss0.ubx
|
||||
|
||||
sed -i 's|DEVICES=""|DEVICES="${TTY_DEVICE}"|g' ${D}/etc/default/gpsd.default
|
||||
sed -i 's|USBAUTO="true"|USBAUTO="${USBAUTO_STATE}"|g' ${D}/etc/default/gpsd.default
|
||||
}
|
||||
|
||||
SUMMARY_gps-utils-conf = "gps-utils configuration files"
|
||||
PACKAGES_prepend = "gps-utils-conf "
|
||||
RDEPENDS_gps-utils += "gps-utils-conf python"
|
||||
FILES_gps-utils-conf = "${sysconfdir}/gnss/*.ubx"
|
||||
|
||||
# workaround for receipe backport: gpsd 3.19 is installing shared object files in different
|
||||
# place than expect.
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ PROVIDES = "virtual/gpsd"
|
|||
|
||||
SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
|
||||
file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
|
||||
file://0001-Revert-Fix-the-handling-of-defaults-from-the-environ.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"
|
||||
SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50"
|
||||
SRC_URI[md5sum] = "b3bf88706794eb8e5f2c2543bf7ba87b"
|
||||
SRC_URI[sha256sum] = "27dd24d45b2ac69baab7933da2bf6ae5fb0be90130f67e753c110a3477155f39"
|
||||
|
||||
inherit scons update-rc.d python-dir pythonnative systemd update-alternatives
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
require recipes-connectivity/gpsd/gpsd_3.20.bb
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
# Additional package containing configuration files for gps-utils
|
||||
# Mainly ubx configuration file
|
||||
SUMMARY_gps-utils-conf = "gps-utils configuration files"
|
||||
PACKAGES =+ "gps-utils-conf"
|
||||
|
||||
GIT_REPO = " \
|
||||
git://gitlab.com/netmodule/third-party/gpsd.git;protocol=ssh;user=git;branch=3.20/netmodule \
|
||||
"
|
||||
|
||||
SRC_URI += "file://gnss0.ubx"
|
||||
|
||||
# Use own git repo but keep patches
|
||||
python() {
|
||||
import re
|
||||
src_uri = d.getVar('SRC_URI')
|
||||
src_uri = re.sub(r'git://[^\s]*', '', src_uri)
|
||||
src_uri = re.sub(r'http://[^\s]*', '', src_uri)
|
||||
src_uri = re.sub(r'https://[^\s]*', '', src_uri)
|
||||
src_uri = ' '.join([d.getVar('GIT_REPO'), src_uri])
|
||||
d.setVar('SRC_URI', src_uri)
|
||||
}
|
||||
|
||||
SRCREV = "${AUTOREV}"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
RDEPENDS_${PN} += "python3-pyserial"
|
||||
RDEPENDS_gps-utils += "gps-utils-conf python"
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 744 ${S}/neom8tool ${D}${bindir}/neom8tool
|
||||
|
||||
install -d ${D}${sysconfdir}/gnss
|
||||
install -m 644 ${WORKDIR}/gnss0.ubx ${D}${sysconfdir}/gnss/gnss0.ubx
|
||||
}
|
||||
|
||||
FILES_gps-utils-conf = "${sysconfdir}/gnss/*.ubx"
|
||||
Loading…
Reference in New Issue