diff options
author | Potin Lai <potin.lai@quantatw.com> | 2022-01-17 17:32:02 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-01-18 19:52:13 +0300 |
commit | 016db315a6b4dbf769503d446bceed0a8416d098 (patch) | |
tree | 042b1d52cdfa13bd1ca6ecaae61382cac71a1d6d | |
parent | c33f235676e9934cf8f9a6ac60ecdcc0da435374 (diff) | |
download | openbmc-016db315a6b4dbf769503d446bceed0a8416d098.tar.xz |
meta-bletchley: motor-ctrl: add host ac-on and ac-off service
1. add host-ac-on and host-ac-off service.
2. init host-ac-on during BMC boot.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ie3954297e20f35c9d1f723d9d5e74cee91ec32ac
3 files changed, 26 insertions, 0 deletions
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-off@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-off@.service new file mode 100644 index 0000000000..396261314b --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-off@.service @@ -0,0 +1,7 @@ +[Unit] +Description=Turn off AC at Sled%i + +[Service] +Type=oneshot +ExecStart=/usr/sbin/power-ctrl sled%i ac-off +SyslogIdentifier=power-ctrl diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service new file mode 100644 index 0000000000..69d604261d --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-ac-on@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Turn on AC at Sled%i +After=motor-init-calibration@%i.service + +[Service] +Type=oneshot +ExecStart=/usr/sbin/power-ctrl sled%i ac-on +SyslogIdentifier=power-ctrl + +[Install] +WantedBy=multi-user.target diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb index 2705eb850f..fac0cd421b 100644 --- a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb @@ -26,6 +26,8 @@ do_install() { MOTOR_INIT_INSTFMT= "motor-init-calibration@{0}.service" PWR_ON_INSTFMT="host-poweron@.service:host-poweron@{0}.service" PWR_OFF_INSTFMT="host-poweroff@.service:host-poweroff@{0}.service" +AC_ON_INSTFMT="host-ac-on@{0}.service" +AC_OFF_INSTFMT="host-ac-off@.service:host-ac-off@{0}.service" SYSTEMD_SERVICE:${PN} ="${@compose_list(d, 'MOTOR_INIT_INSTFMT', 'OBMC_HOST_INSTANCES')}" FILES:${PN} += "${systemd_system_unitdir}/motor-init-calibration@.service" @@ -35,3 +37,9 @@ SYSTEMD_LINK:${PN} += "${@compose_list(d, 'PWR_ON_INSTFMT', 'OBMC_HOST_INSTANCES SYSTEMD_SERVICE:${PN} +="host-poweroff@.service" SYSTEMD_LINK:${PN} += "${@compose_list(d, 'PWR_OFF_INSTFMT', 'OBMC_HOST_INSTANCES')}" + +SYSTEMD_SERVICE:${PN} +="${@compose_list(d, 'AC_ON_INSTFMT', 'OBMC_HOST_INSTANCES')}" +FILES:${PN} += "${systemd_system_unitdir}/host-ac-#@.service" + +SYSTEMD_SERVICE:${PN} +="host-ac-off@.service" +SYSTEMD_LINK:${PN} += "${@compose_list(d, 'AC_OFF_INSTFMT', 'OBMC_HOST_INSTANCES')}" |