meta-facebook: greatlakes: System state initialization

Description:
- System state initialization.

Design:
- Use script to determine 12V and host current state
  12V: use BMC gpio
  host: Use BIC gpio
- Set correct state on CurrentHostState property for host status
- Set correcr state on CurrentPowerState property for 12V status

Test Case:
1. 12V on and host off
2. 12V on and host on
3. 12V off and host off

Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Change-Id: Ibff1f6e79290cfb39dc5442c240e324b38c18ecd
diff --git a/meta-facebook/meta-greatlakes/recipes-greatlakes/greatlakes-sysinit/files/greatlakes-system-state-init@.service b/meta-facebook/meta-greatlakes/recipes-greatlakes/greatlakes-sysinit/files/greatlakes-system-state-init@.service
new file mode 100644
index 0000000..30e0279
--- /dev/null
+++ b/meta-facebook/meta-greatlakes/recipes-greatlakes/greatlakes-sysinit/files/greatlakes-system-state-init@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Greatlakes host state and chassis power state initialize for slot%i
+Before=phosphor-multi-gpio-monitor.service
+Wants=xyz.openbmc_project.State.Chassis@%i.service
+After=xyz.openbmc_project.State.Chassis@%i.service
+Wants=xyz.openbmc_project.State.Host@%i.service
+After=xyz.openbmc_project.State.Host@%i.service
+
+[Service]
+ExecStart=/usr/libexec/greatlakes-sysinit/greatlakes-system-state-init %i
+SyslogIdentifier=greatlakes-system-state-init slot%i
+Type=oneshot
+
+[Install]
+WantedBy=sysinit.target