summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2019-04-20 11:08:01 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-04-27 08:06:40 +0000
commitfc010d48f3a9686e4898114bfa870fde16eab3eb (patch)
tree1367549a24b522120ea1302b1b128cba52fff41b
parent4080949e757977768c1403269afc61d4495e02b5 (diff)
downloadtalos-openbmc-fc010d48f3a9686e4898114bfa870fde16eab3eb.tar.gz
talos-openbmc-fc010d48f3a9686e4898114bfa870fde16eab3eb.zip
Add flash, GPIO, and state recipies from Romulus
-rw-r--r--meta-rcs/meta-talos/recipes-phosphor/flash/phosphor-software-manager_%.bbappend1
-rw-r--r--meta-rcs/meta-talos/recipes-phosphor/gpio/id-button.bb30
-rw-r--r--meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/id-button-pressed.service10
-rw-r--r--meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/obmc/gpio/id_button5
-rwxr-xr-xmeta-rcs/meta-talos/recipes-phosphor/gpio/id-button/toggle_identify_led.sh20
-rw-r--r--meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager/obmc/phosphor-reboot-host/reboot.conf3
-rw-r--r--meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager_%.bbappend1
7 files changed, 70 insertions, 0 deletions
diff --git a/meta-rcs/meta-talos/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-rcs/meta-talos/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
new file mode 100644
index 000000000..c92b1a89c
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG_append = " verify_signature"
diff --git a/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button.bb b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button.bb
new file mode 100644
index 000000000..4d4520e59
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Talos II ID Button pressed application"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit obmc-phosphor-systemd
+
+DEPENDS += "virtual/obmc-gpio-monitor"
+RDEPENDS_${PN} += "virtual/obmc-gpio-monitor"
+
+S = "${WORKDIR}"
+SRC_URI += "file://toggle_identify_led.sh"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/toggle_identify_led.sh \
+ ${D}${bindir}/toggle_identify_led.sh
+}
+
+SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/id_button"
+
+ID_BUTTON_SERVICE = "id_button"
+
+TMPL = "phosphor-gpio-monitor@.service"
+INSTFMT = "phosphor-gpio-monitor@{0}.service"
+TGT = "multi-user.target"
+FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "id-button-pressed.service"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'ID_BUTTON_SERVICE')}"
diff --git a/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/id-button-pressed.service b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/id-button-pressed.service
new file mode 100644
index 000000000..f633fc307
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/id-button-pressed.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ID Button Pressed Service
+Wants=mapper-wait@-xyz-openbmc_project-led-groups.service
+After=mapper-wait@-xyz-openbmc_project-led-groups.service
+StartLimitIntervalSec=0
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/env toggle_identify_led.sh
+SyslogIdentifier=id-button
diff --git a/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/obmc/gpio/id_button b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/obmc/gpio/id_button
new file mode 100644
index 000000000..b1963573f
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/obmc/gpio/id_button
@@ -0,0 +1,5 @@
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=135
+POLARITY=1
+TARGET=id-button-pressed.service
+EXTRA_ARGS=--continue
diff --git a/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/toggle_identify_led.sh b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/toggle_identify_led.sh
new file mode 100755
index 000000000..eec96d3f1
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/gpio/id-button/toggle_identify_led.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Toggle the state of identify LED Group
+
+SERVICE="xyz.openbmc_project.LED.GroupManager"
+INTERFACE="xyz.openbmc_project.Led.Group"
+PROPERTY="Asserted"
+
+# Get current state
+object=$(busctl tree $SERVICE --list | grep identify)
+state=$(busctl get-property $SERVICE $object $INTERFACE $PROPERTY \
+ | awk '{print $NF;}')
+
+if [ "$state" == "false" ]; then
+ target='true'
+else
+ target='false'
+fi
+
+# Set target state
+busctl set-property $SERVICE $object $INTERFACE $PROPERTY b $target
diff --git a/meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager/obmc/phosphor-reboot-host/reboot.conf b/meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager/obmc/phosphor-reboot-host/reboot.conf
new file mode 100644
index 000000000..b804f2aef
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager/obmc/phosphor-reboot-host/reboot.conf
@@ -0,0 +1,3 @@
+# Sleep 8 seconds on Talos II to make sure the checkstop status on
+# CPU is cleared. See https://github.com/openbmc/openbmc/issues/3330
+REBOOT_DELAY=8
diff --git a/meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager_%.bbappend
new file mode 100644
index 000000000..5acf3af89
--- /dev/null
+++ b/meta-rcs/meta-talos/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend_talos := "${THISDIR}/${PN}:"
OpenPOWER on IntegriCloud