Compare commits
26 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ba7c13cbc8 | |
|
|
5b1d348ce8 | |
|
|
fa7e258511 | |
|
|
30d78a2958 | |
|
|
285d8e97dc | |
|
|
2966a58bea | |
|
|
3f9a68e40f | |
|
|
b485212300 | |
|
|
5b505a5ad3 | |
|
|
1c0dfb864a | |
|
|
004fa88b74 | |
|
|
de7a92cdca | |
|
|
6668e24305 | |
|
|
82bbc341d7 | |
|
|
f46f7a1dca | |
|
|
e13bb7edfe | |
|
|
e596289652 | |
|
|
6a94f1fbfa | |
|
|
3c9a5b02d3 | |
|
|
f4d745f2f2 | |
|
|
dcd8b9cfb9 | |
|
|
e38843c6ff | |
|
|
a5b6175c50 | |
|
|
f54623c871 | |
|
|
8b67634527 | |
|
|
477ae213e0 |
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -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 -
|
||||||
|
}
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,9 +96,13 @@ 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 = " \
|
||||||
nm-scripts-fpga \
|
nm-scripts-fpga \
|
||||||
|
|
@ -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
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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}
|
||||||
|
}
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Just fetch user module informations from proc filesystem
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
|
||||||
|
|
||||||
SRC_URI += "file://ostree-finalize-staged-set-default-timeout-to-infinity.patch"
|
|
||||||
|
|
@ -1 +1,8 @@
|
||||||
PACKAGECONFIG_append = " dbus"
|
PACKAGECONFIG_append = " dbus"
|
||||||
|
|
||||||
|
|
||||||
|
SYSTEMD_AUTO_ENABLE = "disable"
|
||||||
|
|
||||||
|
do_install_append () {
|
||||||
|
install -d ${D}${localstatedir}/lib/misc/
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue