diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/chassis')
6 files changed, 1 insertions, 120 deletions
diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service deleted file mode 100644 index 82b7938667..0000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service +++ /dev/null @@ -1,20 +0,0 @@ -[Unit] -Description=Start Power%i -Wants=obmc-power-start@%i.target -Before=obmc-power-start@%i.target -Wants=obmc-power-start-pre@%i.target -After=obmc-power-start-pre@%i.target -After=obmc-fan-control.target -Wants=mapper-wait@-org-openbmc-control-power%i.service -After=mapper-wait@-org-openbmc-control-power%i.service -Conflicts=obmc-chassis-poweroff@%i.target -ConditionPathExists=!/run/openbmc/chassis@%i-on - -[Service] -RemainAfterExit=yes -Type=oneshot -ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/power%i` /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 1" -SyslogIdentifier=op-power-start - -[Install] -WantedBy=obmc-host-start@%i.target diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service deleted file mode 100644 index 40dbf36377..0000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Stop Power%i -Wants=obmc-power-stop@%i.target -Before=obmc-power-stop@%i.target -Wants=obmc-power-stop-pre@%i.target -After=obmc-power-stop-pre@%i.target -Wants=mapper-wait@-org-openbmc-control-power%i.service -After=mapper-wait@-org-openbmc-control-power%i.service -Conflicts=obmc-chassis-poweron@%i.target - -[Service] -RemainAfterExit=yes -ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/power%i` /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 0" -SyslogIdentifier=op-power-stop - -[Install] -WantedBy=obmc-host-stop@%i.target diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service deleted file mode 100644 index b76db7bf41..0000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service +++ /dev/null @@ -1,20 +0,0 @@ -[Unit] -Description=Power is off to chassis%i -After=op-wait-power-off@%i.service -Requires=op-wait-power-off@%i.service - -[Service] -RemainAfterExit=no -# systemd starts all wanted targets in parallel and a Conflict -# statement will resolve itself when the target starts, not when -# completes. Some services have a requirement to stop -# once power is off. The solution is to create a new target, -# obmc-chassis-powered-off@.target, that is started after it is -# verified that power has been removed from the chassis. Then -# services may conflict with this target to ensure they -# are stopped at the appropriate time. -ExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target - - -[Install] -WantedBy=obmc-chassis-poweroff@%i.target diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-on@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-on@.service deleted file mode 100644 index f2a7103254..0000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-on@.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Start chassis%i on after BMC reset -Requires=op-reset-chassis-running@%i.service -After=op-reset-chassis-running@%i.service -After=obmc-power-reset-on@%i.target -Requires=obmc-power-reset-on@%i.target -ConditionPathExists=/run/openbmc/chassis@%i-on - -[Service] -RemainAfterExit=no -ExecStart=/bin/systemctl start obmc-chassis-poweron@%i.target - - -[Install] -WantedBy=obmc-chassis-powerreset@%i.target diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-running@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-running@.service deleted file mode 100644 index 381f89dfca..0000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-running@.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Check Chassis%i pgood and create a file to indicate it -Wants=mapper-wait@-org-openbmc-control-power%i.service -After=mapper-wait@-org-openbmc-control-power%i.service -Wants=obmc-power-reset-on@%i.target -Before=obmc-power-reset-on@%i.target -Conflicts=obmc-chassis-poweroff@%i.target - -[Service] -RemainAfterExit=no -Type=oneshot -ExecStart=/bin/sh -c "if [ $(busctl get-property `mapper get-service /org/openbmc/control/power%i` /org/openbmc/control/power%i org.openbmc.control.Power pgood | sed 's/i\s*[1]/on/' | grep on | wc -l) != 0 ]; then mkdir -p /run/openbmc/ && touch /run/openbmc/chassis@%i-on; fi" - -[Install] -WantedBy=obmc-chassis-powerreset@%i.target diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power_git.bb index 1a65a11b67..4ccff7b500 100644 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power_git.bb +++ b/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power_git.bb @@ -15,57 +15,25 @@ OBMC_CONTROL_POWER_FMT ?= "org.openbmc.control.Power@{0}.service" DBUS_SERVICE:${PN} += "${@compose_list(d, 'OBMC_CONTROL_POWER_FMT', 'OBMC_POWER_INSTANCES')}" SYSTEMD_SERVICE:${PN} += " \ - op-power-start@.service \ op-wait-power-on@.service \ - op-power-stop@.service \ op-wait-power-off@.service \ - op-reset-chassis-running@.service \ - op-reset-chassis-on@.service \ - op-powered-off@.service \ " SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/power_control" -START_TMPL = "op-power-start@.service" START_TGTFMT = "obmc-chassis-poweron@{1}.target" -START_INSTFMT = "op-power-start@{0}.service" -START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}" - -STOP_TMPL = "op-power-stop@.service" -STOP_TGTFMT = "obmc-chassis-poweroff@{1}.target" -STOP_INSTFMT = "op-power-stop@{0}.service" -STOP_FMT = "../${STOP_TMPL}:${STOP_TGTFMT}.requires/${STOP_INSTFMT}" - -POWERED_OFF_TMPL = "op-powered-off@.service" -POWERED_OFF_INSTFMT = "op-powered-off@{0}.service" -POWERED_OFF_FMT = "../${POWERED_OFF_TMPL}:${STOP_TGTFMT}.requires/${POWERED_OFF_INSTFMT}" - ON_TMPL = "op-wait-power-on@.service" ON_INSTFMT = "op-wait-power-on@{0}.service" ON_FMT = "../${ON_TMPL}:${START_TGTFMT}.requires/${ON_INSTFMT}" +STOP_TGTFMT = "obmc-chassis-poweroff@{1}.target" OFF_TMPL = "op-wait-power-off@.service" OFF_INSTFMT = "op-wait-power-off@{0}.service" OFF_FMT = "../${OFF_TMPL}:${STOP_TGTFMT}.requires/${OFF_INSTFMT}" -RESET_TGTFMT = "obmc-chassis-powerreset@{1}.target" - -RESET_ON_TMPL = "op-reset-chassis-running@.service" -RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service" -RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}" - -RESET_ON_CHASSIS_TMPL = "op-reset-chassis-on@.service" -RESET_ON_CHASSIS_INSTFMT = "op-reset-chassis-on@{0}.service" -RESET_ON_CHASSIS_FMT = "../${RESET_ON_CHASSIS_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_CHASSIS_INSTFMT}" - # Build up requires relationship for START_TGTFMT and STOP_TGTFMT -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'POWERED_OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'RESET_ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'RESET_ON_CHASSIS_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" # Now show that the main control target requires these power targets START_TMPL_CTRL = "obmc-chassis-poweron@.target" |