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,42 @@
SUMMARY = "Phosphor post code manager"
DESCRIPTION = "Phosphor post Code Manager monitors post code posted on dbus \
interface /xyz/openbmc_project/state/boot/raw by snoopd daemon and save them \
in a file under /var/lib for history."
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRCREV = "5c75dd56c86b46fce6763bed11e16cadd4c461b0"
PV = "1.0+git${SRCPV}"
SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
inherit meson pkgconfig systemd
DEPENDS += " \
sdbusplus \
phosphor-dbus-interfaces \
phosphor-logging \
libcereal \
"
FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode@.service"
FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode.service"
pkg_postinst:${PN}:append() {
mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
for i in ${OBMC_HOST_INSTANCES};
do
LINK="$D$systemd_system_unitdir/multi-user.target.wants/xyz.openbmc_project.State.Boot.PostCode@${i}.service"
TARGET="..//xyz.openbmc_project.State.Boot.PostCode@.service"
ln -s $TARGET $LINK
done
}
pkg_prerm:${PN}:append() {
for i in ${OBMC_HOST_INSTANCES};
do
LINK="$D$systemd_system_unitdir/multi-user.target.wants/xyz.openbmc_project.State.Boot.PostCode@${i}.service"
rm $LINK
done
}
@@ -0,0 +1,173 @@
HOST_DEFAULT_TARGETS = " \
multi-user.target.requires/obmc-host-reset@{}.target \
multi-user.target.wants/phosphor-discover-system-state@{}.service \
obmc-host-start@{}.target.requires/obmc-host-startmin@{}.target \
obmc-host-start@{}.target.requires/phosphor-reset-host-reboot-attempts@{}.service \
obmc-host-startmin@{}.target.wants/phosphor-set-host-transition-to-running@{}.service \
obmc-host-stop@{}.target.wants/phosphor-set-host-transition-to-off@{}.service \
obmc-host-reset@{}.target.requires/phosphor-reset-host-running@{}.service \
obmc-host-stop@{}.target.wants/phosphor-reset-sensor-states@{}.service \
obmc-host-graceful-quiesce@{}.target.wants/obmc-host-quiesce@{}.target \
obmc-host-graceful-quiesce@{}.target.wants/pldmSoftPowerOff.service \
obmc-host-quiesce@{}.target.wants/phosphor-reset-sensor-states@{}.service \
obmc-host-reboot@{}.target.requires/obmc-host-shutdown@{}.target \
obmc-host-reboot@{}.target.requires/phosphor-reboot-host@{}.service \
obmc-host-warm-reboot@{}.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
obmc-host-force-warm-reboot@{}.target.requires/obmc-host-stop@{}.target \
obmc-host-force-warm-reboot@{}.target.requires/phosphor-reboot-host@{}.service \
obmc-host-warm-reboot@{}.target.requires/obmc-host-force-warm-reboot@{}.target \
"
CHASSIS_DEFAULT_TARGETS = " \
obmc-chassis-poweron@{}.target.wants/phosphor-reset-host-recovery@{}.service \
obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \
obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \
obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \
obmc-chassis-poweroff@{}.target.requires/obmc-powered-off@{}.service \
obmc-chassis-poweroff@{}.target.wants/phosphor-clear-one-time@{}.service \
obmc-chassis-blackout@{}.target.wants/phosphor-reset-sensor-states@{}.service \
obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-on@{}.service \
obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-running@{}.service \
"
# TODO: There are some targets that are chassis oriented, but there is no
# obvious way to map HOST<->CHASSIS relationships. Making an assumption
# currently that there is a 1-to-1 relationship between the two.
pkg_postinst:${PN}-obmc-targets:append() {
for i in ${OBMC_HOST_INSTANCES};
do
for j in ${HOST_DEFAULT_TARGETS};
do
LINK="$D$systemd_system_unitdir/${j}"
LINK="$(echo ${LINK} | sed s/{}/${i}/g )"
TARGET="../$(basename ${j} | sed s/{}//g )"
mkdir -p "$(dirname ${LINK})"
ln -s "${TARGET}" "${LINK}"
done
done
for i in ${OBMC_CHASSIS_INSTANCES};
do
for j in ${CHASSIS_DEFAULT_TARGETS};
do
LINK="$D$systemd_system_unitdir/${j}"
LINK="$(echo ${LINK} | sed s/{}/${i}/g )"
TARGET="../$(basename ${j} | sed s/{}//g )"
mkdir -p "$(dirname ${LINK})"
ln -s "${TARGET}" "${LINK}"
done
done
}
pkg_prerm:${PN}-obmc-targets:append() {
for i in ${OBMC_HOST_INSTANCES};
do
for j in ${HOST_DEFAULT_TARGETS};
do
LINK="$D$systemd_system_unitdir/${j}"
LINK="$(echo ${LINK} | sed s/{}/${i}/g )"
rm "${LINK}"
done
done
for i in ${OBMC_CHASSIS_INSTANCES};
do
for j in ${CHASSIS_DEFAULT_TARGETS};
do
LINK="$D$systemd_system_unitdir/${j}"
LINK="$(echo ${LINK} | sed s/{}/${i}/g )"
rm "${LINK}"
done
done
}
pkg_postinst:${PN}-chassis:append() {
for i in ${OBMC_CHASSIS_INSTANCES};
do
mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service"
TARGET="../xyz.openbmc_project.State.Chassis@.service"
ln -s $TARGET $LINK
done
}
pkg_prerm:${PN}-chassis:append() {
for i in ${OBMC_CHASSIS_INSTANCES};
do
LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service"
rm $LINK
done
}
pkg_postinst:${PN}-chassis-check-power-status:append() {
for i in ${OBMC_CHASSIS_INSTANCES};
do
mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires/phosphor-chassis-check-power-status@${i}.service"
TARGET="../phosphor-chassis-check-power-status@.service"
ln -s $TARGET $LINK
done
}
pkg_prerm:${PN}-chassis-check-power-status:append() {
for i in ${OBMC_CHASSIS_INSTANCES};
do
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires/phosphor-chassis-check-power-status@${i}.service"
rm $LINK
done
}
pkg_postinst:${PN}-chassis-poweron-log:append() {
for i in ${OBMC_CHASSIS_INSTANCES};
do
mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.wants
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.wants/phosphor-create-chassis-poweron-log@${i}.service"
TARGET="../phosphor-create-chassis-poweron-log@.service"
ln -s $TARGET $LINK
done
}
pkg_prerm:${PN}-chassis-poweron-log:append() {
for i in ${OBMC_CHASSIS_INSTANCES};
do
LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.wants/phosphor-create-chassis-poweron-log@${i}.service"
rm $LINK
done
}
pkg_postinst:${PN}-host:append() {
for i in ${OBMC_HOST_INSTANCES};
do
mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
TARGET="../xyz.openbmc_project.State.Host@.service"
ln -s $TARGET $LINK
done
}
pkg_prerm:${PN}-host:append() {
for i in ${OBMC_HOST_INSTANCES};
do
LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
rm $LINK
done
}
pkg_postinst:${PN}-scheduled-host-transition:append() {
for i in ${OBMC_HOST_INSTANCES};
do
mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
LINK="$D$systemd_system_unitdir/multi-user.target.wants/xyz.openbmc_project.State.ScheduledHostTransition@${i}.service"
TARGET="../xyz.openbmc_project.State.ScheduledHostTransition@.service"
ln -s $TARGET $LINK
done
}
pkg_prerm:${PN}-scheduled-host-transition:append() {
for i in ${OBMC_HOST_INSTANCES};
do
LINK="$D$systemd_system_unitdir/multi-user.target.wants/xyz.openbmc_project.State.ScheduledHostTransition@${i}.service"
rm $LINK
done
}
@@ -0,0 +1,261 @@
SUMMARY = "Phosphor State Management"
DESCRIPTION = "Phosphor State Manager provides a set of system state \
management daemons. It is suitable for use on a wide variety of OpenBMC \
platforms."
HOMEPAGE = "https://github.com/openbmc/phosphor-state-manager"
PR = "r1"
PV = "1.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
include phosphor-state-manager-systemd-links.inc
STATE_MGR_PACKAGES = " \
${PN}-host \
${PN}-chassis \
${PN}-bmc \
${PN}-hypervisor \
${PN}-discover \
${PN}-host-check \
${PN}-reset-sensor-states \
${PN}-systemd-target-monitor \
${PN}-obmc-targets \
${PN}-scheduled-host-transition \
${PN}-chassis-check-power-status \
${PN}-secure-check \
${PN}-chassis-poweron-log \
"
PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}"
ALLOW_EMPTY:${PN} = "1"
DBUS_PACKAGES = "${STATE_MGR_PACKAGES}"
SYSTEMD_PACKAGES = "${PN}-discover \
${PN}-reset-sensor-states \
${PN}-systemd-target-monitor \
"
PACKAGECONFIG ??= "no-warm-reboot \
only-run-apr-on-power-loss \
only-allow-boot-when-bmc-ready"
# Disable warm reboots of host
PACKAGECONFIG[no-warm-reboot] = "-Dwarm-reboot=disabled,-Dwarm-reboot=enabled"
# Only run auto power restore logic if system had ac loss
PACKAGECONFIG[only-run-apr-on-power-loss] = "-Donly-run-apr-on-power-loss=true,-Donly-run-apr-on-power-loss=false"
# Only allow boot operations when BMC is in Ready state
PACKAGECONFIG[only-allow-boot-when-bmc-ready] = "-Donly-allow-boot-when-bmc-ready=true,-Donly-allow-boot-when-bmc-ready=false"
# The host-check function will check if the host is running
# after a BMC reset.
# The reset-sensor-states function will reset the host
# sensors on a BMC reset or system power loss.
# Neither is required for host state function but are
# recommended to deal properly with these reset scenarios.
RRECOMMENDS:${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states"
# The obmc-targets are the base targets required to boot a computer system
RRECOMMENDS:${PN}-host += "${PN}-obmc-targets"
# Make it the default to create an info log when the chassis transitions
# from off to on
RRECOMMENDS:${PN}-chassis:append = " ${PN}-chassis-poweron-log"
inherit meson pkgconfig
inherit obmc-phosphor-dbus-service
inherit obmc-phosphor-systemd
DEPENDS += "sdbusplus"
DEPENDS += "sdeventplus"
DEPENDS += "phosphor-logging"
DEPENDS += "phosphor-dbus-interfaces"
DEPENDS += "libcereal"
DEPENDS += "nlohmann-json"
DEPENDS += "cli11"
DEPENDS += "libgpiod"
RDEPENDS:${PN}-chassis += "bash"
RDEPENDS:${PN}-host += "bash"
EXTRA_OEMESON:append = " -Dtests=disabled"
FILES:${PN}-host = "${bindir}/phosphor-host-state-manager"
FILES:${PN}-host += "${libexecdir}/host-reboot"
DBUS_SERVICE:${PN}-host += "xyz.openbmc_project.State.Host@.service"
DBUS_SERVICE:${PN}-host += "phosphor-reboot-host@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-clear-one-time@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-set-host-transition-to-running@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-set-host-transition-to-off@.service"
FILES:${PN}-chassis = "${bindir}/phosphor-chassis-state-manager"
DBUS_SERVICE:${PN}-chassis += "xyz.openbmc_project.State.Chassis@.service"
SYSTEMD_SERVICE:${PN}-chassis += "obmc-power-start@.service"
SYSTEMD_SERVICE:${PN}-chassis += "obmc-power-stop@.service"
SYSTEMD_SERVICE:${PN}-chassis += "obmc-powered-off@.service"
SYSTEMD_SERVICE:${PN}-chassis += "phosphor-reset-chassis-on@.service"
SYSTEMD_SERVICE:${PN}-chassis += "phosphor-reset-chassis-running@.service"
SYSTEMD_SERVICE:${PN}-chassis-poweron-log += "phosphor-create-chassis-poweron-log@.service"
FILES:${PN}-chassis += "${bindir}/obmcutil"
FILES:${PN}-bmc = "${bindir}/phosphor-bmc-state-manager"
FILES:${PN}-bmc += "${sysconfdir}/phosphor-systemd-target-monitor/phosphor-service-monitor-default.json"
DBUS_SERVICE:${PN}-bmc += "xyz.openbmc_project.State.BMC.service"
DBUS_SERVICE:${PN}-bmc += "obmc-bmc-service-quiesce@.target"
FILES:${PN}-secure-check = "${bindir}/phosphor-secure-boot-check"
SYSTEMD_SERVICE:${PN}-secure-check += "phosphor-bmc-security-check.service"
FILES:${PN}-hypervisor = "${bindir}/phosphor-hypervisor-state-manager"
DBUS_SERVICE:${PN}-hypervisor += "xyz.openbmc_project.State.Hypervisor.service"
FILES:${PN}-discover = "${bindir}/phosphor-discover-system-state"
SYSTEMD_SERVICE:${PN}-discover += "phosphor-discover-system-state@.service"
FILES:${PN}-host-check = "${bindir}/phosphor-host-check"
SYSTEMD_SERVICE:${PN}-host-check += "phosphor-reset-host-running@.service"
FILES:${PN}-host-check = "${bindir}/phosphor-host-reset-recovery"
SYSTEMD_SERVICE:${PN}-host-check += "phosphor-reset-host-recovery@.service"
SYSTEMD_SERVICE:${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service"
FILES:${PN}-systemd-target-monitor = " \
${bindir}/phosphor-systemd-target-monitor \
${sysconfdir}/phosphor-systemd-target-monitor/phosphor-target-monitor-default.json \
"
SYSTEMD_SERVICE:${PN}-systemd-target-monitor += "phosphor-systemd-target-monitor.service"
FILES:${PN}-scheduled-host-transition = "${bindir}/phosphor-scheduled-host-transition"
DBUS_SERVICE:${PN}-scheduled-host-transition += "xyz.openbmc_project.State.ScheduledHostTransition@.service"
FILES:${PN}-chassis-check-power-status = "${bindir}/phosphor-chassis-check-power-status"
SYSTEMD_SERVICE:${PN}-chassis-check-power-status += "phosphor-chassis-check-power-status@.service"
# Chassis power synchronization targets
# - start-pre: Services to run before we start power on process
# - start: Services to run to do the chassis power on
# - on: Services to run once power is on
# - stop-pre,stop,off: Same as above but applied to powering off
# - reset-on: Services to check if chassis power is on after bmc reset
CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on"
# Chassis action power targets
# - on: Services to run to power on the chassis
# - off: Services to run to power off the chassis
# - cycle: Services to run to cycle power to the chassis
# - powered-off: Services to run once chassis power is off
# - reset: Services to check chassis power state and update chassis "on" target
# - hard-off: Services to force an immediate power off of the chassis
# - blackout: Target to enter when chassis experiences blackout
CHASSIS_ACTION_TARGETS = "poweron poweroff powercycle powered-off powerreset hard-poweroff blackout"
# Track all host synchronization point targets
# - start-pre: Services to run before we start host boot
# - starting: Services to run to do the host boot
# - started: Services to run once the host is booted
# - stop-pre,stopping,stopped: Same as above but applied to shutting down the host
# - reset-running: Services to check if host is running after bmc reset
HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running"
# Track all host action targets
# - start: Will run startmin target, this target used for any additional
# services that user needs for an initial power on of host.
# For example, resetting the host reboot count could be put in
# this target so on any fresh power on, this count is reset.
# - startmin: Minimum services required to start the host. This target will
# be called by reboot and start target.
# - stop: Services to run to shutdown the host
# - quiesce: Target to enter on host boot failure
# - graceful-quiesce: Target to enter on host boot failure (allow host graceful shutdown)
# - shutdown: Tell host to shutdown, then stop system
# - reset: Services to check if host is running and update host "start" target
# - crash: Target to run when host crashes. it is very much similar to
# quiesce target but the only delta is that this target contains
# multiple services and one of them is the quiesce target.
# - timeout: Target to run when host watchdog times out
# - reboot: Reboot the host with a chassis power cycle included
# - warm-reboot: Reboot the host without a chassis power cycle.
# - force-warm-reboot: Reboot the host without a chassis power cycle and without
# notifying the host.
# - diagnostic-mode: This will be entered when the host is collecting diagnostic
# data for itself.
HOST_ACTION_TARGETS = "start startmin stop quiesce graceful-quiesce reset shutdown crash timeout "
HOST_ACTION_TARGETS += "reboot warm-reboot force-warm-reboot diagnostic-mode"
CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target"
CHASSIS_ACTION_FMT = "obmc-chassis-{0}@.target"
HOST_SYNCH_FMT = "obmc-host-{0}@.target"
HOST_ACTION_FMT = "obmc-host-{0}@.target"
CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target"
CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-{0}@{1}.target"
HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target"
HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target"
FAN_LINK_FMT = "obmc-fan-control-ready@.target:obmc-fan-control-ready@{0}.target"
# Targets to be executed on checkstop and watchdog timeout
HOST_ERROR_TARGETS = "timeout"
QUIESCE_TMPL = "obmc-host-quiesce@.target"
CRASH_TIMEOUT_TGTFMT = "obmc-host-{0}@{1}.target"
QUIESCE_INSTFMT = "obmc-host-quiesce@{1}.target"
QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TIMEOUT_TGTFMT}.wants/${QUIESCE_INSTFMT}"
SYSTEMD_SERVICE:${PN}-obmc-targets += " \
obmc-fans-ready.target \
obmc-fan-control.target \
obmc-fan-control-ready@.target \
obmc-fan-watchdog-takeover.target \
"
SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}"
SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}"
SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}"
SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
# Create target relationships
# Starting the host requires chassis power on
START_TMPL_CTRL = "obmc-chassis-poweron@.target"
START_TGTFMT_CTRL = "obmc-host-startmin@{1}.target"
START_INSTFMT_CTRL = "obmc-chassis-poweron@{0}.target"
START_FMT_CTRL = "../${START_TMPL_CTRL}:${START_TGTFMT_CTRL}.requires/${START_INSTFMT_CTRL}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'START_FMT_CTRL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
# Chassis off requires host off
STOP_TMPL_CTRL = "obmc-host-stop@.target"
STOP_TGTFMT_CTRL = "obmc-chassis-poweroff@{0}.target"
STOP_INSTFMT_CTRL = "obmc-host-stop@{1}.target"
STOP_FMT_CTRL = "../${STOP_TMPL_CTRL}:${STOP_TGTFMT_CTRL}.requires/${STOP_INSTFMT_CTRL}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'STOP_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}"
# Hard power off requires chassis off
HARD_OFF_TMPL_CTRL = "obmc-chassis-poweroff@.target"
HARD_OFF_TGTFMT_CTRL = "obmc-chassis-hard-poweroff@{0}.target"
HARD_OFF_INSTFMT_CTRL = "obmc-chassis-poweroff@{0}.target"
HARD_OFF_FMT_CTRL = "../${HARD_OFF_TMPL_CTRL}:${HARD_OFF_TGTFMT_CTRL}.requires/${HARD_OFF_INSTFMT_CTRL}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'HARD_OFF_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"
# Force the standby target to run the chassis reset check target
RESET_TMPL_CTRL = "obmc-chassis-powerreset@.target"
SYSD_TGT = "multi-user.target"
RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target"
RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"
SRC_URI = "git://github.com/openbmc/phosphor-state-manager;branch=master;protocol=https"
SRCREV = "63f7b1a3b4d50da093ab4156d495c2b932c7a1f8"
S = "${WORKDIR}/git"