10e04b2e9SBrad BishopSUMMARY = "Generate fan control YAML from the MRW"
20e04b2e9SBrad BishopPR = "r1"
30e04b2e9SBrad BishopLICENSE = "Apache-2.0"
40e04b2e9SBrad Bishop
50e04b2e9SBrad Bishopinherit allarch
60e04b2e9SBrad Bishopinherit phosphor-fan
70e04b2e9SBrad Bishopinherit mrw-xml
80e04b2e9SBrad Bishop
90e04b2e9SBrad BishopS = "${WORKDIR}"
100e04b2e9SBrad BishopDEPENDS = "mrw-native mrw-perl-tools-native"
110e04b2e9SBrad BishopPROVIDES += "virtual/phosphor-fan-control-fan-config"
120e04b2e9SBrad Bishop
130e04b2e9SBrad Bishopdo_compile() {
140e04b2e9SBrad Bishop    ${bindir}/perl-native/perl \
150e04b2e9SBrad Bishop        ${bindir}/gen_fan_zone_yaml.pl \
160e04b2e9SBrad Bishop        -i ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} \
170e04b2e9SBrad Bishop        -o fans.yaml
180e04b2e9SBrad Bishop}
190e04b2e9SBrad Bishop
200e04b2e9SBrad Bishopdo_install() {
210e04b2e9SBrad Bishop        install -D fans.yaml ${D}${control_datadir}/fans.yaml
220e04b2e9SBrad Bishop}
230e04b2e9SBrad Bishop
24*12fc939cSPatrick WilliamsFILES:${PN} += "${control_datadir}/fans.yaml"
25