1SUMMARY = "Generate fan control YAML from the MRW"
2PR = "r1"
3LICENSE = "Apache-2.0"
4
5inherit allarch
6inherit phosphor-fan
7inherit mrw-xml
8
9S = "${WORKDIR}"
10DEPENDS = "mrw-native mrw-perl-tools-native"
11PROVIDES += "virtual/phosphor-fan-control-fan-config"
12
13do_compile() {
14    ${bindir}/perl-native/perl \
15        ${bindir}/gen_fan_zone_yaml.pl \
16        -i ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} \
17        -o fans.yaml
18}
19
20do_install() {
21        install -D fans.yaml ${D}${control_datadir}/fans.yaml
22}
23
24FILES_${PN} += "${control_datadir}/fans.yaml"
25