1SUMMARY = "Phosphor Fan" 2DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \ 3control applications." 4PR = "r1" 5PV = "1.0+git${SRCPV}" 6 7require ${PN}.inc 8 9inherit autotools pkgconfig pythonnative 10inherit obmc-phosphor-systemd 11inherit phosphor-fan 12 13S = "${WORKDIR}/git" 14 15# Common build dependencies 16DEPENDS += "autoconf-archive-native" 17DEPENDS += "python-pyyaml-native" 18DEPENDS += "python-mako-native" 19DEPENDS += "sdbusplus" 20DEPENDS += "sdbusplus-native" 21DEPENDS += "sdeventplus" 22DEPENDS += "gpioplus" 23DEPENDS += "phosphor-logging" 24DEPENDS += "libevdev" 25 26# Package configuration 27FAN_PACKAGES = " \ 28 ${PN}-presence-tach \ 29 ${PN}-control \ 30 ${PN}-monitor \ 31" 32 33ALLOW_EMPTY_${PN} = "1" 34PACKAGE_BEFORE_PN += "${FAN_PACKAGES}" 35PACKAGECONFIG ?= "presence control monitor" 36SYSTEMD_PACKAGES = "${FAN_PACKAGES}" 37 38# -------------------------------------- 39# ${PN}-presence-tach specific configuration 40PACKAGECONFIG[presence] = " \ 41 --enable-presence \ 42 PRESENCE_CONFIG=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ 43 --disable-presence, \ 44 virtual/phosphor-fan-presence-config \ 45 , \ 46" 47 48# Needed to install into the obmc-chassis-poweron target 49TMPL_TACH = "phosphor-fan-presence-tach@.service" 50INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service" 51POWERON_TGT = "obmc-chassis-poweron@{0}.target" 52FMT_TACH = "../${TMPL_TACH}:${POWERON_TGT}.requires/${INSTFMT_TACH}" 53 54FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" 55SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL_TACH}" 56SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}" 57 58# -------------------------------------- 59# ${PN}-control specific configuration 60PACKAGECONFIG[control] = "--enable-control \ 61 FAN_DEF_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/fans.yaml \ 62 FAN_ZONE_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zones.yaml \ 63 ZONE_EVENTS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/events.yaml \ 64 ZONE_CONDITIONS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zone_conditions.yaml \ 65 FAN_ZONE_OUTPUT_DIR=${S}/control, \ 66 --disable-control, \ 67 virtual/phosphor-fan-control-fan-config \ 68 phosphor-fan-control-zone-config-native \ 69 phosphor-fan-control-events-config-native \ 70 phosphor-fan-control-zone-conditions-config-native \ 71 , \ 72" 73 74FAN_CONTROL_TGT = "obmc-fan-control-ready@{0}.target" 75 76TMPL_CONTROL = "phosphor-fan-control@.service" 77INSTFMT_CONTROL = "phosphor-fan-control@{0}.service" 78FMT_CONTROL = "../${TMPL_CONTROL}:${FAN_CONTROL_TGT}.requires/${INSTFMT_CONTROL}" 79 80TMPL_CONTROL_INIT = "phosphor-fan-control-init@.service" 81INSTFMT_CONTROL_INIT = "phosphor-fan-control-init@{0}.service" 82FMT_CONTROL_INIT = "../${TMPL_CONTROL_INIT}:${POWERON_TGT}.wants/${INSTFMT_CONTROL_INIT}" 83 84FILES_${PN}-control = "${sbindir}/phosphor-fan-control" 85SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}" 86SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}" 87SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}" 88 89# -------------------------------------- 90# ${PN}-monitor specific configuration 91PACKAGECONFIG[monitor] = "--enable-monitor \ 92 FAN_MONITOR_YAML_FILE=${STAGING_DIR_NATIVE}${monitor_datadir}/monitor.yaml \ 93 FAN_MONITOR_OUTPUT_DIR=${S}/monitor, \ 94 --disable-monitor, \ 95 phosphor-fan-monitor-config-native \ 96 , \ 97" 98 99TMPL_MONITOR = "phosphor-fan-monitor@.service" 100INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service" 101FMT_MONITOR = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}" 102 103TMPL_MONITOR_INIT = "phosphor-fan-monitor-init@.service" 104INSTFMT_MONITOR_INIT = "phosphor-fan-monitor-init@{0}.service" 105FMT_MONITOR_INIT = "../${TMPL_MONITOR_INIT}:${POWERON_TGT}.wants/${INSTFMT_MONITOR_INIT}" 106 107FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor" 108SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR} ${TMPL_MONITOR_INIT}" 109SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}" 110SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES')}" 111 112# -------------------------------------- 113# phosphor-cooling-type specific configuration 114PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,," 115