summaryrefslogtreecommitdiff
path: root/meta-ibm/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibm/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend')
-rw-r--r--meta-ibm/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-ibm/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
new file mode 100644
index 0000000000..04399f83c2
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -0,0 +1,16 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+TMPL_POWERSUPPLY = "phosphor-gpio-presence@.service"
+INSTFMT_POWERSUPPLY = "phosphor-gpio-presence@{0}.service"
+POWERSUPPLY_TGT = "multi-user.target"
+FMT_POWERSUPPLY = "../${TMPL_POWERSUPPLY}:${POWERSUPPLY_TGT}.requires/${INSTFMT_POWERSUPPLY}"
+
+SYSTEMD_LINK_${PN}-presence_append_ibm-ac-server = " ${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+SYSTEMD_LINK_${PN}-presence_append_mihawk = " ${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+SYSTEMD_LINK_${PN}-presence_append_rainier = " ${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+
+POWERSUPPLY_ENV_FMT = "obmc/gpio/phosphor-power-supply-{0}.conf"
+
+SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_append_ibm-ac-server = " ${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_append_mihawk = " ${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_append_rainier = " ${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"