Provide the quanta host power control.
systemctl start obmc-chassis-poweroff@0.target
systemctl start obmc-chassis-poweron@0.target
Added the host-gpio.service on boot to enable the power on
and power off scripts.
Testing: The scripts were launched with the state change commands above,
however they were modified such that they didn't rely on the old
namespace.
The GPIOs basically trigger the power button on the front panel.
Change-Id: I4a205e60c8f43f626f3ea0d4fedf182ccf4700ba
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
new file mode 100755
index 0000000..a0f0326
--- /dev/null
+++ b/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+GPIO_BASE=$(cat /sys/class/gpio/gpiochip*/base)
+GPIO_NUM=$(($GPIO_BASE + 24 + 3))
+
+echo 1 > /sys/class/gpio/gpio${GPIO_NUM}/value
+sleep 1
+echo 0 > /sys/class/gpio/gpio${GPIO_NUM}/value
+
+exit 0;