Compare commits

...

26 Commits
HEAD ... sumo

Author SHA1 Message Date
Lucien Mueller ba7c13cbc8 distro: added yocto version name as prefix on the ostree branchname for "normal" and "dev" image.
BugzID: 59761

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2019-10-28 14:09:35 +01:00
Alexandre Bard 5b1d348ce8 Rename package ublox-configuration to ublox-gsm-config
BugzID: 57325
2019-06-13 15:56:45 +02:00
Alexandre Bard fa7e258511 netmodule-linux-image: Add libgpiod python bindings
BugzID: 57325
2019-06-13 11:33:46 +02:00
Alexandre Bard 30d78a2958 netmodule-distro: Add python bindings for libgpiod
libgpiod simplify access to gpios from ublox-config script.
Usage: Power off and on ublox modem

BugzID: 57325
2019-06-12 13:48:20 +02:00
Alexandre Bard 285d8e97dc netmodule-linux-image: Remove deprecated modem config related scripts
All features are now merged in ublox-configuration

BugzID: 57325
2019-06-12 13:48:15 +02:00
Moesching 2966a58bea image-preprocessing: dnsmasqlease: remove useless mkdir command
Directory is already created through recipe.

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-30 10:55:25 +02:00
Ramon Moesching 3f9a68e40f dnsmasq lease: add image tasks for creating tmpfiles.d configuration
Since user move directories in /var/lib aren't deployed in sota images.
So create them by systemd's tmpfiles.d.

/var/lib/misc is required for dnsmasq lease file.

BugzID: 56729

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-24 09:46:21 +02:00
Ramon Moesching b485212300 netmodule-linux-image: move additional image tasks out of recipe
Declare additional image tasks from now in seperate include file

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-24 09:43:14 +02:00
Ramon Moesching 5b505a5ad3 dsnmasq bbappend: disable systemd service and create dir /var/lib/misc
dnsmasq is started by systemd service during booting. This process is
preventing networkmanager for e.g. bring up any wifi access point where
dnsmasq acts as dhcp server.

Directory /var/lib/misc is required for lease file.

BugzID: 56729

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-24 09:37:20 +02:00
Ramon Moesching 1c0dfb864a um-service-config: remove availability check
FCT Hotfix: Remove unnecessary ping check and fix zerobyte warning.

ip=dhcp is affecting init system and services are failing even when
target is started with/after network-online.target
Needs further investigations!

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-12 11:50:29 +02:00
Alexandre Bard 004fa88b74 dev-image: Add tmate
tmate is a terminal sharing tool based on tmux. It will help us
understand and help remotely
2019-04-11 16:57:45 +02:00
Alexandre Bard de7a92cdca sw-update: Fix spl update 2019-04-11 16:57:45 +02:00
Alexandre Bard 6668e24305 hw16: hw20: Add wlconf
This configuration binary was removed from linux-firmware and
has now it how recipe
2019-04-09 10:56:23 +02:00
Ramon Moesching 82bbc341d7 socket-uart: add runtime configuration through um-service-cfg
All serial based services gets their network configuration through
/etc/user-module/network.conf file
Introduced systemd target user-module

BugzID: 56443

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-05 16:03:14 +02:00
Ramon Moesching f46f7a1dca um-service-cfg: Configuration support for user module services
User module provides few information over i2c bus, e.g. ip, version,..
Access /proc/device-tree/user_module/ for checking availability of user
module and get information and stores settings under /etc/user-module/
Port definitions for each services is provided through this recipe
and not through device tree. Would be nice feature for future improvements.

socket-uart and cannelloni depends on that recipe.

BugzID: 56443

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-05 16:00:06 +02:00
Alexandre Bard e13bb7edfe busybox: Make syslog service stop later
It will avoid some applications log to come to the console when
stopping the system
BugzID: 55006
2019-04-02 19:02:20 +02:00
Alexandre Bard e596289652 hw21:netmodule-linux-image: Add sim-config
BugzID: 56371
2019-04-02 14:58:41 +02:00
Ramon Moesching 6a94f1fbfa socket-uart: provide uart, kline and lin serial interfaces from one recipe
Start systemd services for providing serial interfaces of remote machine:
- UART (ttyUM0)
- KLINE (ttyUM1)
- LIN (ttyUM2)

Caution: UserModule connection settings are hardcoded within the services!
BugzID: 56441

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-04-02 14:51:58 +02:00
Alexandre Bard 3c9a5b02d3 hw21:netmodule-linux-image: Add mac-address-set
BugzID: 54514
2019-04-02 14:51:15 +02:00
Alexandre Bard f4d745f2f2 hw21:netmodule-linux-image: Add modem-config-dump
BugzID: 56305
2019-04-02 14:50:39 +02:00
Ramon Moesching dcd8b9cfb9 socket-uart: Change to correct systemd type and revise socat pty parameters
Systemd service file Type "forking" leads to service restart which
caused socket disconnection. ExecStart process was never forked.
Now Type=simple fixed this issue. It' anyway recommended for
long running tasks.

Socat:
- Fixed typo rawer to raw
- Set echo off
- Defined bitrate

BugzID: 52063

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-02-25 16:45:17 +01:00
Alexandre Bard e38843c6ff hydra: Add hydra library
This library is required to build some NRSW tools
2019-02-22 12:28:23 +01:00
Lucien Mueller a5b6175c50 ostree: remove custom ostree recipe
patch-file is now available in meta-updater and thus this bbappend file
is not required anymore.

BugzID: 55796

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-02-21 18:31:22 +01:00
Ramon Moesching f54623c871 socket-uart: Set runtime dependency only to real package and fix typo
Set runtime dependency only to package with executables
and fix typo.

BugzID: 52063
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-02-18 16:43:39 +01:00
Ramon Moesching 8b67634527 socket-uart: refelct origin uart as pseudo tty device on local host
Bind pseudo tty and origin uart with socat usage (tcp socket)
Socat is started by systemd service.
BugzID: 52063

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-02-14 13:54:29 +01:00
Patrick Zysset 477ae213e0 board-descriptor: remove bd tool from rel images
This tool have been provided for debugging purposes. Therefore it is
removed from release and minimal images and only used in development
images.

BugzID: 55615

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-02-07 12:58:02 +01:00
26 changed files with 380 additions and 40 deletions

View File

@ -90,6 +90,7 @@ PREFERRED_VERSION_nodejs = "6.9.1"
PREFERRED_VERSION_nodejs-native = "6.9.1" PREFERRED_VERSION_nodejs-native = "6.9.1"
PACKAGECONFIG_append_pn-nodejs = "openssl" PACKAGECONFIG_append_pn-nodejs = "openssl"
PACKAGECONFIG_append_pn-libgpiod = " python3"
# Should not be here but is required when parsing recipes with meta-updater layer # Should not be here but is required when parsing recipes with meta-updater layer
OSTREE_INITRAMFS_FSTYPES = "ext4.gz.u-boot" OSTREE_INITRAMFS_FSTYPES = "ext4.gz.u-boot"

View File

@ -0,0 +1,18 @@
[Unit]
Description=System Logging Service
Wants=busybox-klogd.service
Conflicts=shutdown.target
Before=shutdown.target
[Service]
EnvironmentFile=-/etc/default/busybox-syslog
ExecStart=@base_sbindir@/syslogd -n $OPTIONS
Sockets=syslog.socket
[Install]
WantedBy=multi-user.target
Also=busybox-klogd.service
Alias=syslog.service

View File

@ -0,0 +1,17 @@
IMAGE_PREPROCESS_COMMAND_sota += " moveRPMDatabase; dnsmasqlease;"
# Change the location of /var/lib/rpm to /usr/lib/rpm.
# This makes the rpm package index consistent with installed packages.
moveRPMDatabase() {
cd ${WORKDIR}/rootfs
mv var/lib/rpm/* usr/lib/rpm
rm -r var/lib/rpm
echo "L /var/lib/rpm - - - - /usr/lib/rpm" > etc/tmpfiles.d/ostree-rpm.conf
}
dnsmasqlease() {
cd ${WORKDIR}/rootfs
echo "d /var/lib/misc 0755 - - -" > etc/tmpfiles.d/dnsmasq-leasesdir.conf
cd -
}

View File

@ -52,5 +52,7 @@ IMAGE_INSTALL_append = " \
ethtool \ ethtool \
evtest \ evtest \
devmem2 \ devmem2 \
board-descriptor \
tmate \
" "
OSTREE_BRANCHNAME = "${MACHINE}-dev" OSTREE_BRANCHNAME = "${LAYERSERIES_CORENAMES}-${MACHINE}-dev"

View File

@ -18,7 +18,6 @@ IMAGE_INSTALL = " \
systemd-serialgetty \ systemd-serialgetty \
networkmanager \ networkmanager \
modemmanager \ modemmanager \
board-descriptor \
curl \ curl \
tar \ tar \
less \ less \
@ -26,7 +25,7 @@ IMAGE_INSTALL = " \
kernel-devicetree \ kernel-devicetree \
" "
IMAGE_INSTALL_append_am335x-nmhw21 = " ublox-configuration" IMAGE_INSTALL_append_am335x-nmhw21 = " ublox-gsm-config"
LICENSE = "BSD" LICENSE = "BSD"

View File

@ -1,4 +1,5 @@
inherit core-image inherit core-image
require includes/image-preprocessing.inc
SUMMARY = "NetModule Linux Distro Image" SUMMARY = "NetModule Linux Distro Image"
@ -16,6 +17,7 @@ FIRMWARE_am335x-nrhw20 = " \
linux-firmware-ath9k \ linux-firmware-ath9k \
linux-firmware-wl12xx\ linux-firmware-wl12xx\
linux-firmware-wl18xx\ linux-firmware-wl18xx\
wlconf-bin \
" "
FIRMWARE_am335x-nmhw21 = " \ FIRMWARE_am335x-nmhw21 = " \
@ -29,6 +31,7 @@ FIRMWARE_am335x-nrhw16 = " \
linux-firmware-ath9k \ linux-firmware-ath9k \
linux-firmware-wl12xx\ linux-firmware-wl12xx\
linux-firmware-wl18xx\ linux-firmware-wl18xx\
wlconf-bin \
" "
FIRMWARE_armada-385 = " \ FIRMWARE_armada-385 = " \
linux-firmware-ath6k \ linux-firmware-ath6k \
@ -52,8 +55,6 @@ IMAGE_INSTALL_append = " \
networkmanager \ networkmanager \
modemmanager \ modemmanager \
parted \ parted \
board-descriptor \
sw-update \
rng-tools \ rng-tools \
glibc-utils \ glibc-utils \
glibc-gconv \ glibc-gconv \
@ -95,8 +96,12 @@ IMAGE_INSTALL_append_am335x-nmhw21 = " \
spitools \ spitools \
socat \ socat \
libgpiod \ libgpiod \
libgpiod-python \
battery-test \ battery-test \
cryptodev-module \ cryptodev-module \
socket-uart \
ublox-gsm-config \
mac-address-set \
" "
FPGA_INSTALL = " \ FPGA_INSTALL = " \
@ -105,24 +110,12 @@ FPGA_INSTALL = " \
IMAGE_INSTALL_append_armada-385-nbhw14 = " ${FPGA_INSTALL}" IMAGE_INSTALL_append_armada-385-nbhw14 = " ${FPGA_INSTALL}"
IMAGE_INSTALL_append_armada-385-nbhw17 = " ${FPGA_INSTALL}" IMAGE_INSTALL_append_armada-385-nbhw17 = " ${FPGA_INSTALL}"
IMAGE_INSTALL_append_am335x-nmhw21 = " ublox-configuration"
LICENSE = "BSD" LICENSE = "BSD"
KERNEL_IMAGETYPE_sota = "fitImage" KERNEL_IMAGETYPE_sota = "fitImage"
IMAGE_OVERHEAD_FACTOR = "1.0" IMAGE_OVERHEAD_FACTOR = "1.0"
OSTREE_BOOTLOADER = "u-boot" OSTREE_BOOTLOADER = "u-boot"
OSTREE_BRANCHNAME ?= "${MACHINE}" OSTREE_BRANCHNAME ?= "${LAYERSERIES_CORENAMES}-${MACHINE}"
IMAGE_PREPROCESS_COMMAND_sota += " moveRPMDatabase;"
BUILDNAME = "${EXTERNALSRC_GIT_SRCREV};${DATETIME};${PN}" BUILDNAME = "${EXTERNALSRC_GIT_SRCREV};${DATETIME};${PN}"
# Change the location of /var/lib/rpm to /usr/lib/rpm.
# This makes the rpm package index consistent with installed packages.
moveRPMDatabase() {
cd ${WORKDIR}/rootfs
mv var/lib/rpm/* usr/lib/rpm
rm -r var/lib/rpm
echo "L /var/lib/rpm - - - - /usr/lib/rpm" > etc/tmpfiles.d/ostree-rpm.conf
}

View File

@ -268,7 +268,7 @@ update_spl()
return return
fi fi
dd if=$1 of=/dev/$PLATFORM_MAIN_STORAGE bs=512 seek=256 &> /dev/null dd if=$1 of=$PLATFORM_MAIN_STORAGE bs=512 seek=256 &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
log ERROR "Failed to write spl to $PLATFORM_MAIN_STORAGE" log ERROR "Failed to write spl to $PLATFORM_MAIN_STORAGE"
return return

View File

@ -8,13 +8,13 @@ RDEPENDS_${PN} += "hydra"
PR = "r0" PR = "r0"
SRC_URI = "git://git.netmodule.intranet/nmrouter/hydra.git;protocol=ssh;user=gitea;branch=sumo" SRC_URI = "git://git.netmodule.intranet/nmrouter/hydra.git;protocol=ssh;user=gitea;branch=master"
SRCREV = "cdebefc3475b2411085081a0e6b717ef9f612701" SRCREV = "c4b7fd3726d5e42852290871e4f457d8188a60f3"
S = "${WORKDIR}/git/tools_src" S = "${WORKDIR}/git/tools_src"
FILES_${PN} += " hydra-util" FILES_${PN} += " hydra-util "
FILES_${PN}-dev += "libhydra.a libhydra.h"
EXTRA_OEMAKE += "-e" EXTRA_OEMAKE += "-e"
do_compile() { do_compile() {
@ -23,7 +23,11 @@ do_compile() {
do_install() { do_install() {
install -d ${D}${bindir}/ install -d ${D}${bindir}/
install -m 0775 ${S}/hydra-util ${D}${bindir}/ install -m 0755 ${S}/hydra-util ${D}${bindir}/
install -d ${D}${libdir}/
install -m 0644 ${S}/libhydra.a ${D}${libdir}
install -d ${D}${includedir}
install -m 0644 ${S}/libhydra.h ${D}${includedir}
} }

View File

@ -0,0 +1,19 @@
#!/bin/sh
if [ -z $USER_MODULE_ipv4_addr ]; then
echo Start script by systemd service or set variables
else
if [ -x "$(command -v socat)" ]; then
echo "start listening socket-uart services with server IP $USER_MODULE_ipv4_addr on port $USER_MODULE_kline_port"
cmd='socat -s pty,link=/dev/ttyUM1,raw,echo=0,b19200 tcp:$USER_MODULE_ipv4_addr:$USER_MODULE_kline_port'
if [[ -n $SOCAT_SOCKET_KLINE_MSS ]]; then
eval $cmd,mss=$SOCAT_SOCKET_KLINE_MSS
else
eval $cmd
fi
else
echo "socat command not available on your target or environment"
fi
fi
exit 1

View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ -z $USER_MODULE_ipv4_addr ]; then
echo Start script by systemd service or set variables
else
if [ -x "$(command -v socat)" ]; then
echo "start listening socket-uart services with server IP $USER_MODULE_ipv4_addr on port $USER_MODULE_lin_port"
cmd='socat -s pty,link=/dev/ttyUM2,raw,echo=0 tcp:$USER_MODULE_ipv4_addr:$USER_MODULE_lin_port'
if [[ -n $SOCAT_SOCKET_LIN_MSS ]]; then
eval $cmd,mss=$SOCAT_SOCKET_LIN_MSS
else
eval $cmd
fi
else
echo "socat command not available on your target or environment"
fi
fi
exit 1

View File

@ -0,0 +1,19 @@
#!/bin/sh
if [ -z $USER_MODULE_ipv4_addr ]; then
echo Start script by systemd service or set variables
else
if [ -x "$(command -v socat)" ]; then
echo "start listening socket-uart services with server IP $USER_MODULE_ipv4_addr on port $USER_MODULE_uart_port"
cmd='socat -s pty,link=/dev/ttyUM0,raw,echo=0,b115200 tcp:$USER_MODULE_ipv4_addr:$USER_MODULE_uart_port'
if [[ -n $SOCAT_SOCKET_UART_MSS ]]; then
eval $cmd,mss=$SOCAT_SOCKET_UART_MSS
else
eval $cmd
fi
else
echo "socat command not available on your target or environment"
fi
fi
exit 1

View File

@ -0,0 +1,20 @@
[Unit]
Description=Bind kline socket with pseudo tty based on socat
Requires=um-service-config.service user-module.target
After=um-service-config.service user-module.target
[Service]
Type=simple
ExecStart=/usr/bin/socat-socket-kline
PIDFile=/var/run/socket-kline.pid
EnvironmentFile=/etc/user-module/network.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
[Install]
WantedBy=user-module.target

View File

@ -0,0 +1,19 @@
[Unit]
Description=Bind lin socket with pseudo tty based on socat
Requires=um-service-config.service user-module.target
After=um-service-config.service user-module.target
[Service]
Type=simple
ExecStart=/usr/bin/socat-socket-lin
PIDFile=/var/run/socket-lin.pid
EnvironmentFile=/etc/user-module/network.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
[Install]
WantedBy=user-module.target

View File

@ -0,0 +1,20 @@
[Unit]
Description=Bind uart socket with pseudo tty based on socat
Requires=um-service-config.service user-module.target
After=um-service-config.service user-module.target
[Service]
Type=simple
ExecStart=/usr/bin/socat-socket-uart
PIDFile=/var/run/socket-uart.pid
EnvironmentFile=/etc/user-module/network.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
[Install]
WantedBy=user-module.target

View File

@ -0,0 +1,40 @@
inherit systemd
SUMMARY = "Bind socket-uart with speudo tty based on socat"
DESCRIPTION = "Bind to origin uart which is provided as socket-uart as pseudo tty based on socat"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
"
SRC_URI = " \
file://socket-uart.service \
file://socat-socket-uart \
file://socket-kline.service \
file://socat-socket-kline \
file://socket-lin.service \
file://socat-socket-lin \
"
S = "${WORKDIR}"
RDEPENDS_${PN} = "socat um-service-cfg"
SYSTEMD_SERVICE_${PN} = " \
socket-uart.service \
socket-kline.service \
socket-lin.service \
"
FILES_${PN} = "${systemd_unitdir}/system ${bindir} "
do_install() {
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/socket-uart.service ${D}${systemd_unitdir}/system/
install -m 644 ${WORKDIR}/socket-kline.service ${D}${systemd_unitdir}/system/
install -m 644 ${WORKDIR}/socket-lin.service ${D}${systemd_unitdir}/system/
install -d ${D}${bindir}
install -m 744 ${WORKDIR}/socat-socket-uart ${D}${bindir}
install -m 744 ${WORKDIR}/socat-socket-kline ${D}${bindir}
install -m 744 ${WORKDIR}/socat-socket-lin ${D}${bindir}
}

View File

@ -0,0 +1,26 @@
SUMMARY = "Instant terminal sharing"
HOMEPAGE = "https://tmate.io/"
SECTION = "console/utils"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://tmux.c;beginline=3;endline=17;md5=f256b76d52e7b4d02bf19144bdaca107"
DEPENDS = "ncurses libevent msgpack-c libssh"
SRC_URI = "https://github.com/tmate-io/tmate/archive/2.2.1.tar.gz"
SRC_URI[md5sum] = "b4d87221d76f7d12e6771897b5940902"
SRC_URI[sha256sum] = "d9c2ac59f42e65aac5f500f0548ea8056fd79c9c5285e5af324d833e2a84c305"
inherit autotools pkgconfig
S = "${WORKDIR}/tmate-2.2.1"
PACKAGECONFIG ??= ""
PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
do_configure_prepend() {
# The 'compat' directory is needed for output during the build but it's
# not automatically created when building outside the source directory.
mkdir ${B}/compat
}

View File

@ -0,0 +1,13 @@
[Unit]
Description=Check whether user module is present and configure user space services
Requires=um-service-config.service user-module.target
After=um-service-config.service user-module.target
[Service]
Type=oneshot
ExecStart=/usr/bin/um-rgpio-config
EnvironmentFile=/etc/user-module/network.conf
[Install]
WantedBy=user-module.target

View File

@ -0,0 +1,15 @@
#!/bin/sh
UM_SYSFS_REMOTE_GPIO="/sys/class/remote-gpio/remote-gpio/config"
if [ -z $USER_MODULE_ipv4_addr ]; then
echo Start script by systemd service or set variables
else
if [ -d $UM_SYSFS_REMOTE_GPIO ]; then
if [[ `cat $UM_SYSFS_REMOTE_GPIO/ip` != $USER_MODULE_ipv4_addr || `cat $UM_SYSFS_REMOTE_GPIO/port` != $USER_MODULE_ipv4_port ]]; then
echo $USER_MODULE_ipv4_addr > $UM_SYSFS_REMOTE_GPIO/ip
echo $USER_MODULE_remote_gpio_port > $UM_SYSFS_REMOTE_GPIO/port
fi
exit 0
fi
fi
exit 1

View File

@ -0,0 +1,10 @@
[Unit]
Description=Check whether user module is present and configure user space services
After=user-module.target
[Service]
Type=oneshot
ExecStart=/usr/bin/um-service-config
[Install]
WantedBy=user-module.target

View File

@ -0,0 +1,33 @@
#!/bin/sh
UM_CONFIG_PATH=/etc/user-module
UM_CONFIG_FILE=network.conf
UM_CONFIG=$UM_CONFIG_PATH/$UM_CONFIG_FILE
UM_PORTS=$UM_CONFIG_PATH/ports
UM_DTS_NODE=/proc/device-tree/user_module
DEBUG_NOTE_ORIGIN=$0
if [ -f $UM_CONFIG ]; then
rm $UM_CONFIG
else
mkdir -p $UM_CONFIG_PATH
fi
# fetch user module status and network informations
for f in $UM_DTS_NODE/*; do
echo "USER_MODULE_${f##*/}=\"`cat $f | tr -d '\0' `\"" | sed -E "s/,|-/_/g" >> $UM_CONFIG
done
cat $UM_PORTS >> $UM_CONFIG
# source all fetched informations
source $UM_CONFIG
if [[ $USER_MODULE_status = "disabled" ]]; then
exit 1
elif [[ $USER_MODULE_status = "okay" ]]; then
exit 0
fi

View File

@ -0,0 +1,4 @@
[Unit]
Description=Just fetch user module informations from proc filesystem
After=network-online.target
Wants=network-online.target

View File

@ -0,0 +1,58 @@
# Copyright (C) 2019 Ramon Moesching <ramon.moesching@netmodule.com>
# Released under the MIT license (see COPYING.MIT for the terms)
inherit systemd
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
FILESEXTRAPATHS_prepend := "${THISDIR}/config:"
SRC_URI = " \
file://um-service-config.service \
file://um-service-config.sh \
file://user-module.target \
file://um-rgpio-config.sh \
file://um-rgpio-config.service \
file://ports \
"
FILES_${PN} = "${systemd_unitdir}/system ${bindir} /etc/user-module"
SYSTEMD_SERVICE_${PN} =" \
um-service-config.service \
um-rgpio-config.service \
user-module.target \
"
do_install_append() {
# port config
echo "USER_MODULE_kline_port=\"2202\"" >> ${WORKDIR}/ports
echo "USER_MODULE_lin_port=\"2200\"" >> ${WORKDIR}/ports
echo "USER_MODULE_uart_port=\"2204\"" >> ${WORKDIR}/ports
echo "USER_MODULE_cannellonie_port_remote=\"20000\"" >> ${WORKDIR}/ports
echo "USER_MODULE_cannellonie_port_local=\"20000\"" >> ${WORKDIR}/ports
echo "USER_MODULE_remote_gpio_port=\"6666\"" >> ${WORKDIR}/ports
install -d ${D}/etc/user-module
install -m 644 ${WORKDIR}/ports ${D}/etc/user-module/ports
}
do_install() {
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/um-service-config.service ${D}${systemd_unitdir}/system/
install -d ${D}${systemd_system_unitdir}/
install -m 0644 ${WORKDIR}/user-module.target ${D}${systemd_system_unitdir}/
install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
ln -sf ${systemd_system_unitdir}/user-module.target ${D}${systemd_system_unitdir}/multi-user.target.wants/user-module.target
install -d ${D}${bindir}
install -m 744 ${WORKDIR}/um-service-config.sh ${D}${bindir}/um-service-config
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/um-rgpio-config.service ${D}${systemd_unitdir}/system/
install -d ${D}${bindir}
install -m 744 ${WORKDIR}/um-rgpio-config.sh ${D}${bindir}/um-rgpio-config
}

View File

@ -1,12 +0,0 @@
diff --git a/src/boot/ostree-finalize-staged.service b/src/boot/ostree-finalize-staged.service
index 570138c..37b5679 100644
--- a/src/boot/ostree-finalize-staged.service
+++ b/src/boot/ostree-finalize-staged.service
@@ -31,6 +31,7 @@ Conflicts=final.target
Type=oneshot
RemainAfterExit=yes
ExecStop=/usr/bin/ostree admin finalize-staged
+TimeoutStopSec=infinity
[Install]
WantedBy=multi-user.target

View File

@ -1,3 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://ostree-finalize-staged-set-default-timeout-to-infinity.patch"

View File

@ -1 +1,8 @@
PACKAGECONFIG_append = " dbus" PACKAGECONFIG_append = " dbus"
SYSTEMD_AUTO_ENABLE = "disable"
do_install_append () {
install -d ${D}${localstatedir}/lib/misc/
}