summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/fans
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-04-19 08:23:50 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-05-11 20:05:51 +0000
commitc133ec1bbd42b7c6877d48cade7bf0274eb0890a (patch)
tree7bfc7a240549aa03d59b342702c6f41c12a822fb /meta-phosphor/common/recipes-phosphor/fans
parent14f965d8dc806d710218de18357ba7f106484a8e (diff)
downloadtalos-openbmc-c133ec1bbd42b7c6877d48cade7bf0274eb0890a.tar.gz
talos-openbmc-c133ec1bbd42b7c6877d48cade7bf0274eb0890a.zip
Install phosphor-fan-control app and service
Also move the fan presence and fan control services into obmc-power-chassis-on.target so they start as soon as power comes on so it covers cases when the boot stops at obmc-chassis-poweron.target. Resolves openbmc/openbmc#1445 Change-Id: Idc271a2d770d85bc1a4d51d8d1473ca8d0c73889 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/fans')
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb33
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-control@.service12
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service4
3 files changed, 39 insertions, 10 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
index 406dc6d70..736149cc5 100644
--- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb
@@ -42,20 +42,37 @@ PACKAGECONFIG[presence] = " \
"
RDEPENDS_${PN}-presence-tach += "sdbusplus"
-# Needed to install into the obmc-host-start target
-TMPL = "phosphor-fan-presence-tach@.service"
-INSTFMT = "phosphor-fan-presence-tach@{0}.service"
-TGTFMT = "obmc-host-start@{0}.target"
-FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+# Needed to install into the obmc-chassis-poweron target
+TMPL_TACH = "phosphor-fan-presence-tach@.service"
+INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service"
+TGTFMT = "obmc-chassis-poweron@{0}.target"
+FMT_TACH = "../${TMPL_TACH}:${TGTFMT}.requires/${INSTFMT_TACH}"
FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach"
-SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL}"
-SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL_TACH}"
+SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}"
# --------------------------------------
# ${PN}-control specific configuration
-PACKAGECONFIG[control] = "--enable-control,--disable-control,,"
+PACKAGECONFIG[control] = "--enable-control \
+ FAN_DEF_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/fans.yaml \
+ FAN_ZONE_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zones.yaml \
+ FAN_ZONE_OUTPUT_DIR=${S}/control, \
+ --disable-control, \
+ virtual/phosphor-fan-control-fan-config \
+ phosphor-fan-control-zone-config-native \
+ , \
+"
+
+RDEPENDS_${PN}-control += "sdbusplus"
+
+TMPL_CONTROL = "phosphor-fan-control@.service"
+INSTFMT_CONTROL = "phosphor-fan-control@{0}.service"
+FMT_CONTROL = "../${TMPL_CONTROL}:${TGTFMT}.requires/${INSTFMT_CONTROL}"
+
FILES_${PN}-control = "${sbindir}/phosphor-fan-control"
+SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL}"
+SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}"
# --------------------------------------
# phosphor-chassis-cooling-type specific configuration
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-control@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-control@.service
new file mode 100644
index 000000000..568ff1e11
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-control@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor Fan Control Daemon
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Conflicts=obmc-chassis-poweroff@%i.target
+
+[Service]
+Restart=on-failure
+ExecStart={sbindir}/phosphor-fan-control
+
+[Install]
+RequiredBy=obmc-chassis-poweron@%i.target
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service
index 8324fdb0c..c91ed4e68 100644
--- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service
@@ -2,11 +2,11 @@
Description=Phosphor Fan Presence Tach Daemon
Wants=obmc-power-on@%i.target
After=obmc-power-on@%i.target
-Conflicts=obmc-host-stop@%i.target
+Conflicts=obmc-chassis-poweroff@%i.target
[Service]
Restart=on-failure
ExecStart={sbindir}/phosphor-fan-presence-tach
[Install]
-RequiredBy=obmc-host-start@%i.target
+RequiredBy=obmc-chassis-poweron@%i.target
OpenPOWER on IntegriCloud