From de62abf1322cf32affda7b81bf6beeefbd35e4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20J=C3=A4ggi?= Date: Wed, 25 Mar 2020 14:42:21 +0100 Subject: [PATCH] gpsd: moving neom8tool from OM to BSP layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BugzID: 62177 Signed-off-by: Tobias Jäggi --- recipes-connectivity/gpsd/files/gnss0.ubx | 27 +++++++++++++++++++++++ recipes-connectivity/gpsd/gpsd_%.bbappend | 17 ++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 recipes-connectivity/gpsd/files/gnss0.ubx diff --git a/recipes-connectivity/gpsd/files/gnss0.ubx b/recipes-connectivity/gpsd/files/gnss0.ubx new file mode 100644 index 0000000..1abaef0 --- /dev/null +++ b/recipes-connectivity/gpsd/files/gnss0.ubx @@ -0,0 +1,27 @@ +CFG-ESFGAWT:flags:useWtPin=0 +CFG-NMEA:nmeaVersion=0x41 +{ +CFG-ESFLA:leverArmType=0 +CFG-ESFLA:leverArmX=1 +CFG-ESFLA:leverArmY=2 +CFG-ESFLA:leverArmZ=3 +CFG-ESFLA:leverArmType=1 +CFG-ESFLA:leverArmX=4 +CFG-ESFLA:leverArmY=5 +CFG-ESFLA:leverArmZ=6 +CFG-ESFLA:leverArmType=4 +CFG-ESFLA:leverArmX=7 +CFG-ESFLA:leverArmY=8 +CFG-ESFLA:leverArmZ=9 +} +{ +CFG-ESFALG:bitfield:doAutoMntAlg=0 +CFG-ESFALG:yaw=16 +CFG-ESFALG:pitch=34 +CFG-ESFALG:roll=39 +} +{ +CFG-NAV5:dynModel=4 +CFG-NAV5:fixMode=3 +} + diff --git a/recipes-connectivity/gpsd/gpsd_%.bbappend b/recipes-connectivity/gpsd/gpsd_%.bbappend index 616824c..ab079d2 100644 --- a/recipes-connectivity/gpsd/gpsd_%.bbappend +++ b/recipes-connectivity/gpsd/gpsd_%.bbappend @@ -1,4 +1,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +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 \ @@ -6,6 +9,10 @@ SRC_URI_prepend = " \ " 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" @@ -24,8 +31,14 @@ do_install_append () { install -d ${D}${sysconfdir}/udev/rules.d install -m 0644 ${WORKDIR}/60-ublox-neo.rules ${D}${sysconfdir}/udev/rules.d - 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 + 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 } # workaround for receipe backport: gpsd 3.19 is installing shared object files in different