Bare-metal:  post complete GPIO monitor

This creates a service that monitors the post complete gpio, it
reenabled ipmi when gpio is deasserted. And at the startup it checks the
gpio and disable ipmi if it is asserted.

Tested:
1. reset host, ipmi is re-enabled
2. reboot bmc, ipmi is disabled after bmc booting up.

Change-Id: If52c72ce57e10f6efbb94fd3f0bdcb7655b48d61
Signed-off-by: John Wedig <johnwedig@google.com>
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/subprojects/bare-metal-host-monitor/meson.build b/subprojects/bare-metal-host-monitor/meson.build
new file mode 100644
index 0000000..dfed5eb
--- /dev/null
+++ b/subprojects/bare-metal-host-monitor/meson.build
@@ -0,0 +1,36 @@
+project(
+  'host_gpio_monitor',
+  'cpp',
+  version: '0.1',
+  meson_version: '>=1.1.1',
+  default_options: [
+    'warning_level=3',
+    'werror=true',
+    'cpp_std=c++23',
+  ],
+)
+
+executable(
+  'host_gpio_monitor',
+  'host_gpio_monitor.cpp',
+  implicit_include_directories: false,
+  dependencies:
+  [
+    dependency('stdplus'),
+    dependency('phosphor-logging'),
+  ],
+  install: true,
+  install_dir: get_option('libexecdir'),
+)
+
+systemd = dependency('systemd')
+systemunitdir = systemd.get_variable('systemdsystemunitdir')
+
+libexecdir = get_option('prefix') / get_option('libexecdir')
+
+configure_file(
+  configuration: {'BIN': libexecdir / 'host_gpio_monitor'},
+  input: 'host-gpio-monitor.service.in',
+  output: 'host-gpio-monitor.service',
+  install_mode: 'rw-r--r--',
+  install_dir: systemunitdir)