summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/fans
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-04-17 16:34:24 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-05-05 23:26:24 +0000
commit565e329809329f0bd93baafb3d8dd47d0091c525 (patch)
tree3f08f7bb00094129ae4d7af5e2ca01f102610f11 /meta-phosphor/common/recipes-phosphor/fans
parentc7b071c9f765d94ef69debfbecb2ff649311dccf (diff)
downloadtalos-openbmc-565e329809329f0bd93baafb3d8dd47d0091c525.tar.gz
talos-openbmc-565e329809329f0bd93baafb3d8dd47d0091c525.zip
Recipes for installing fan definition yaml
This provides the phosphor-fan-control-fan-config virtual to define the fans required by phosphor-fan-control. On systems with the MRW, phosphor-fan-control-fan-config-mrw-native.bb will be used and will run a perl script to generate the yaml from data in the MRW XML. On systems without the MRW, if nothing else is done a default fans.yaml file will be installed into the correct location by phosphor-fan-control-fan-config-native.bb. To install a system specific version, put it into that system's layer along with a .bbappend of this recipe. Change-Id: I36889a33e16a456a04b94aba7326dd674bfd2904 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-control-fan-config-mrw-native.bb27
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-native.bb17
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml2
3 files changed, 46 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb
new file mode 100644
index 000000000..1eadadf52
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Generate fan control YAML from the MRW"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-fan
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ "
+
+PROVIDES += "virtual/phosphor-fan-control-fan-config"
+
+S = "${WORKDIR}"
+
+do_compile() {
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_fan_zone_yaml.pl \
+ -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -o ${S}/fans.yaml
+}
+
+do_install() {
+ DEST=${D}${control_datadir}
+ install -D ${S}/fans.yaml ${DEST}/fans.yaml
+}
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-native.bb
new file mode 100644
index 000000000..76b0985ca
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-native.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Phosphor fan definition example data"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-fan
+
+PROVIDES += "virtual/phosphor-fan-control-fan-config"
+
+SRC_URI += "file://fans.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${control_datadir}
+ install -D fans.yaml ${DEST}/fans.yaml
+}
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml
new file mode 100644
index 000000000..8a6c271f2
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml
@@ -0,0 +1,2 @@
+#Default fan definition YAML - empty.
+#For format, see documentation in fan control code repository example yaml.
OpenPOWER on IntegriCloud