blob: 834768ceec485264f0f8a2fee7a471dce952b61e [file] [log] [blame]
Matthew Barth5da3c222020-11-12 12:09:57 -06001SRCREV = "8e1b382122fed73e788d44f3a67cecbfbcc6972e"
2
Brad Bishopdd12ede2019-05-13 14:46:48 -04003FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
Brandon Wymanc50a8c42017-04-28 18:26:45 -05004
5# Package configuration
Brad Bishopa29c2d52019-07-17 17:35:55 -04006FAN_PACKAGES_append_ibm-ac-server = " \
Brandon Wymanc50a8c42017-04-28 18:26:45 -05007 phosphor-cooling-type \
Ben_Paifba51212019-08-05 18:34:34 +08008 "
9
10FAN_PACKAGES_append_mihawk = " \
11 phosphor-cooling-type \
12 "
Brandon Wyman5b42b742017-06-09 17:50:42 -050013
Brad Bishopa29c2d52019-07-17 17:35:55 -040014PACKAGECONFIG_append_ibm-ac-server = " cooling-type"
Ben_Paifba51212019-08-05 18:34:34 +080015PACKAGECONFIG_append_mihawk = " cooling-type"
Brandon Wyman5b42b742017-06-09 17:50:42 -050016
Brandon Wyman5b42b742017-06-09 17:50:42 -050017TMPL_COOLING = "phosphor-cooling-type@.service"
18INSTFMT_COOLING = "phosphor-cooling-type@{0}.service"
Matthew Barth1f005052019-09-20 09:56:35 -050019MULTI_USR_TGT = "multi-user.target"
20FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050021
Brad Bishopa29c2d52019-07-17 17:35:55 -040022FILES_phosphor-cooling-type_append_ibm-ac-server = " ${bindir}/phosphor-cooling-type"
23SYSTEMD_SERVICE_phosphor-cooling-type_append_ibm-ac-server = " ${TMPL_COOLING}"
24SYSTEMD_LINK_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Ben_Paifba51212019-08-05 18:34:34 +080025FILES_phosphor-cooling-type_append_mihawk = " ${bindir}/phosphor-cooling-type"
26SYSTEMD_SERVICE_phosphor-cooling-type_append_mihawk = " ${TMPL_COOLING}"
27SYSTEMD_LINK_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050028
29COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf"
30
Brad Bishopa29c2d52019-07-17 17:35:55 -040031SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
Ben_Paifba51212019-08-05 18:34:34 +080032SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050033
Matthew Barth770a1de2017-10-24 14:07:09 -050034#These services are protected by the watchdog
Matthew Barthb2e743f2020-04-06 14:28:14 -050035SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf"
Matthew Barth8921e372019-04-12 13:43:18 -050036SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
37SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
38SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf"
Matthew Barth2e833ed2020-05-12 16:36:07 -050039SYSTEMD_OVERRIDE_phosphor-fan-control_rainier += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf"
40SYSTEMD_OVERRIDE_phosphor-fan-control_rainier += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
41SYSTEMD_OVERRIDE_phosphor-fan-monitor_rainier += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
42SYSTEMD_OVERRIDE_phosphor-fan-monitor_rainier += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf"
Matt Spinler99940142017-06-19 14:55:52 -050043
Matthew Barth770a1de2017-10-24 14:07:09 -050044#These services need to be stopped when watchdog expires
Matthew Barth8921e372019-04-12 13:43:18 -050045SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
46SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf"
Matthew Barth2e833ed2020-05-12 16:36:07 -050047SYSTEMD_OVERRIDE_phosphor-fan-control_rainier += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
48SYSTEMD_OVERRIDE_phosphor-fan-monitor_rainier += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf"
Matthew Barth1f005052019-09-20 09:56:35 -050049
Matthew Barthb2e743f2020-04-06 14:28:14 -050050# Witherspoon fan control service linking
51# Link fan control init service
52SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth1f005052019-09-20 09:56:35 -050053# Link fan control service to be started at standby
54FMT_CONTROL_STDBY_witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}"
55SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}"
56# Link fan control service to also start at poweron
57FMT_CONTROL_PWRON_witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}"
58SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth035b6162020-01-14 14:21:46 -060059
60# Enable the use of JSON on the fan applications that support it
Matthew Barth5da3c222020-11-12 12:09:57 -060061EXTRA_OECONF_append_witherspoon = " --enable-json --disable-json-control"
Matthew Barth035b6162020-01-14 14:21:46 -060062RDEPENDS_${PN}-presence-tach_append_witherspoon = " phosphor-fan-presence-config"
Matthew Barth8daae522020-06-19 13:48:27 -050063RDEPENDS_${PN}-monitor_append_witherspoon = " phosphor-fan-monitor-config"
Matthew Bartha3f54c82020-04-22 10:53:50 -050064
65# Set the appropriate i2c address used within the overridden phosphor-fan-control@.service
66# file that's used for witherspoon type(including witherspoon-tacoma) machines
67SYSTEMD_SUBSTITUTIONS_witherspoon = "ADDR:100:phosphor-fan-control@.service"
68SYSTEMD_SUBSTITUTIONS_witherspoon-tacoma = "ADDR:200:phosphor-fan-control@.service"