Brad Bishop | bd9931f | 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" |
Brad Bishop | 04ff12c | 2018-01-26 21:48:20 -0500 | [diff] [blame] | 19 | DEPENDS += "sdbusplus-native" |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 20 | DEPENDS += "phosphor-logging" |
Brad Bishop | 4785fdf | 2017-07-30 21:25:23 -0400 | [diff] [blame] | 21 | DEPENDS += "libevdev" |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 22 | |
| 23 | # Package configuration |
| 24 | FAN_PACKAGES = " \ |
| 25 | ${PN}-presence-tach \ |
| 26 | ${PN}-control \ |
Matt Spinler | dd7a080 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 27 | ${PN}-monitor \ |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 28 | " |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 29 | |
Brad Bishop | 93df99a | 2018-04-11 11:41:50 -0400 | [diff] [blame] | 30 | ALLOW_EMPTY_${PN} = "1" |
| 31 | PACKAGE_BEFORE_PN += "${FAN_PACKAGES}" |
Brandon Wyman | 5b42b74 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 32 | PACKAGECONFIG ?= "presence control monitor" |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 33 | SYSTEMD_PACKAGES = "${FAN_PACKAGES}" |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 34 | |
| 35 | # -------------------------------------- |
| 36 | # ${PN}-presence-tach specific configuration |
| 37 | PACKAGECONFIG[presence] = " \ |
| 38 | --enable-presence \ |
Brad Bishop | 8861a87 | 2017-08-02 14:01:24 -0400 | [diff] [blame] | 39 | PRESENCE_CONFIG=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ |
Brad Bishop | bd9931f | 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 | c133ec1 | 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 | bde651b | 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 | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 51 | |
| 52 | FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" |
Matt Spinler | c133ec1 | 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 | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 55 | |
| 56 | # -------------------------------------- |
| 57 | # ${PN}-control specific configuration |
Matt Spinler | c133ec1 | 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 \ |
Matthew Barth | 2bfd71d | 2017-05-24 17:06:13 -0500 | [diff] [blame] | 61 | ZONE_EVENTS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/events.yaml \ |
Gunnar Mills | c8228da | 2017-06-26 11:35:38 -0500 | [diff] [blame] | 62 | ZONE_CONDITIONS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zone_conditions.yaml \ |
Matt Spinler | c133ec1 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 63 | FAN_ZONE_OUTPUT_DIR=${S}/control, \ |
| 64 | --disable-control, \ |
| 65 | virtual/phosphor-fan-control-fan-config \ |
| 66 | phosphor-fan-control-zone-config-native \ |
Matthew Barth | 2bfd71d | 2017-05-24 17:06:13 -0500 | [diff] [blame] | 67 | phosphor-fan-control-events-config-native \ |
Gunnar Mills | c8228da | 2017-06-26 11:35:38 -0500 | [diff] [blame] | 68 | phosphor-fan-control-zone-conditions-config-native \ |
Matt Spinler | c133ec1 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 69 | , \ |
| 70 | " |
| 71 | |
| 72 | RDEPENDS_${PN}-control += "sdbusplus" |
| 73 | |
Matt Spinler | bde651b | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 74 | FAN_CONTROL_TGT = "obmc-fan-control-ready@{0}.target" |
| 75 | |
Matt Spinler | c133ec1 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 76 | TMPL_CONTROL = "phosphor-fan-control@.service" |
| 77 | INSTFMT_CONTROL = "phosphor-fan-control@{0}.service" |
Matt Spinler | bde651b | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 78 | FMT_CONTROL = "../${TMPL_CONTROL}:${FAN_CONTROL_TGT}.requires/${INSTFMT_CONTROL}" |
| 79 | |
| 80 | TMPL_CONTROL_INIT = "phosphor-fan-control-init@.service" |
| 81 | INSTFMT_CONTROL_INIT = "phosphor-fan-control-init@{0}.service" |
Matthew Barth | b5e69d6 | 2017-10-24 14:04:46 -0500 | [diff] [blame] | 82 | FMT_CONTROL_INIT = "../${TMPL_CONTROL_INIT}:${POWERON_TGT}.wants/${INSTFMT_CONTROL_INIT}" |
Matt Spinler | c133ec1 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 83 | |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 84 | FILES_${PN}-control = "${sbindir}/phosphor-fan-control" |
Matt Spinler | bde651b | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 85 | SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}" |
Matt Spinler | c133ec1 | 2017-04-19 08:23:50 -0500 | [diff] [blame] | 86 | SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}" |
Matt Spinler | bde651b | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 87 | SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}" |
Brad Bishop | bd9931f | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 88 | |
| 89 | # -------------------------------------- |
Matt Spinler | dd7a080 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 90 | # ${PN}-monitor specific configuration |
| 91 | PACKAGECONFIG[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 | |
| 99 | RDEPENDS_${PN}-monitor += "sdbusplus" |
| 100 | |
| 101 | TMPL_MONITOR = "phosphor-fan-monitor@.service" |
| 102 | INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service" |
Matt Spinler | bde651b | 2017-05-16 10:49:57 -0500 | [diff] [blame] | 103 | FMT_MONITOR = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}" |
Matt Spinler | dd7a080 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 104 | |
Matthew Barth | cac2ecf | 2017-08-23 13:18:01 -0500 | [diff] [blame] | 105 | TMPL_MONITOR_INIT = "phosphor-fan-monitor-init@.service" |
| 106 | INSTFMT_MONITOR_INIT = "phosphor-fan-monitor-init@{0}.service" |
Matthew Barth | b5e69d6 | 2017-10-24 14:04:46 -0500 | [diff] [blame] | 107 | FMT_MONITOR_INIT = "../${TMPL_MONITOR_INIT}:${POWERON_TGT}.wants/${INSTFMT_MONITOR_INIT}" |
Matthew Barth | cac2ecf | 2017-08-23 13:18:01 -0500 | [diff] [blame] | 108 | |
Matt Spinler | dd7a080 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 109 | FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor" |
Matthew Barth | cac2ecf | 2017-08-23 13:18:01 -0500 | [diff] [blame] | 110 | SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR} ${TMPL_MONITOR_INIT}" |
Matt Spinler | dd7a080 | 2017-05-01 14:29:20 -0500 | [diff] [blame] | 111 | SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}" |
Matthew Barth | cac2ecf | 2017-08-23 13:18:01 -0500 | [diff] [blame] | 112 | SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES')}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 113 | |
| 114 | # -------------------------------------- |
| 115 | # phosphor-cooling-type specific configuration |
Brad Bishop | 4785fdf | 2017-07-30 21:25:23 -0400 | [diff] [blame] | 116 | PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,," |