summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/system
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-09-06 12:22:28 -0400
committerPatrick Williams <patrick@stwcx.xyz>2016-09-12 18:45:18 +0000
commitdbb9856f262618b8039890b5f7f9a95e68e6c312 (patch)
treeda708793f8104e01bf1b98ad12cc582240754dae /meta-phosphor/common/recipes-phosphor/system
parent194b590eb913cc8463c2c7774865d6bc8b07aa17 (diff)
downloadtalos-openbmc-dbb9856f262618b8039890b5f7f9a95e68e6c312.tar.gz
talos-openbmc-dbb9856f262618b8039890b5f7f9a95e68e6c312.zip
Drop obmc-phosphor- prefix from recipe collections
Given that these are already in the recipes-phosphor directory this seemed redundant. Change-Id: I48a1ab79e0eda88fc5e6af88f198ca3941e829b8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/system')
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.py29
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.service9
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc.bb12
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service11
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state.bb28
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.service13
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.target2
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system.bb30
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/org.openbmc.managers.System.service14
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/startup-hacks.service10
-rw-r--r--meta-phosphor/common/recipes-phosphor/system/obmc-phosphor-sysd.bb9
11 files changed, 167 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.py b/meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.py
new file mode 100644
index 000000000..c8080ac2c
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+
+# Contributors Listed Below - COPYRIGHT 2015
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+
+import time
+import sys
+import dbus
+import dbus.service
+import dbus.mainloop.glib
+
+if __name__ == '__main__':
+ print "obmc-phosphor-watchdogd starting..."
+
+ while 1:
+ time.sleep(5)
diff --git a/meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.service b/meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.service
new file mode 100644
index 000000000..3a68b68d8
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/files/obmc-phosphor-sysd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Phosphor OpenBMC system management daemon
+
+[Service]
+Restart=always
+ExecStart=/usr/sbin/obmc-phosphor-sysd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc.bb b/meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc.bb
new file mode 100644
index 000000000..99f561853
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc.bb
@@ -0,0 +1,12 @@
+SUMMARY = "OpenBMC org.openbmc.control.Bmc example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.control.Bmc DBUS API. \
+org.openbmc.control.Bmc provides APIs for functions like resetting the BMC."
+PR = "r1"
+
+inherit skeleton-gdbus
+inherit obmc-phosphor-dbus-service
+
+SKELETON_DIR = "bmcctl"
+
+FMT = "org.openbmc.control.Bmc@{0}.service"
+DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_BMC_INSTANCES')}"
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service b/meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service
new file mode 100644
index 000000000..4d26f961b
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Phosphor BMC%i Control
+
+[Service]
+Restart=always
+ExecStart={sbindir}/control_bmc.exe
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state.bb b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state.bb
new file mode 100644
index 000000000..464cf110a
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state.bb
@@ -0,0 +1,28 @@
+SUMMARY = "OpenBMC state manager"
+DESCRIPTION = "OpenBMC state manager."
+PR = "r1"
+
+inherit skeleton-python
+inherit obmc-phosphor-systemd
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-subprocess \
+ python-pygobject \
+ "
+
+SKELETON_DIR = "pystatemgr"
+SYSTEMD_SERVICE_${PN} += "obmc-mgr-state.service obmc-mgr-state.target"
+
+TMPL = "mapper-wait@.service"
+TGT = "obmc-mgr-state.target"
+HOST_FMT = "../${TMPL}:${TGT}.wants/mapper-wait@-org-openbmc-settings-host{0}.service"
+CHASSIS_FMT = "../${TMPL}:${TGT}.wants/mapper-wait@-org-openbmc-control-chassis{0}.service"
+POWER_FMT = "../${TMPL}:${TGT}.wants/mapper-wait@-org-openbmc-control-power{0}.service"
+
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_FMT', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'CHASSIS_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'POWER_FMT', 'OBMC_POWER_INSTANCES')}"
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.service b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.service
new file mode 100644
index 000000000..2a07c2b28
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Restore Last State
+Wants=obmc-mgr-state.target
+After=obmc-mgr-state.target
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart={sbindir}/discover_system_state.py
+Environment="PYTHONUNBUFFERED=1"
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.target b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.target
new file mode 100644
index 000000000..fef2a1ff0
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-state/obmc-mgr-state.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=Restore Last State
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system.bb b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system.bb
new file mode 100644
index 000000000..8b97e62bf
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system.bb
@@ -0,0 +1,30 @@
+SUMMARY = "OpenBMC system manager"
+DESCRIPTION = "OpenBMC system manager."
+PR = "r1"
+
+inherit skeleton-python
+inherit obmc-phosphor-dbus-service
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-subprocess \
+ python-pygobject \
+ pyphosphor-dbus \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pysystemmgr"
+
+do_compile_append() {
+ oe_runmake -C ../hacks
+}
+
+do_install_append() {
+ oe_runmake -C ../hacks install DESTDIR=${D}
+}
+
+DBUS_SERVICE_${PN} += "org.openbmc.managers.System.service"
+SYSTEMD_SERVICE_${PN} += "startup-hacks.service"
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/org.openbmc.managers.System.service b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/org.openbmc.managers.System.service
new file mode 100644
index 000000000..abca0dc68
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/org.openbmc.managers.System.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phoshpor System Manager
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+Restart=always
+ExecStart={sbindir}/system_manager.py
+Type=dbus
+BusName={BUSNAME}
+Environment="PYTHONUNBUFFERED=1"
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/startup-hacks.service b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/startup-hacks.service
new file mode 100644
index 000000000..2fca98649
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-mgr-system/startup-hacks.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Startup Hacks
+
+[Service]
+Restart=no
+Type=oneshot
+ExecStart={sbindir}/startup_hacks.sh
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/common/recipes-phosphor/system/obmc-phosphor-sysd.bb b/meta-phosphor/common/recipes-phosphor/system/obmc-phosphor-sysd.bb
new file mode 100644
index 000000000..bcb5d32ad
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/system/obmc-phosphor-sysd.bb
@@ -0,0 +1,9 @@
+SUMMARY = "Phosphor OpenBMC System Management"
+DESCRIPTION = "Phosphor OpenBMC system management reference implementation."
+PR = "r1"
+
+inherit obmc-phosphor-system-mgmt
+inherit obmc-phosphor-pydbus-service
+
+S = "${WORKDIR}"
+SRC_URI += "file://${PN}.py"
OpenPOWER on IntegriCloud