meta-hpe: Add time sync on boot and use x86-power-control

Add a post boot command to sync time
Use x86-power-control for chassis host power management

Signed-off-by: Mike Garrett <mike.garrett@hpe.com>
Change-Id: I2f52cfc15eab4f2a63434e44b4e0c8f7d8eb0393
diff --git a/meta-hpe/classes/hpe-rootfs-postcommands.bbclass b/meta-hpe/classes/hpe-rootfs-postcommands.bbclass
new file mode 100644
index 0000000..6980c23
--- /dev/null
+++ b/meta-hpe/classes/hpe-rootfs-postcommands.bbclass
@@ -0,0 +1,7 @@
+touch_var_lib_systemd_clock() {
+	install -d ${IMAGE_ROOTFS}/var/lib/systemd/timesync/
+	touch ${IMAGE_ROOTFS}/var/lib/systemd/timesync/clock
+}
+
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "touch_var_lib_systemd_clock; ", "", d)}'
+
diff --git a/meta-hpe/conf/machine/include/hpe.inc b/meta-hpe/conf/machine/include/hpe.inc
index fbd360c..74b1a2c 100644
--- a/meta-hpe/conf/machine/include/hpe.inc
+++ b/meta-hpe/conf/machine/include/hpe.inc
@@ -8,6 +8,9 @@
         obmc-bmc-state-mgmt \
         "
 
+VIRTUAL-RUNTIME_obmc-host-state-manager ?= "x86-power-control"
+VIRTUAL-RUNTIME_obmc-chassis-state-manager ?= "x86-power-control"
+
 PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-kcs"
 PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-hpe-apps"
 PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-hpe-apps"
@@ -16,4 +19,4 @@
 PREFERRED_PROVIDER_virtual/obmc-host-ctl ?= ""
 #PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-hostfw-config ?= "hostboot-inventory-config-native"
 
-IMAGE_FEATURES:remove = "obmc-fan-control"
+IMAGE_CLASSES:append = " hpe-rootfs-postcommands"