diff --git a/recipes-connectivity/gnss-init/files/gnss-init.service b/recipes-connectivity/gnss-init/files/gnss-init.service new file mode 100644 index 0000000..a9b6f37 --- /dev/null +++ b/recipes-connectivity/gnss-init/files/gnss-init.service @@ -0,0 +1,17 @@ +[Unit] +Description=GNSS init service +After=v2x-ieee802.11p.service + +[Service] +Type=oneshot + +ExecStartPre=/bin/sh -c "echo 0 > /sys/class/leds/gnss_rst/brightness" +ExecStart=/usr/bin/echo start +ExecStop=/usr/bin/echo stop +ExecStopPost=/bin/sh -c "echo 0 > /sys/class/leds/gnss_rst/brightness" + +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +RequiredBy=multi-user.target diff --git a/recipes-connectivity/gnss-init/gnss-init.bb b/recipes-connectivity/gnss-init/gnss-init.bb new file mode 100644 index 0000000..cdaa22b --- /dev/null +++ b/recipes-connectivity/gnss-init/gnss-init.bb @@ -0,0 +1,30 @@ +# Copyright (C) 2019 Ramon Moesching +# Released under the MIT license (see COPYING.MIT for the terms) +DESCRIPTION = "GNSS init service" +HOMEPAGE = "www.netmodule.com" +LICENSE = "MIT" +SECTION = "bsp/firmware" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + + +inherit systemd + +FILESEXTRAPATHS_append := ":${THISDIR}/files" + +SRC_URI_append = " \ + file://gnss-init.service \ + " + +S = "${WORKDIR}" + +SYSTEMD_SERVICE_${PN} = " \ + gnss-init.service \ + " + +FILES_${PN}_append = "${systemd_unitdir}/system ${bindir}" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/gnss-init.service ${D}${systemd_unitdir}/system/ + +}