summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines
diff options
context:
space:
mode:
authorBrandon Wyman <bjwyman@gmail.com>2017-04-28 18:26:45 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-08 11:20:24 +0000
commitc50a8c4609786980960235b9f9913ea4dd125176 (patch)
tree45ad31f0028acc62eb339b05f6b48628eadf978e /meta-openbmc-machines
parentae2f2c9080769b14614e85e7ead1b7558da34d02 (diff)
downloadtalos-openbmc-c50a8c4609786980960235b9f9913ea4dd125176.tar.gz
talos-openbmc-c50a8c4609786980960235b9f9913ea4dd125176.zip
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>
Diffstat (limited to 'meta-openbmc-machines')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%.bbappend23
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/obmc/phosphor-fan/phosphor-cooling-type-0.conf6
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/phosphor-cooling-type@.service12
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend2
4 files changed, 42 insertions, 1 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%.bbappend
new file mode 100644
index 000000000..48bad3d14
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/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')}"
+
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/obmc/phosphor-fan/phosphor-cooling-type-0.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/obmc/phosphor-fan/phosphor-cooling-type-0.conf
new file mode 100644
index 000000000..334ded081
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/obmc/phosphor-fan/phosphor-cooling-type-0.conf
@@ -0,0 +1,6 @@
+OBJPATH="--path=/system/chassis"
+AIR="--air"
+WATER=""
+DEVICE="--dev=/dev/input/event0"
+CODE="--event=13"
+
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/phosphor-cooling-type@.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/phosphor-cooling-type@.service
new file mode 100644
index 000000000..62fd43804
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan%/phosphor-cooling-type@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor Cooling Type
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+ConditionPathExists={envfiledir}/phosphor-cooling-type-%i.conf
+
+[Service]
+EnvironmentFile={envfiledir}/phosphor-cooling-type-%i.conf
+ExecStart={sbindir}/phosphor-cooling-type ${{OBJPATH}} ${{AIR}} ${{WATER}} ${{DEVICE}} ${{CODE}}
+
+[Install]
+RequiredBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
index 672fe0b80..af3933ba7 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
@@ -1 +1 @@
-RDEPENDS_${PN}-inventory += "openpower-fru-vpd openpower-occ-control"
+RDEPENDS_${PN}-inventory += "openpower-fru-vpd openpower-occ-control phosphor-cooling-type"
OpenPOWER on IntegriCloud