diff options
author | Andrey V.Kosteltsev <AKosteltsev@IBS.RU> | 2022-05-23 00:36:13 +0300 |
---|---|---|
committer | Andrey V.Kosteltsev <AKosteltsev@IBS.RU> | 2022-05-23 00:36:13 +0300 |
commit | 816146249ab44fb9e85f8dfd413e18e92a13842c (patch) | |
tree | 97df436faa8607f63dba853024879f467eea3054 /meta-ibs/meta-common/recipes-phosphor/leds | |
parent | 1bd1f086e0ecfc9017891b5b9a492446eda41095 (diff) | |
download | openbmc-816146249ab44fb9e85f8dfd413e18e92a13842c.tar.xz |
Layers for SILA CP2-5422
Diffstat (limited to 'meta-ibs/meta-common/recipes-phosphor/leds')
6 files changed, 127 insertions, 0 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/leds/ibs-led-manager-config-native.bb b/meta-ibs/meta-common/recipes-phosphor/leds/ibs-led-manager-config-native.bb new file mode 100644 index 0000000000..2624e6d5e8 --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/leds/ibs-led-manager-config-native.bb @@ -0,0 +1,21 @@ +SUMMARY = "Phosphor LED Group Management for IBS" +PR = "r1" + +inherit obmc-phosphor-utils +inherit native + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${IBSBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +PROVIDES += "virtual/phosphor-led-manager-config-native" + +SRC_URI += "file://led.yaml" +S = "${WORKDIR}" + +# Overwrite the example led layout yaml file prior +# to building the phosphor-led-manager package +do_install() { + SRC=${S} + DEST=${D}${datadir}/phosphor-led-manager + install -D ${SRC}/led.yaml ${DEST}/led.yaml +} diff --git a/meta-ibs/meta-common/recipes-phosphor/leds/ibs-led-manager-config/led.yaml b/meta-ibs/meta-common/recipes-phosphor/leds/ibs-led-manager-config/led.yaml new file mode 100644 index 0000000000..533df68a4e --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/leds/ibs-led-manager-config/led.yaml @@ -0,0 +1,48 @@ +bmc_booted: + +power_on: + +status_ok: + status_green: + Action: 'On' + status_amber: + Action: 'Off' + +status_degraded: + status_green: + Action: 'Blink' + DutyOn: 50 + Period: 1000 + status_amber: + Action: 'Off' + +status_non_critical: + status_green: + Action: 'Off' + status_amber: + Action: 'Blink' + DutyOn: 50 + Period: 1000 + +status_critical: + status_green: + Action: 'Off' + status_amber: + Action: 'On' + +enclosure_identify: + identify: + Action: 'On' + +enclosure_identify_blink: + identify: + Action: 'Blink' + +cpu0_fault: + cpu0fault: + Action: 'On' + +cpu1_fault: + cpu1fault: + Action: 'On' + diff --git a/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off/id-led-off.service b/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off/id-led-off.service new file mode 100644 index 0000000000..51e59c6144 --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off/id-led-off.service @@ -0,0 +1,11 @@ +[Unit] +Description=turn off the ID LED when BMC is ready +Wants=multi-user.target +After=multi-user.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/id-led-off.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off/id-led-off.sh b/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off/id-led-off.sh new file mode 100755 index 0000000000..b609fc0ea8 --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off/id-led-off.sh @@ -0,0 +1,12 @@ +#!/bin/sh +busctl set-property "xyz.openbmc_project.LED.GroupManager" \ +"/xyz/openbmc_project/led/groups/enclosure_identify" \ +"xyz.openbmc_project.Led.Group" "Asserted" b false + +busctl set-property "xyz.openbmc_project.LED.GroupManager" \ +"/xyz/openbmc_project/led/groups/enclosure_identify_blink" \ +"xyz.openbmc_project.Led.Group" "Asserted" b false + +busctl set-property "xyz.openbmc_project.LED.Controller.identify" \ +"/xyz/openbmc_project/led/physical/identify" \ +"xyz.openbmc_project.Led.Physical" "State" s "xyz.openbmc_project.Led.Physical.Action.Off" diff --git a/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off_git.bb b/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off_git.bb new file mode 100644 index 0000000000..6dc1a4306d --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/leds/id-led-off_git.bb @@ -0,0 +1,24 @@ +SUMMARY = "Turn off the ID LED" +DESCRIPTION = "Script to turn off the ID LED after BMC is ready" + +S = "${WORKDIR}" +SRC_URI = "file://id-led-off.sh \ + file://id-led-off.service \ + " + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${IBSBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" +RDEPENDS:${PN} += "bash" + +inherit systemd + +FILES:${PN} += "${systemd_system_unitdir}/id-led-off.service" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/id-led-off.service ${D}${systemd_system_unitdir} + install -d ${D}${bindir} + install -m 0755 ${S}/id-led-off.sh ${D}/${bindir}/id-led-off.sh +} + +SYSTEMD_SERVICE:${PN} += " id-led-off.service" diff --git a/meta-ibs/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-ibs/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend new file mode 100644 index 0000000000..312ec6706c --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +RDEPENDS:${PN}:remove = "clear-once" + +do_compile:prepend(){ + install -m 0644 ${STAGING_DATADIR_NATIVE}/${PN}/led.yaml ${S} +} + +do_install:append(){ + rm -f ${S}/led.yaml +} |