From cfba9d58320fe254b1160e0a9899fd5305594d52 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 14 Jan 2021 06:05:56 -0600 Subject: Create gpsd-test package --- recipes-navigation/gpsd/gpsd-test_1.0.bb | 37 ++++++++++++++++++++ recipes-navigation/gpsd/test/README | 40 +++++++++++++++++----- recipes-navigation/gpsd/test/gpsd-test-1.0.tar.gz | Bin 0 -> 854 bytes recipes-navigation/gpsd/test/gpsd-test.tar.gz | Bin 712 -> 0 bytes 4 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 recipes-navigation/gpsd/gpsd-test_1.0.bb create mode 100644 recipes-navigation/gpsd/test/gpsd-test-1.0.tar.gz delete mode 100644 recipes-navigation/gpsd/test/gpsd-test.tar.gz diff --git a/recipes-navigation/gpsd/gpsd-test_1.0.bb b/recipes-navigation/gpsd/gpsd-test_1.0.bb new file mode 100644 index 0000000..7753bcc --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-test_1.0.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "gpsd reboot testing" +SECTION = "base" +PRIORITY = "optional" +LICENSE = "GPLv2+" +PR = "r1" +inherit allarch +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" +FILESEXTRAPATHS_prepend = "${THISDIR}/test:" +SRC_URI = " \ + file://gpsd-test-1.0.tar.gz \ + " + +FILES_${PN} = "*" + +RDEPENDS_${PN} = "bash" + +do_install() { + echo "Directory is ${D}" + cp -a * ${D} + cd ${D} + chown -R root:root * + chmod 755 ${prefix}/local/bin/* + chmod 755 ${sysconfdir}/rc5.d/* +} + +pkg_postinst_${PN}() { + if [ -z "$D" ] ; then + touch /var/config/reboot + fi +} + + +pkg_prerm_${PN}() { + if [ -z "$D" ] ; then + rm /var/config/reboot + fi +} \ No newline at end of file diff --git a/recipes-navigation/gpsd/test/README b/recipes-navigation/gpsd/test/README index 18d712f..d3f3a60 100644 --- a/recipes-navigation/gpsd/test/README +++ b/recipes-navigation/gpsd/test/README @@ -1,10 +1,34 @@ -Install the test in the root file system -of a device with ntp and gpsd installed. -ntp must be configured to use gpsd as -the time source. +To run the test: +opkg install gpsd-test_1.0-*_all.ipk -cd / -sudo tar -xf /tmp/gpsd-test.tar.gz +/etc/rc5.d/S99zzreboot + + +To shutoff the test: + +rm /var/config/reboot + + +To restart the test: + +touch /var/config/reboot + +/etc/rc5.d/S99zzreboot + + + +A log of successful tests is kept in: +/var/config/gpslog.txt. + +It contains the seconds since 1-1-1970, +baud rate, and the ntpq -p output for the +PPS. + +On failure, the test will stop rebooting. + +Failure is defined as: + +No fix (if we lost reception this could happen) + +Bad baud rate (not 115200) -See /usr/share/gpsd-test/README for more -details. diff --git a/recipes-navigation/gpsd/test/gpsd-test-1.0.tar.gz b/recipes-navigation/gpsd/test/gpsd-test-1.0.tar.gz new file mode 100644 index 0000000..a2eb195 Binary files /dev/null and b/recipes-navigation/gpsd/test/gpsd-test-1.0.tar.gz differ diff --git a/recipes-navigation/gpsd/test/gpsd-test.tar.gz b/recipes-navigation/gpsd/test/gpsd-test.tar.gz deleted file mode 100644 index 4d74be3..0000000 Binary files a/recipes-navigation/gpsd/test/gpsd-test.tar.gz and /dev/null differ -- cgit v1.2.3