summaryrefslogtreecommitdiff
path: root/meta-facebook/recipes-phosphor
diff options
context:
space:
mode:
authorVijay Khemka <vijaykhemka@fb.com>2020-03-04 22:29:09 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-03-05 04:44:19 +0300
commit001348a18193180988f6d1715be66f98e71b7f62 (patch)
tree702d3c812318e62954f1a49f12bbe53d01abd8dc /meta-facebook/recipes-phosphor
parent60329ae7948afad0113799469efa212bba60b9b7 (diff)
downloadopenbmc-001348a18193180988f6d1715be66f98e71b7f62.tar.xz
meta-facebook: Move recipes-phosphor to facebook layer
Moved recipe-phosphor to meta-facebook to support multiple facebook platform and make use of common code across platforms. (From meta-facebook rev: 2b00ba0327fcef6ae98243bc48367b395460805f) Change-Id: If3b847b60c60d1d93c3c26be0018eb8408e4f93e Signed-off-by: Vijay Khemka <vijaykhemka@fb.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-facebook/recipes-phosphor')
-rw-r--r--meta-facebook/recipes-phosphor/console/obmc-console/obmc-console.conf2
-rw-r--r--meta-facebook/recipes-phosphor/console/obmc-console_%.bbappend2
-rw-r--r--meta-facebook/recipes-phosphor/fans/phosphor-pid-control_%.bbappend3
-rw-r--r--meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend1
-rw-r--r--meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json38
-rw-r--r--meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json2
-rw-r--r--meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json16
-rw-r--r--meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend8
-rw-r--r--meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend3
-rw-r--r--meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service12
-rw-r--r--meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service9
-rw-r--r--meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service10
-rw-r--r--meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service16
-rw-r--r--meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend5
14 files changed, 127 insertions, 0 deletions
diff --git a/meta-facebook/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-facebook/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 000000000..94f1dff85
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1,2 @@
+local-tty = ttyS2
+baud = 57600
diff --git a/meta-facebook/recipes-phosphor/console/obmc-console_%.bbappend b/meta-facebook/recipes-phosphor/console/obmc-console_%.bbappend
new file mode 100644
index 000000000..24b52d731
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/console/obmc-console_%.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS_prepend_tiogapass := "${THISDIR}/${PN}:"
+OBMC_CONSOLE_HOST_TTY = "ttyS2"
diff --git a/meta-facebook/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-facebook/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
new file mode 100644
index 000000000..b70a42957
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+EXTRA_OECONF_append_tiogapass = " --enable-configure-dbus=yes"
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 000000000..8a58a2da2
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend_tiogapass := "${THISDIR}/${PN}:"
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 000000000..eea3b4e20
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,38 @@
+{
+ "0" : {
+ "name" : "IPMB",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "max_transfer_size" : 256,
+ "channel_info" : {
+ "medium_type" : "ipmb",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "1" : {
+ "name" : "eth0",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "max_transfer_size" : 256,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "8" : {
+ "name" : "INTRABMC",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "max_transfer_size" : 256,
+ "channel_info" : {
+ "medium_type" : "oem",
+ "protocol_type" : "oem",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ }
+}
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
new file mode 100644
index 000000000..f079091d6
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
@@ -0,0 +1,2 @@
+{"id": 32, "revision": 129, "addn_dev_support": 191,
+ "manuf_id": 40981, "prod_id": 12614, "aux": 0}
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json
new file mode 100644
index 000000000..690f9e733
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/ipmb-channels.json
@@ -0,0 +1,16 @@
+{
+ "channels": [
+ {
+ "type": "me",
+ "slave-path": "/dev/ipmb-4",
+ "bmc-addr": 32,
+ "remote-addr": 44
+ },
+ {
+ "type": "ipmb",
+ "slave-path": "/dev/ipmb-9",
+ "bmc-addr": 32,
+ "remote-addr": 96
+ }
+ ]
+}
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
new file mode 100644
index 000000000..b3205affa
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend_tiogapass := "${THISDIR}/${PN}:"
+
+SRC_URI_append_tiogapass = " file://ipmb-channels.json"
+
+do_install_append_tiogapass(){
+ install -m 0644 -D ${WORKDIR}/ipmb-channels.json \
+ ${D}/usr/share/ipmbbridge
+}
diff --git a/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
new file mode 100644
index 000000000..4948cb4cb
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -0,0 +1,3 @@
+# Enable threshold monitoring
+EXTRA_OECMAKE += "-DSEL_LOGGER_MONITOR_THRESHOLD_EVENTS=ON"
+EXTRA_OECMAKE += "-DREDFISH_LOG_MONITOR_PULSE_EVENTS=ON"
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
new file mode 100644
index 000000000..3a22e56b9
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Power Cycle Host Server
+Requires=host-gpio.service
+After=host-gpio.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+ExecStart=sleep 6
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.On
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
new file mode 100644
index 000000000..ddcb9dc62
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Shutdown Host Server
+Requires=host-gpio.service
+After=host-gpio.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
new file mode 100644
index 000000000..f0f03a1cc
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Reset Host Server
+Requires=host-gpio.service
+After=host-gpio.service
+
+[Service]
+Type=oneshot
+ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Reset
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
new file mode 100644
index 000000000..f7e93b82f
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phosphor Watchdog
+
+[Service]
+ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
+ --path=/xyz/openbmc_project/watchdog/host0 \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=host-phosphor-watchdog-host-poweroff.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \
+
+SyslogIdentifier=phosphor-watchdog
+BusName =xyz.openbmc_project.Watchdog
+Type=dbus
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
new file mode 100644
index 000000000..b0dcd093c
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
+# Remove the override to keep service running after DC cycle
+SYSTEMD_OVERRIDE_${PN}_remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
+SYSTEMD_SERVICE_${PN} = "phosphor-watchdog.service phosphor-watchdog-host-poweroff.service phosphor-watchdog-host-reset.service phosphor-watchdog-host-cycle.service"