From 87a65e63bac789bca0607e0b4ab09d62517b95e7 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Wed, 29 May 2019 10:29:58 -0700 Subject: Update to internal Signed-off-by: Ed Tanous --- .../recipes-intel/chassis/intel-chassis-control.bb | 58 +++++++++++++++++++++- .../intel-power-forceoff@.service | 15 ++++++ .../intel-power-stop@.service | 5 +- .../intel-chassis-control/intel-wait-host-off.sh | 32 ++++++++++++ .../intel-wait-host-off@.service | 21 ++++++++ .../intel-chassis-control/intel-wait-host-on.sh | 32 ++++++++++++ .../intel-wait-host-on@.service | 19 +++++++ .../intel-chassis-control/intel-wait-power-off.sh | 32 ++++++++++++ .../intel-wait-power-off@.service | 23 +++++++++ .../intel-chassis-control/intel-wait-power-on.sh | 32 ++++++++++++ .../intel-wait-power-on@.service | 21 ++++++++ .../obmc-chassis-hard-poweroff@.target | 1 - .../obmc-chassis-poweron@.target | 1 - .../obmc-host-shutdown@.target | 5 ++ .../intel-chassis-control/obmc-host-start@.target | 1 - .../intel-chassis-control/obmc-host-stop@.target | 1 - .../obmc-host-warm-reset@.target | 1 - .../recipes-intel/smbios/smbios-mdrv1.bb | 4 +- .../recipes-intel/smbios/smbios-mdrv2.bb | 4 +- 19 files changed, 293 insertions(+), 15 deletions(-) create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-forceoff@.service create mode 100755 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off.sh create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off@.service create mode 100755 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on.sh create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on@.service create mode 100755 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off.sh create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off@.service create mode 100755 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on.sh create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on@.service create mode 100644 meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-shutdown@.target (limited to 'meta-openbmc-mods/meta-common/recipes-intel') diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb index a44b31efe..61dfce853 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb @@ -1,8 +1,14 @@ SUMMARY = "Chassis Power Control service for Intel based platform" DESCRIPTION = "Chassis Power Control service for Intel based platfrom" -SRC_URI = "git://git@github.com/Intel-BMC/intel-chassis-control.git;protocol=ssh" -SRCREV = "feb401242a38d8fb9301dc8e3cb50d7a9c2b4cd1" +SRC_URI = "git://github.com/Intel-BMC/intel-chassis-control.git;protocol=ssh" +SRCREV = "7cbb2153afedf3b7d3fa7856f0a306138c4b4297" + +SRC_URI += "file://intel-wait-power-on.sh \ + file://intel-wait-power-off.sh \ + file://intel-wait-host-on.sh \ + file://intel-wait-host-off.sh \ + " S = "${WORKDIR}/git/services/chassis/" @@ -43,6 +49,7 @@ SYSTEMD_SERVICE_${PN} += " \ obmc-host-start@.target \ obmc-host-startmin@.target \ obmc-host-stop@.target \ + obmc-host-shutdown@.target \ obmc-host-reboot@.target \ obmc-chassis-poweroff@.target \ obmc-chassis-poweron@.target \ @@ -79,6 +86,18 @@ START_INSTFMT = "intel-power-start@{0}.service" START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}" SYSTEMD_SERVICE_${PN} += "${START_TMPL}" +ON_TMPL = "intel-wait-power-on@.service" +ON_TGTFMT = "obmc-chassis-poweron@{0}.target" +ON_INSTFMT = "intel-wait-power-on@{0}.service" +ON_FMT = "../${ON_TMPL}:${ON_TGTFMT}.requires/${ON_INSTFMT}" +SYSTEMD_SERVICE_${PN} += "${ON_TMPL}" + +OFF_TMPL = "intel-wait-power-off@.service" +OFF_TGTFMT = "obmc-chassis-poweroff@{0}.target" +OFF_INSTFMT = "intel-wait-power-off@{0}.service" +OFF_FMT = "../${OFF_TMPL}:${OFF_TGTFMT}.requires/${OFF_INSTFMT}" +SYSTEMD_SERVICE_${PN} += "${OFF_TMPL}" + STOP_TMPL = "intel-power-stop@.service" STOP_TGTFMT = "obmc-chassis-poweroff@{0}.target" STOP_INSTFMT = "intel-power-stop@{0}.service" @@ -98,6 +117,9 @@ SYSTEMD_LINK_${PN} += "${@compose_list(d, 'STOP_FMT', 'OBMC_CHASSIS_INSTANCES') SYSTEMD_LINK_${PN} += "${@compose_list(d, 'WARM_RESET_FMT', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'WARM_RESET_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'ON_FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'OFF_FMT', 'OBMC_CHASSIS_INSTANCES')}" + #The main control target requires these power targets START_TMPL_CTRL = "obmc-chassis-poweron@.target" START_TGTFMT_CTRL = "obmc-host-startmin@{0}.target" @@ -105,6 +127,20 @@ START_INSTFMT_CTRL = "obmc-chassis-poweron@{0}.target" START_FMT_CTRL = "../${START_TMPL_CTRL}:${START_TGTFMT_CTRL}.requires/${START_INSTFMT_CTRL}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'START_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" +HOSTON_TMPL_CTRL = "intel-wait-host-on@.service" +START_TGTFMT_CTRL = "obmc-host-startmin@{0}.target" +HOSTON_INSTFMT_CTRL = "intel-wait-host-on@{0}.service" +HOSTON_FMT_CTRL = "../${HOSTON_TMPL_CTRL}:${START_TGTFMT_CTRL}.requires/${HOSTON_INSTFMT_CTRL}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOSTON_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SERVICE_${PN} += "${HOSTON_TMPL_CTRL}" + +HOSTOFF_TMPL_CTRL = "intel-wait-host-off@.service" +HOSTSTOP_TGTFMT_CTRL = "obmc-host-stop@{0}.target" +HOSTOFF_INSTFMT_CTRL = "intel-wait-host-off@{0}.service" +HOSTOFF_FMT_CTRL = "../${HOSTOFF_TMPL_CTRL}:${HOSTSTOP_TGTFMT_CTRL}.requires/${HOSTOFF_INSTFMT_CTRL}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOSTOFF_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SERVICE_${PN} += "${HOSTOFF_TMPL_CTRL}" + # Chassis off requires host off STOP_TMPL_CTRL = "obmc-host-stop@.target" STOP_TGTFMT_CTRL = "obmc-chassis-poweroff@{0}.target" @@ -119,6 +155,14 @@ HARD_OFF_INSTFMT_CTRL = "obmc-chassis-poweroff@{0}.target" HARD_OFF_FMT_CTRL = "../${HARD_OFF_TMPL_CTRL}:${HARD_OFF_TGTFMT_CTRL}.requires/${HARD_OFF_INSTFMT_CTRL}" SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HARD_OFF_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" +# Hard power off requires the forceoff flag service +FORCE_OFF_TMPL_CTRL = "intel-power-forceoff@.service" +HARD_OFF_TGTFMT_CTRL = "obmc-chassis-hard-poweroff@{0}.target" +FORCE_OFF_INSTFMT_CTRL = "intel-power-forceoff@{0}.service" +FORCE_OFF_FMT_CTRL = "../${FORCE_OFF_TMPL_CTRL}:${HARD_OFF_TGTFMT_CTRL}.requires/${FORCE_OFF_INSTFMT_CTRL}" +SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'FORCE_OFF_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SERVICE_${PN} += "${FORCE_OFF_TMPL_CTRL}" + # Host soft reboot to run the shutdown target HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target" HOST_SOFT_REBOOT_TMPL = "obmc-host-soft-reboot@.target" @@ -179,6 +223,7 @@ DEPENDS += " \ autoconf-archive-native \ boost \ i2c-tools \ + libgpiod \ systemd \ sdbusplus \ sdbusplus-native \ @@ -191,6 +236,7 @@ RDEPENDS_${PN} += " \ sdbusplus \ phosphor-dbus-interfaces \ phosphor-logging \ + bash \ " EXTRA_OECMAKE = " -DENABLE_GTEST=OFF -DCMAKE_SKIP_RPATH=ON" @@ -199,3 +245,11 @@ EXTRA_OECMAKE = " -DENABLE_GTEST=OFF -DCMAKE_SKIP_RPATH=ON" CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" do_configure[depends] += "virtual/kernel:do_shared_workdir" + +do_install_append() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/intel-wait-power-on.sh ${D}/${bindir}/intel-wait-power-on.sh + install -m 0755 ${WORKDIR}/intel-wait-power-off.sh ${D}/${bindir}/intel-wait-power-off.sh + install -m 0755 ${WORKDIR}/intel-wait-host-on.sh ${D}/${bindir}/intel-wait-host-on.sh + install -m 0755 ${WORKDIR}/intel-wait-host-off.sh ${D}/${bindir}/intel-wait-host-off.sh +} diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-forceoff@.service b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-forceoff@.service new file mode 100644 index 000000000..54b9befa4 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-forceoff@.service @@ -0,0 +1,15 @@ +[Unit] +Description=Add force power offf flag for Power%i +Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +Conflicts=obmc-chassis-poweron@%i.target +Conflicts=obmc-host-start@%i.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c "mkdir -p /run/openbmc && touch /run/openbmc/host@%i-request" +SyslogIdentifier=intel-power-forceoff +StartLimitInterval=0 + +[Install] +WantedBy=obmc-chassis-poweroff@%i.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-stop@.service b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-stop@.service index 5d0e46f82..d0476e9b2 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-stop@.service +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-power-stop@.service @@ -4,6 +4,7 @@ Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service Conflicts=obmc-chassis-poweron@%i.target Conflicts=obmc-host-start@%i.target +ConditionPathExists=/run/openbmc/chassis@%i-on [Service] Type=oneshot @@ -12,9 +13,5 @@ ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/Chass SyslogIdentifier=intel-power-stop StartLimitInterval=0 -ExecStart=/bin/rm -f /run/openbmc/chassis@%i-on -ExecStart=/bin/rm -f /run/openbmc/host@%i-on -ExecStart=/bin/rm -f /run/openbmc/host@%i-request - [Install] WantedBy=obmc-chassis-poweroff@%i.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off.sh b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off.sh new file mode 100755 index 000000000..983f1bc8d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2019 Intel Corporation +# +# 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. +# +# + +echo "wait for vrd_good = OFF" +SERVICE=$(mapper get-service /xyz/openbmc_project/Chassis/Control/Power0) +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power vrd_good \ + | sed 's/i\s*[0]/off/' | grep off | wc -l) + +while [ $PGOOD == 0 ]; do + echo "!OFF" +sleep 1 +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power vrd_good \ + | sed 's/i\s*[0]/off/' | grep off | wc -l) +done +echo "vrd_good = OFF" \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off@.service b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off@.service new file mode 100644 index 000000000..eedfcc78a --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-off@.service @@ -0,0 +1,21 @@ +[Unit] +Description=Wait for Host%i to turn off +Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +#After=obmc-chassis-poweroff@%i.target +Before=intel-wait-power-off@%i.service +After=intel-power-stop@%i.service +Conflicts=obmc-chassis-poweron@%i.target +ConditionPathExists=/run/openbmc/host@%i-on + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/intel-wait-host-off.sh +ExecStartPost=/bin/sh -c "rm -rf /run/openbmc/host@%i-on" + +SyslogIdentifier=intel-wait-host-off +TimeoutSec=30 + +[Install] +RequiredBy=obmc-host-stop@%i.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on.sh b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on.sh new file mode 100755 index 000000000..74f6bd47b --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2019 Intel Corporation +# +# 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. +# +# + +echo "wait for vrd_good = ON" +SERVICE=$(mapper get-service /xyz/openbmc_project/Chassis/Control/Power0) +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power vrd_good \ + | sed 's/i\s*[1]/on/' | grep on | wc -l) + +while [ $PGOOD == 0 ]; do + echo "!ON" +sleep 1 +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power vrd_good \ + | sed 's/i\s*[1]/on/' | grep on | wc -l) +done +echo "vrd_good = ON" \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on@.service b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on@.service new file mode 100644 index 000000000..a1fc316c2 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-host-on@.service @@ -0,0 +1,19 @@ +[Unit] +Description=Wait for Host%i to turn on +Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=intel-wait-power-on@%i.service +Conflicts=obmc-chassis-poweroff@%i.target +ConditionPathExists=!/run/openbmc/host@%i-on + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/intel-wait-host-on.sh +ExecStartPost=/bin/sh -c "mkdir -p /run/openbmc/ && touch /run/openbmc/host@%i-on" + +SyslogIdentifier=intel-wait-host-on +TimeoutSec=30 + +[Install] +RequiredBy=obmc-host-startmin@%i.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off.sh b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off.sh new file mode 100755 index 000000000..be58682cc --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2019 Intel Corporation +# +# 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. +# +# + +echo "wait for pgood = OFF" +SERVICE=$(mapper get-service /xyz/openbmc_project/Chassis/Control/Power0) +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power pgood \ + | sed 's/i\s*[0]/off/' | grep off | wc -l) + +while [ $PGOOD == 0 ]; do + echo "!OFF" +sleep 1 +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power pgood \ + | sed 's/i\s*[0]/off/' | grep off | wc -l) +done +echo "pgood = OFF" \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off@.service b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off@.service new file mode 100644 index 000000000..0dcc897ce --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-off@.service @@ -0,0 +1,23 @@ +[Unit] +Description=Wait for Power%i to turn off +Before=obmc-power-off@%i.target +Wants=obmc-power-stop@%i.target +Before=obmc-power-stop@%i.target +Wants=obmc-power-stop-pre@%i.target +After=obmc-power-stop-pre@%i.target +Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=intel-wait-host-off@%i.service +Conflicts=obmc-chassis-poweron@%i.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/intel-wait-power-off.sh +ExecStartPost=/bin/rm -f /run/openbmc/chassis@%i-on +ExecStartPost=/bin/rm -f /run/openbmc/host@%i-request +SyslogIdentifier=intel-wait-power-off +TimeoutSec=15 + +[Install] +WantedBy=obmc-host-stop@%i.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on.sh b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on.sh new file mode 100755 index 000000000..970e5a420 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright 2019 Intel Corporation +# +# 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. +# +# + +echo "wait for pgood = ON" +SERVICE=$(mapper get-service /xyz/openbmc_project/Chassis/Control/Power0) +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power pgood \ + | sed 's/i\s*[1]/on/' | grep on | wc -l) + +while [ $PGOOD == 0 ]; do + echo "!ON" +sleep 1 +PGOOD=$(busctl get-property $SERVICE \ + /xyz/openbmc_project/Chassis/Control/Power0 xyz.openbmc_project.Chassis.Control.Power pgood \ + | sed 's/i\s*[1]/on/' | grep on | wc -l) +done +echo "pgood = ON" \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on@.service b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on@.service new file mode 100644 index 000000000..140ee5b8d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/intel-wait-power-on@.service @@ -0,0 +1,21 @@ +[Unit] +Description=Wait for Power%i to turn on +Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service +After=intel-power-start@%i.service +Before=intel-wait-host-on@%i.service +Conflicts=obmc-chassis-poweroff@%i.target +ConditionPathExists=!/run/openbmc/chassis@%i-on + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/intel-wait-power-on.sh + +ExecStartPost=/bin/sh -c "mkdir -p /run/openbmc/ && touch /run/openbmc/chassis@%i-on" + +SyslogIdentifier=intel-wait-power-on +TimeoutSec=15 + +[Install] +WantedBy=obmc-host-start@%i.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-hard-poweroff@.target b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-hard-poweroff@.target index 9a9902f7c..265a48982 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-hard-poweroff@.target +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-hard-poweroff@.target @@ -7,6 +7,5 @@ After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service Conflicts=obmc-chassis-poweron@%i.target Conflicts=obmc-chassis-reset@%i.target Conflicts=obmc-host-shutdown@%i.target -Conflicts=xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service RefuseManualStop=yes diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-poweron@.target b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-poweron@.target index f8fecf2a6..e95e46353 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-poweron@.target +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-chassis-poweron@.target @@ -6,5 +6,4 @@ Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service Conflicts=obmc-chassis-poweroff@%i.target RefuseManualStop=yes -OnFailure=obmc-chassis-poweroff@%i.target OnFailureJobMode=flush diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-shutdown@.target b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-shutdown@.target new file mode 100644 index 000000000..585886b26 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-shutdown@.target @@ -0,0 +1,5 @@ +[Unit] +Description=Power%i Host Off +Wants=multi-user.target +RefuseManualStop=yes +OnFailureJobMode=flush diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-start@.target b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-start@.target index 425953d4d..2f8c24929 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-start@.target +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-start@.target @@ -6,5 +6,4 @@ Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service Conflicts=obmc-host-stop@%i.target RefuseManualStop=yes -OnFailure=obmc-host-quiesce@%i.target OnFailureJobMode=flush \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-stop@.target b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-stop@.target index 0693db6e5..625eda8ee 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-stop@.target +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-stop@.target @@ -6,5 +6,4 @@ Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service Conflicts=obmc-host-startmin@%i.target RefuseManualStop=yes -OnFailure=obmc-chassis-poweroff@%i.target OnFailureJobMode=flush \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-warm-reset@.target b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-warm-reset@.target index 8aed937e7..8fc9358e2 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-warm-reset@.target +++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control/obmc-host-warm-reset@.target @@ -6,5 +6,4 @@ Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Chassis%i.service Conflicts=obmc-host-stop@%i.target RefuseManualStop=yes -OnFailure=obmc-host-quiesce@%i.target OnFailureJobMode=flush diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb index b44b3f3ec..3abbb16fb 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb @@ -1,8 +1,8 @@ SUMMARY = "SMBIOS MDR version 1 service for Intel based platform" DESCRIPTION = "SMBIOS MDR version 1 service for Intel based platfrom" -SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh" -SRCREV = "785f19b128794611574ea6c18805740fb851ecff" +SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" +SRCREV = "ec8f1c06be71d6059c82fd442475420286f5dbcd" S = "${WORKDIR}/git/services/smbios/" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb index ab696c051..1a39c0017 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb @@ -1,8 +1,8 @@ SUMMARY = "SMBIOS MDR version 2 service for Intel based platform" DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom" -SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh" -SRCREV = "785f19b128794611574ea6c18805740fb851ecff" +SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" +SRCREV = "ec8f1c06be71d6059c82fd442475420286f5dbcd" S = "${WORKDIR}/git/services/smbios-mdrv2/" -- cgit v1.2.3