systemd/watchdog: Use systemd as watchdogd daemon when available
Provide custom systemd config files to enable the watchdog handling. For systemd we depend on the image containing and using systemd as init script. In case we build images without systemd we will need to install the old watchdog. Maybe it is time to create a MACHINE_FEATURE for watchdog.
This commit is contained in:
parent
78f6e55ed9
commit
921d2e8ec0
|
@ -19,7 +19,7 @@ MACHINE_FEATURES = "kernel26 serial"
|
|||
|
||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\
|
||||
busybox-ifplugd \
|
||||
watchdog \
|
||||
${@['watchdog', ''][d.getVar('DISTRO_FEATURES_INITMAN', True) == 'systemd']} \
|
||||
kernel \
|
||||
kernel-module-davinci-wdt \
|
||||
kernel-module-dspdl \
|
||||
|
@ -34,7 +34,11 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\
|
|||
|
||||
IMAGE_FSTYPES ?= "tar.bz2 cpio.gz ubifs ubi jffs2"
|
||||
|
||||
MACHINE_EXTRA_RDEPENDS = "task-sysmocom-bts sysmobts-firmware watchdog"
|
||||
MACHINE_EXTRA_RDEPENDS = "\
|
||||
task-sysmocom-bts \
|
||||
sysmobts-firmware \
|
||||
${@['watchdog', ''][d.getVar('DISTRO_FEATURES_INITMAN', True) == 'systemd']} \
|
||||
"
|
||||
#MACHINE_EXTRA_RRECOMMENDS = "dsplink-module"
|
||||
|
||||
require conf/machine/include/tune-arm926ejs.inc
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# See systemd.conf(5) for details
|
||||
|
||||
[Manager]
|
||||
#LogLevel=info
|
||||
#LogTarget=journal-or-kmsg
|
||||
#LogColor=yes
|
||||
#LogLocation=no
|
||||
#DumpCore=yes
|
||||
#CrashShell=no
|
||||
#ShowStatus=yes
|
||||
#CrashChVT=1
|
||||
#CPUAffinity=1 2
|
||||
#DefaultControllers=cpu
|
||||
#DefaultStandardOutput=journal
|
||||
#DefaultStandardError=inherit
|
||||
#JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio
|
||||
RuntimeWatchdogSec=45
|
||||
#ShutdownWatchdogSec=10min
|
||||
#CapabilityBoundingSet=
|
||||
#TimerSlackNSec=
|
||||
#DefaultLimitCPU=
|
||||
#DefaultLimitFSIZE=
|
||||
#DefaultLimitDATA=
|
||||
#DefaultLimitSTACK=
|
||||
#DefaultLimitCORE=
|
||||
#DefaultLimitRSS=
|
||||
#DefaultLimitNOFILE=
|
||||
#DefaultLimitAS=
|
||||
#DefaultLimitNPROC=
|
||||
#DefaultLimitMEMLOCK=
|
||||
#DefaultLimitLOCKS=
|
||||
#DefaultLimitSIGPENDING=
|
||||
#DefaultLimitMSGQUEUE=
|
||||
#DefaultLimitNICE=
|
||||
#DefaultLimitRTPRIO=
|
||||
#DefaultLimitRTTIME=
|
|
@ -0,0 +1,43 @@
|
|||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# See systemd.conf(5) for details
|
||||
|
||||
[Manager]
|
||||
#LogLevel=info
|
||||
#LogTarget=journal-or-kmsg
|
||||
#LogColor=yes
|
||||
#LogLocation=no
|
||||
#DumpCore=yes
|
||||
#CrashShell=no
|
||||
#ShowStatus=yes
|
||||
#CrashChVT=1
|
||||
#CPUAffinity=1 2
|
||||
#DefaultControllers=cpu
|
||||
#DefaultStandardOutput=journal
|
||||
#DefaultStandardError=inherit
|
||||
#JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio
|
||||
RuntimeWatchdogSec=45
|
||||
#ShutdownWatchdogSec=10min
|
||||
#CapabilityBoundingSet=
|
||||
#TimerSlackNSec=
|
||||
#DefaultLimitCPU=
|
||||
#DefaultLimitFSIZE=
|
||||
#DefaultLimitDATA=
|
||||
#DefaultLimitSTACK=
|
||||
#DefaultLimitCORE=
|
||||
#DefaultLimitRSS=
|
||||
#DefaultLimitNOFILE=
|
||||
#DefaultLimitAS=
|
||||
#DefaultLimitNPROC=
|
||||
#DefaultLimitMEMLOCK=
|
||||
#DefaultLimitLOCKS=
|
||||
#DefaultLimitSIGPENDING=
|
||||
#DefaultLimitMSGQUEUE=
|
||||
#DefaultLimitNICE=
|
||||
#DefaultLimitRTPRIO=
|
||||
#DefaultLimitRTTIME=
|
|
@ -1,10 +1,13 @@
|
|||
S_THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
||||
FILESPATH =. "${@base_set_filespath(["${S_THISDIR}/${PN}"], d)}:"
|
||||
|
||||
PRINC="13"
|
||||
PRINC="16"
|
||||
|
||||
SRC_URI += "file://journald.conf"
|
||||
|
||||
SRC_URI_append_sysmobts-v1 = " file://system.conf"
|
||||
SRC_URI_append_sysmobts-v2 = " file://system.conf"
|
||||
|
||||
# Disable depedency on dbus
|
||||
RDEPENDS_${PN} = ""
|
||||
|
||||
|
@ -34,4 +37,8 @@ pkg_postinst_${PN}_append () {
|
|||
|
||||
do_install_append() {
|
||||
install -m 0644 ${WORKDIR}/journald.conf ${D}${sysconfdir}/systemd/
|
||||
|
||||
if [ -e ${WORKDIR}/system.conf ]; then
|
||||
install -m 0644 ${WORKDIR}/system.conf ${D}${sysconfdir}/systemd/
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue