gnss-init service: bring up gnss

bring up gnss module ublox neo

BugzID: 57871

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
This commit is contained in:
Ramon Moesching 2019-08-08 18:16:38 +02:00
parent a01e4f5694
commit 6cd203ba44
2 changed files with 47 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,30 @@
# Copyright (C) 2019 Ramon Moesching <ramon.moesching@netmodule.com>
# 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/
}