summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/state/files
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-31 13:25:51 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-06 14:44:12 +0300
commitff075f6ee795a590b244d70a90cc312ba1f2d83d (patch)
treea617790bdbfdeef960665ba0242e1f0c93e5301a /meta-phosphor/recipes-phosphor/state/files
parent3e4da38c127bb7e7641adc2fc41f4c33744cb918 (diff)
downloadopenbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.tar.xz
meta-phosphor: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-phosphor is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b) Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state/files')
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf1
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-discover-system-state@.service19
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service18
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-check@.service19
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-reboot-attempts@.service13
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-running@.service13
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-reset-sensor-states@.service15
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.BMC.service16
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Chassis.service16
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service18
10 files changed, 148 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf b/meta-phosphor/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf
new file mode 100644
index 000000000..2e3ca1a5b
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf
@@ -0,0 +1 @@
+REBOOT_DELAY=5
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-discover-system-state@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-discover-system-state@.service
new file mode 100644
index 000000000..f39803899
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-discover-system-state@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Reboot If Enabled
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
+Wants=mapper-wait@-xyz-openbmc_project-state-host%i.service
+After=mapper-wait@-xyz-openbmc_project-state-host%i.service
+Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
+After=op-reset-chassis-on@%i.service
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart=/usr/bin/env phosphor-discover-system-state --host %i
+SyslogIdentifier=phosphor-discover-system-state
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service
new file mode 100644
index 000000000..27479f2de
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Reboot host%i
+Wants=obmc-host-stop@%i.target
+After=obmc-host-stop@%i.target
+
+[Service]
+#ExecStart={base_bindir}/systemctl start obmc-host-start@%i.target
+# This service is starting another target that conflicts with the
+# target this service is running in. OpenBMC needs a refactor of
+# how it does its host reset path. Until then, this short term
+# solution does the job.
+# Since this is a part of the reboot target, call the startmin
+# target which does the minimum required to start the host.
+ExecStart=/bin/sh -c "sleep ${{REBOOT_DELAY}} && systemctl start obmc-host-startmin@%i.target"
+EnvironmentFile={envfiledir}/obmc/phosphor-reboot-host/reboot.conf
+
+[Install]
+WantedBy=obmc-host-reboot@%i.target
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-check@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-check@.service
new file mode 100644
index 000000000..6062320b2
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-check@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Check Host%i status on BMC reset
+Wants=mapper-wait@-xyz-openbmc_project-control-host%i.service
+After=mapper-wait@-xyz-openbmc_project-control-host%i.service
+Wants=obmc-host-reset-running@%i.target
+Before=obmc-host-reset-running@%i.target
+Wants=op-reset-chassis-on@%i.service
+After=op-reset-chassis-on@%i.service
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=/run/openbmc/chassis@%i-on
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/usr/bin/env phosphor-host-check
+SyslogIdentifier=phosphor-host-check
+
+[Install]
+WantedBy=obmc-host-reset@%i.target
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-reboot-attempts@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-reboot-attempts@.service
new file mode 100644
index 000000000..35de4304b
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-reboot-attempts@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Reset host reboot counter
+Wants=mapper-wait@-xyz-openbmc_project-state-host%i.service
+After=mapper-wait@-xyz-openbmc_project-state-host%i.service
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/state/host%i` /xyz/openbmc_project/state/host%i xyz.openbmc_project.Control.Boot.RebootAttempts AttemptsLeft u 3"
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-running@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-running@.service
new file mode 100644
index 000000000..a49bbdd16
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-host-running@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Start host%i running after BMC reset
+After=obmc-host-reset-running@%i.target
+Requires=obmc-host-reset-running@%i.target
+ConditionPathExists=/run/openbmc/host@%i-on
+
+[Service]
+RemainAfterExit=no
+ExecStart=/bin/systemctl start obmc-host-start@%i.target
+
+
+[Install]
+WantedBy=obmc-host-reset@%i.target
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-sensor-states@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-sensor-states@.service
new file mode 100644
index 000000000..689372f4a
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-reset-sensor-states@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Reset host sensors
+After=phosphor-reset-host-check@%i.service
+Wants=mapper-wait@-xyz-openbmc_project-state-host%i.service
+After=mapper-wait@-xyz-openbmc_project-state-host%i.service
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/state/host0` /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Boot.Progress BootProgress s xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified"
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/state/host0` /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.OperatingSystem.Status OperatingSystemState s xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive"
+
+[Install]
+WantedBy=obmc-host-reset@%i.target
diff --git a/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.BMC.service b/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.BMC.service
new file mode 100644
index 000000000..057af648d
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.BMC.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phosphor BMC State Manager
+Before=mapper-wait@-xyz-openbmc_project-state-bmc.service
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+
+[Service]
+ExecStart=/usr/bin/env phosphor-bmc-state-manager
+SyslogIdentifier=phosphor-bmc-state-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Chassis.service b/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Chassis.service
new file mode 100644
index 000000000..259dd16af
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Chassis.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phosphor Chassis State Manager
+Before=mapper-wait@-xyz-openbmc_project-state-chassis.service
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+After=org.openbmc.control.Power@0.service
+
+[Service]
+ExecStart=/usr/bin/env phosphor-chassis-state-manager
+SyslogIdentifier=phosphor-chassis-state-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service b/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service
new file mode 100644
index 000000000..26f523eaa
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/xyz.openbmc_project.State.Host.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Phosphor Host State Manager
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
+Before=mapper-wait@-xyz-openbmc_project-state-host.service
+After=phosphor-reset-host-running@0.service
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+ExecStart=/usr/bin/env phosphor-host-state-manager
+SyslogIdentifier=phosphor-host-state-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}