diff options
author | George Hung <george.hung@quantatw.com> | 2020-05-12 11:56:27 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-06-08 22:24:34 +0300 |
commit | 390901315e9a710fba42b20a4287d7e67d3fedb1 (patch) | |
tree | eb7b413d3478396c4c83c0048ab7be013b1a5292 /meta-quanta | |
parent | 8bb7af7435fc42f4992748bbed1e6c51822d5ca8 (diff) | |
download | openbmc-390901315e9a710fba42b20a4287d7e67d3fedb1.tar.xz |
meta-quanta: gbs: add Hotswap Power Cycle Service
Add a hotswap power cycle service for oem google sys
command, "Delay hard reset".
Tested:
Setting 5 secs delay for delay hard reset:
~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x05 0x00 0x00 0x00
79 2b 00 03
(From meta-quanta rev: 4f20ff8ff1a9ea91f0e2a4f55ec7a2525bfc8a9a)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: Ib114ba2c47d652cb9c9999b45b503698e7fc5207
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-quanta')
-rw-r--r-- | meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service | 14 | ||||
-rw-r--r-- | meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb | 21 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service new file mode 100644 index 0000000000..57724f353f --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service @@ -0,0 +1,14 @@ +[Unit] +Description=Power Cycle by Hotswap Controller + +[Service] +EnvironmentFile=/run/psu_timedelay +ExecStartPre=sleep $PSU_HARDRESET_DELAY +ExecStart=gpioset gpiochip6 26=1 +Restart=no +Type=oneshot +RemainAfterExit=true +StandardOutput=syslog + +[Install] +WantedBy=gbmc-psu-hardreset.target diff --git a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb new file mode 100644 index 0000000000..1a20beec71 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/gbs-hotswap-power-cycle.bb @@ -0,0 +1,21 @@ +SUMMARY = "Power Cycle by Hotswap Controller" +DESCRIPTION = "Power Cycle by Hotswap Controller Daemon" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd + +DEPENDS += "systemd" +RDEPENDS_${PN} += "bash" + +SRC_URI = " file://hotswap-power-cycle.service" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/hotswap-power-cycle.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "hotswap-power-cycle.service" + |