Create recipe files for phosphor-cooling-type
Adding service file for this application. Environment file for Witherspoon.
This is currently the only system known to really need this check for water
cooling property to be set/updated.
Resolves openbmc/openbmc#370
Change-Id: I978de38d09111c38d77e1ca4b287724243acf0a9
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%.bbappend b/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%.bbappend
new file mode 100644
index 0000000..48bad3d
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%.bbappend
@@ -0,0 +1,23 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PACKAGECONFIG += "cooling-type"
+
+# Package configuration
+FAN_PACKAGES += " \
+ phosphor-cooling-type \
+"
+RDEPENDS_phosphor-cooling-type += "libevdev"
+
+COOLING_TMPL = "phosphor-cooling-type@.service"
+COOLING_INSTFMT = "phosphor-cooling-type@{0}.service"
+COOLING_TGT = "${SYSTEMD_DEFAULT_TARGET}"
+COOLING_FMT = "../${COOLING_TMPL}:${COOLING_TGT}.requires/${COOLING_INSTFMT}"
+
+FILES_phosphor-cooling-type = "${sbindir}/phosphor-cooling-type"
+SYSTEMD_SERVICE_phosphor-cooling-type += "${COOLING_TMPL}"
+SYSTEMD_LINK_phosphor-cooling-type += "${@compose_list(d, 'COOLING_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+
+COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf"
+
+SYSTEMD_ENVIRONMENT_FILE_phosphor-chassis-cooling-type += "${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+