diff options
author | ThuBaNguyen <thu@os.amperecomputing.com> | 2021-08-04 15:41:04 +0300 |
---|---|---|
committer | ThuBaNguyen <thu@os.amperecomputing.com> | 2021-08-04 16:35:23 +0300 |
commit | 9dccc52b92ae7a112469112029be7f08d55517b5 (patch) | |
tree | 5ddca5b052b832744bde715c53dd4a6e51f75162 /meta-ampere/meta-jade/recipes-ampere | |
parent | 99becbb128fb93a84197dafb8b7519dab5a65000 (diff) | |
download | openbmc-9dccc52b92ae7a112469112029be7f08d55517b5.tar.xz |
meta-ampere: power control: correct the script
The power functions are failed to work. There is one mistake in
merging ampere_power_utils.sh script. This commit fixes the mistake.
Tested:
1. Power off the host when it is on.
2. The host state should be changed to off.
Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com>
Change-Id: Iaa253e4b8d0f645a2b7097501e8c602d693cb37a
Diffstat (limited to 'meta-ampere/meta-jade/recipes-ampere')
-rw-r--r-- | meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh index 4ad07a68f..2c8ba3d91 100644 --- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh +++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-utils/ampere_power_util.sh @@ -4,7 +4,7 @@ source /usr/sbin/gpio-defs.sh # Usage of this utility function usage() { - echo "usage: power-util mb [on|status|cycle|reset|graceful_reset|force_reset|soft_off]"; + echo "usage: power-util mb [status|shutdown_ack|force_reset|soft_off]"; } power_status() { @@ -22,24 +22,8 @@ shutdown_ack() { touch /run/openbmc/host@0-softpoweroff-shutdown-ack else echo "Receive shutdown ACK triggered" -<<<<<<< HEAD - fi -} - -graceful_shutdown() { - if [ -f "/run/openbmc/host@0-request" ]; then - echo "shutdown host immediately" - power_off - else - echo "Triggering graceful shutdown" - gpioset -l 0 49=1 - sleep 1 - gpioset -l 0 49=0 - sleep 30s -======= sleep 3 systemctl start obmc-chassis-poweroff@0.target ->>>>>>> 397e033ef... meta-ampere: power control: refactor host power control fi } |