summaryrefslogtreecommitdiff
path: root/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend')
-rw-r--r--[l---------]meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
index 02a53b40e..b60a64b10 120000..100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -1 +1,12 @@
-phosphor-gpio-monitor.bbappend \ No newline at end of file
+FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
+
+TMPL_POWERSUPPLY = "phosphor-gpio-presence@.service"
+INSTFMT_POWERSUPPLY = "phosphor-gpio-presence@{0}.service"
+POWERSUPPLY_TGT = "${SYSTEMD_DEFAULT_TARGET}"
+FMT_POWERSUPPLY = "../${TMPL_POWERSUPPLY}:${POWERSUPPLY_TGT}.requires/${INSTFMT_POWERSUPPLY}"
+
+SYSTEMD_LINK_${PN}-presence += "${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+
+POWERSUPPLY_ENV_FMT = "obmc/gpio/phosphor-power-supply-{0}.conf"
+
+SYSTEMD_ENVIRONMENT_FILE_${PN}-presence += "${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"