Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,49 @@
pkg_postinst:${PN}:append() {
mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.wants
mkdir -p $D$systemd_system_unitdir/obmc-host-timeout@0.target.wants
# The obmc-host-crash target is repurposed for the memory preserving reboot
# feature when it is enabled. If not enabled, then install the standard
# debug collector checkstop service for basic error reporting
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then
LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service"
TARGET="../openpower-debug-collector-checkstop@.service"
ln -s $TARGET $LINK
fi
LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service"
TARGET="../openpower-debug-collector-watchdog@.service"
ln -s $TARGET $LINK
if [ "${@bb.utils.filter('MACHINE_FEATURES', 'phal', d)}" != 'phal' ]; then
LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog-timeout@0.service"
TARGET="../openpower-debug-collector-watchdog-timeout@.service"
ln -s $TARGET $LINK
fi
}
pkg_postinst:${PN}:append:p10bmc() {
mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/clear_hostdumps_poweroff.service"
TARGET="../clear_hostdumps_poweroff.service"
ln -s $TARGET $LINK
}
pkg_prerm:${PN}:append() {
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then
LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service"
rm $LINK
fi
LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service"
rm $LINK
if [ "${@bb.utils.filter('MACHINE_FEATURES', 'phal', d)}" != 'phal' ]; then
LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog-timeout@0.service"
rm $LINK
fi
}
pkg_prerm:${PN}:append:p10bmc() {
LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/clear_hostdumps_poweroff.service"
rm $LINK
}
@@ -0,0 +1,10 @@
SUMMARY = "openpower-debug-collector: install phosphor-logging yaml"
PR = "r1"
PV = "1.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit phosphor-logging-yaml-provider
require openpower-debug-collector.inc
S = "${WORKDIR}/git"
@@ -0,0 +1,5 @@
HOMEPAGE = "https://github.com/openbmc/openpower-debug-collector"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI += "git://github.com/openbmc/openpower-debug-collector;branch=master;protocol=https"
SRCREV = "40fccd52408dce41aed05d1a65e867d09e2fcca7"
@@ -0,0 +1,12 @@
[Unit]
Description=OpenPOWER debug data collector for host checkstop
Before=obmc-host-quiesce@%i.target
[Service]
# Adding 10 seconds to allow OCC to collect debug data
# before processing checkstop. OCC has to wait 5 seconds
# for our driver to stop using the SBEFIFO.
ExecStart={base_bindir}/sleep 10
ExecStart=/usr/bin/checkstop_app
Type=oneshot
Restart=no
@@ -0,0 +1,8 @@
[Unit]
Description=OpenPOWER debug data collector for host %I watchdog timeout
Before=obmc-host-quiesce@%i.target
[Service]
ExecStart=/usr/bin/openpower-proc-control collectSBEHBData
Type=oneshot
Restart=no
@@ -0,0 +1,9 @@
[Unit]
Description=OpenPOWER debug data collector for host watchdog timeout
Before=obmc-host-quiesce@%i.target
After=op-stop-instructions@%i.service
[Service]
ExecStart=/usr/bin/watchdog_timeout
Type=oneshot
Restart=no
@@ -0,0 +1,38 @@
SUMMARY = "OpenPOWER Debug Collector"
DESCRIPTION = "Application to log error during host checkstop and watchdog timeout"
PR = "r1"
PV = "1.0+git${SRCPV}"
inherit pkgconfig meson \
obmc-phosphor-systemd \
python3native \
phosphor-dbus-yaml
require ${BPN}.inc
require ${BPN}-systemd-links.inc
DEPENDS += " \
phosphor-logging \
${PYTHON_PN}-sdbus++-native \
cli11 \
ipl \
"
S = "${WORKDIR}/git"
# This provides below applications that are called into in case
# of host checkstop, host watchdog and host watchdog-timeout respectively.
APPS = " \
checkstop \
watchdog \
${@bb.utils.contains('MACHINE_FEATURES', 'phal', '', 'watchdog-timeout', d)} \
"
DEBUG_TMPL = "openpower-debug-collector-{0}@.service"
SYSTEMD_SERVICE:${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}"
# Do not depend on phosphor-logging for native build
DEPENDS:remove:class-native = "phosphor-logging"
# Do not depend on phosphor-logging for native SDK build
DEPENDS:remove:class-nativesdk = "phosphor-logging ipl"