Initial commit
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
SUMMARY = "Disable the watchdog used to monitor BMC ready"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit allarch
|
||||
inherit obmc-phosphor-systemd
|
||||
|
||||
RDEPENDS:${PN} += "bash"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
SRC_URI += "file://disable-wdt"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${S}/disable-wdt ${D}${bindir}/disable-wdt
|
||||
}
|
||||
|
||||
SYSTEMD_SERVICE:${PN} += "disable-wdt.service"
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ACCESS_PRIMARY="/sys/devices/platform/ahb/1e620000.spi/access_primary"
|
||||
ACCESS_BACKUP="/sys/devices/platform/ahb/1e620000.spi/access_backup"
|
||||
|
||||
if [ -f "${ACCESS_PRIMARY}" ]; then
|
||||
echo 0 > ${ACCESS_PRIMARY}
|
||||
echo "Disable watchdog by access_primary."
|
||||
elif [ -f "${ACCESS_BACKUP}" ]; then
|
||||
echo 0 > ${ACCESS_BACKUP}
|
||||
echo "Disable watchdog by access_backup."
|
||||
fi
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Disable the watchdog
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/disable-wdt
|
||||
ExecStart=bash -c "echo -1 > /proc/sys/kernel/panic"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,12 @@
|
||||
SUMMARY = "System watchdog"
|
||||
DESCRIPTION = "BMC hardware watchdog service that is used to reset BMC \
|
||||
when unrecoverable events occurs"
|
||||
|
||||
inherit allarch
|
||||
inherit obmc-phosphor-systemd
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} += "system-watchdog.service"
|
||||
SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/system-watchdog/system-watchdog.conf"
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
TIMEOUT=180
|
||||
INTERVAL=10
|
||||
DEVICE=/dev/watchdog1
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=BMC Hardware Watchdog Daemon
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/obmc/system-watchdog/system-watchdog.conf
|
||||
ExecStart=/sbin/watchdog -T ${{TIMEOUT}} -t ${{INTERVAL}} -F ${{DEVICE}}
|
||||
KillSignal=SIGABRT
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
|
||||
Reference in New Issue
Block a user