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" |
Brad Bishop | 0eaba74 | 2017-07-30 21:25:23 -0400 | [diff] [blame^] | 20 | DEPENDS += "libevdev" |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 21 | |
| 22 | # Package configuration |
| 23 | FAN_PACKAGES = " \ |
| 24 | ${PN}-presence-tach \ |
| 25 | ${PN}-control \ |
Matt Spinler | 39652c8 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 26 | ${PN}-monitor \ |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 27 | " |
Brandon Wyman | 0f78628 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 28 | |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 29 | PACKAGES_remove = "${PN}" |
| 30 | PACKAGES += "${FAN_PACKAGES}" |
Brandon Wyman | a7b4440 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 31 | PACKAGECONFIG ?= "presence control monitor" |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 32 | SYSTEMD_PACKAGES = "${FAN_PACKAGES}" |
| 33 | RDEPENDS_${PN}-dev = "${FAN_PACKAGES}" |
| 34 | RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}" |
| 35 | |
| 36 | # -------------------------------------- |
| 37 | # ${PN}-presence-tach specific configuration |
| 38 | PACKAGECONFIG[presence] = " \ |
| 39 | --enable-presence \ |
Brad Bishop | 9fb4ce6 | 2017-05-25 14:28:04 -0400 | [diff] [blame] | 40 | FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 41 | --disable-presence, \ |
| 42 | virtual/phosphor-fan-presence-config \ |
| 43 | , \ |
| 44 | " |
| 45 | RDEPENDS_${PN}-presence-tach += "sdbusplus" |
| 46 | |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 47 | # Needed to install into the obmc-chassis-poweron target |
| 48 | TMPL_TACH = "phosphor-fan-presence-tach@.service" |
| 49 | INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service" |
Matt Spinler | 29feaa3 | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 50 | POWERON_TGT = "obmc-chassis-poweron@{0}.target" |
| 51 | FMT_TACH = "../${TMPL_TACH}:${POWERON_TGT}.requires/${INSTFMT_TACH}" |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 52 | |
| 53 | FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 54 | SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL_TACH}" |
| 55 | 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] | 56 | |
| 57 | # -------------------------------------- |
| 58 | # ${PN}-control specific configuration |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 59 | PACKAGECONFIG[control] = "--enable-control \ |
| 60 | FAN_DEF_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/fans.yaml \ |
| 61 | FAN_ZONE_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zones.yaml \ |
Matthew Barth | 5f26abf | 2017-05-24 17:06:13 -0500 | [diff] [blame] | 62 | ZONE_EVENTS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/events.yaml \ |
Gunnar Mills | 9b6cc24 | 2017-06-26 11:35:38 -0500 | [diff] [blame] | 63 | ZONE_CONDITIONS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zone_conditions.yaml \ |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 64 | FAN_ZONE_OUTPUT_DIR=${S}/control, \ |
| 65 | --disable-control, \ |
| 66 | virtual/phosphor-fan-control-fan-config \ |
| 67 | phosphor-fan-control-zone-config-native \ |
Matthew Barth | 5f26abf | 2017-05-24 17:06:13 -0500 | [diff] [blame] | 68 | phosphor-fan-control-events-config-native \ |
Gunnar Mills | 9b6cc24 | 2017-06-26 11:35:38 -0500 | [diff] [blame] | 69 | phosphor-fan-control-zone-conditions-config-native \ |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 70 | , \ |
| 71 | " |
| 72 | |
| 73 | RDEPENDS_${PN}-control += "sdbusplus" |
| 74 | |
Matt Spinler | 29feaa3 | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 75 | FAN_CONTROL_TGT = "obmc-fan-control-ready@{0}.target" |
| 76 | |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 77 | TMPL_CONTROL = "phosphor-fan-control@.service" |
| 78 | INSTFMT_CONTROL = "phosphor-fan-control@{0}.service" |
Matt Spinler | 29feaa3 | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 79 | FMT_CONTROL = "../${TMPL_CONTROL}:${FAN_CONTROL_TGT}.requires/${INSTFMT_CONTROL}" |
| 80 | |
| 81 | TMPL_CONTROL_INIT = "phosphor-fan-control-init@.service" |
| 82 | INSTFMT_CONTROL_INIT = "phosphor-fan-control-init@{0}.service" |
| 83 | FMT_CONTROL_INIT = "../${TMPL_CONTROL_INIT}:${POWERON_TGT}.requires/${INSTFMT_CONTROL_INIT}" |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 84 | |
Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 85 | FILES_${PN}-control = "${sbindir}/phosphor-fan-control" |
Matt Spinler | 29feaa3 | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 86 | SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}" |
Matt Spinler | bd9fdd9 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 87 | SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}" |
Matt Spinler | 29feaa3 | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 88 | 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] | 89 | |
| 90 | # -------------------------------------- |
Matt Spinler | 39652c8 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 91 | # ${PN}-monitor specific configuration |
| 92 | PACKAGECONFIG[monitor] = "--enable-monitor \ |
| 93 | FAN_MONITOR_YAML_FILE=${STAGING_DIR_NATIVE}${monitor_datadir}/monitor.yaml \ |
| 94 | FAN_MONITOR_OUTPUT_DIR=${S}/monitor, \ |
| 95 | --disable-monitor, \ |
| 96 | phosphor-fan-monitor-config-native \ |
| 97 | , \ |
| 98 | " |
| 99 | |
| 100 | RDEPENDS_${PN}-monitor += "sdbusplus" |
| 101 | |
| 102 | TMPL_MONITOR = "phosphor-fan-monitor@.service" |
| 103 | INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service" |
Matt Spinler | 29feaa3 | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 104 | FMT_MONITOR = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}" |
Matt Spinler | 39652c8 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 105 | |
| 106 | FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor" |
| 107 | SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR}" |
| 108 | SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}" |
Brandon Wyman | 0f78628 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 109 | |
| 110 | # -------------------------------------- |
| 111 | # phosphor-cooling-type specific configuration |
Brad Bishop | 0eaba74 | 2017-07-30 21:25:23 -0400 | [diff] [blame^] | 112 | PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,," |