diff options
author | George Hung <george.hung@quantatw.com> | 2021-04-16 12:25:30 +0300 |
---|---|---|
committer | George Hung <george.hung@quantatw.com> | 2021-04-21 04:27:02 +0300 |
commit | 5c037eda1228ec2f46daf9f03852580c08aba234 (patch) | |
tree | 4c8a778fed3da4ccbe4e6badcb891f811509847e /meta-quanta/meta-gbs | |
parent | b424b53bde24af02856695058d34635c1c68e127 (diff) | |
download | openbmc-5c037eda1228ec2f46daf9f03852580c08aba234.tar.xz |
meta-quanta: gbs: back to upstream and enable chassis-system reset
- change back to x86-power-control upstream
- enable chassis-system reset for hard power cycle
by Redfish
Usage by Redfish:
curl -k -u ${username}:${password}
https://${bmcip}/redfish/v1/Chassis/chassis/Actions/Chassis.Reset
-d '{"ResetType": "PowerCycle"}'
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: Icff87d590c911289cb15bdc34dafce69e55c9e2a
Diffstat (limited to 'meta-quanta/meta-gbs')
3 files changed, 31 insertions, 3 deletions
diff --git a/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control/chassis-system-reset.service b/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control/chassis-system-reset.service new file mode 100644 index 000000000..668195482 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control/chassis-system-reset.service @@ -0,0 +1,10 @@ +[Unit] +Description=System unit to hard reset or system reset chassis + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/tray_powercycle.sh + +[Install] +WantedBy=chassis-system-reset.target diff --git a/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control/power-config-host0.json b/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control/power-config-host0.json new file mode 100644 index 000000000..d9d3ed109 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control/power-config-host0.json @@ -0,0 +1,8 @@ +{ + "PostComplete": "POST_COMPLETE", + "PwrButton": "POWER_BUTTON", + "PwrOK": "PS_PWROK", + "PwrOut": "POWER_OUT", + "RstButton": "RESET_BUTTON", + "RstOut": "RESET_OUT" +} diff --git a/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control_%.bbappend index 804fcb022..33cc6d4e0 100644 --- a/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control_%.bbappend +++ b/meta-quanta/meta-gbs/recipes-x86/chassis/x86-power-control_%.bbappend @@ -1,4 +1,14 @@ -SRC_URI_gbs = "git://github.com/quanta-bmc/x86-power-control.git" -SRCREV_gbs = "70389494989e438af6b8b1d3b4db602a68f2f9da" +FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:" +SRC_URI_append_gbs = " file://power-config-host0.json \ + file://chassis-system-reset.service \ + " -SYSTEMD_SERVICE_${PN}_gbs = "xyz.openbmc_project.Chassis.Control.Power.service" +EXTRA_OECMAKE_append_gbs = " -DCHASSIS_SYSTEM_RESET=ON" + +RDEPENDS_${PN}_append_gbs = " bash" +RDEPENDS_${PN}_append_gbs = " gbs-hotswap-power-cycle" + +do_install_append_gbs() { + install -d ${D}${datadir}/${PN} + install -m 0644 ${WORKDIR}/power-config-host0.json ${D}${datadir}/${PN} +} |