meta-romulus: Add id-button.bb

This recipe adds the function to assert/deassert identify LED Group
when the ID button is pressed:
1. Add phosphor-gpio-monitor for the ID button GPIO key;
2. Start id-button-pressed.service when the key is pressed;
3. The service starts a script to check the identify LED group state,
   and assert or de-assert it.

Tested: Assert/De-assert identify LED group by pressing the ID button
        on Romulus.

Change-Id: I782dbc15563a313418aa90bee1f48fc97a6d25fb
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/gpio/id-button.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/gpio/id-button.bb
new file mode 100644
index 0000000..7267ee3
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/gpio/id-button.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Romulus ID Button pressed application"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+DEPENDS += "virtual/obmc-gpio-monitor"
+RDEPENDS_${PN} += "virtual/obmc-gpio-monitor"
+
+S = "${WORKDIR}"
+SRC_URI += "file://toggle_identify_led.sh"
+
+do_install() {
+        install -d ${D}${bindir}
+        install -m 0755 ${WORKDIR}/toggle_identify_led.sh \
+            ${D}${bindir}/toggle_identify_led.sh
+}
+
+SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/id_button"
+
+ID_BUTTON_SERVICE = "id_button"
+
+TMPL = "phosphor-gpio-monitor@.service"
+INSTFMT = "phosphor-gpio-monitor@{0}.service"
+TGT = "${SYSTEMD_DEFAULT_TARGET}"
+FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "id-button-pressed.service"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'ID_BUTTON_SERVICE')}"