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