blob: 64a1ffc899673ed08b84b0f0eb64b87ff99dbc9a [file] [log] [blame]
Adriana Kobylakb96c7502021-08-06 16:25:30 +00001FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
Brandon Wymanc50a8c42017-04-28 18:26:45 -05002
3# Package configuration
Adriana Kobylakb96c7502021-08-06 16:25:30 +00004FAN_PACKAGES:append:ibm-ac-server = " \
Brandon Wymanc50a8c42017-04-28 18:26:45 -05005 phosphor-cooling-type \
Ben_Paifba51212019-08-05 18:34:34 +08006 "
7
Adriana Kobylakb96c7502021-08-06 16:25:30 +00008FAN_PACKAGES:append:mihawk = " \
Ben_Paifba51212019-08-05 18:34:34 +08009 phosphor-cooling-type \
10 "
Brandon Wyman5b42b742017-06-09 17:50:42 -050011
Adriana Kobylakb96c7502021-08-06 16:25:30 +000012PACKAGECONFIG:append:ibm-ac-server = " cooling-type"
13PACKAGECONFIG:append:mihawk = " cooling-type"
Brandon Wyman5b42b742017-06-09 17:50:42 -050014
Brandon Wyman5b42b742017-06-09 17:50:42 -050015TMPL_COOLING = "phosphor-cooling-type@.service"
16INSTFMT_COOLING = "phosphor-cooling-type@{0}.service"
Matthew Barth1f005052019-09-20 09:56:35 -050017MULTI_USR_TGT = "multi-user.target"
18FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050019
Adriana Kobylakb96c7502021-08-06 16:25:30 +000020FILES:phosphor-cooling-type:append:ibm-ac-server = " ${bindir}/phosphor-cooling-type"
21SYSTEMD_SERVICE:phosphor-cooling-type:append:ibm-ac-server = " ${TMPL_COOLING}"
Patrick Williamse83c2202021-09-01 16:17:33 -050022SYSTEMD_LINK:phosphor-cooling-type:append:ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Adriana Kobylakb96c7502021-08-06 16:25:30 +000023FILES:phosphor-cooling-type:append:mihawk = " ${bindir}/phosphor-cooling-type"
24SYSTEMD_SERVICE:phosphor-cooling-type:append:mihawk = " ${TMPL_COOLING}"
Patrick Williamse83c2202021-09-01 16:17:33 -050025SYSTEMD_LINK:phosphor-cooling-type:append:mihawk = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050026
27COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf"
28
Patrick Williamse83c2202021-09-01 16:17:33 -050029SYSTEMD_ENVIRONMENT_FILE:phosphor-cooling-type:append:ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
30SYSTEMD_ENVIRONMENT_FILE:phosphor-cooling-type:append:mihawk = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050031
Matthew Barth770a1de2017-10-24 14:07:09 -050032#These services are protected by the watchdog
Patrick Williamse83c2202021-09-01 16:17:33 -050033SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf"
34SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
35SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
36SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf"
37SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf"
38SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
39SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
40SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf"
Matt Spinler99940142017-06-19 14:55:52 -050041
Matthew Barth770a1de2017-10-24 14:07:09 -050042#These services need to be stopped when watchdog expires
Patrick Williamse83c2202021-09-01 16:17:33 -050043SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
44SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf"
45SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
46SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf"
Matthew Barth1f005052019-09-20 09:56:35 -050047
Matthew Barthb2e743f2020-04-06 14:28:14 -050048# Witherspoon fan control service linking
49# Link fan control init service
Adriana Kobylakb96c7502021-08-06 16:25:30 +000050SYSTEMD_SERVICE:${PN}-control:witherspoon += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}"
Patrick Williamse83c2202021-09-01 16:17:33 -050051SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth1f005052019-09-20 09:56:35 -050052# Link fan control service to be started at standby
Adriana Kobylakb96c7502021-08-06 16:25:30 +000053FMT_CONTROL_STDBY:witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050054SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth1f005052019-09-20 09:56:35 -050055# Link fan control service to also start at poweron
Adriana Kobylakb96c7502021-08-06 16:25:30 +000056FMT_CONTROL_PWRON:witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050057SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth035b6162020-01-14 14:21:46 -060058
59# Enable the use of JSON on the fan applications that support it
Adriana Kobylakb96c7502021-08-06 16:25:30 +000060PACKAGECONFIG:append:witherspoon = " json"
Matt Spinlercb262872022-08-12 21:44:17 +000061EXTRA_OEMESON:append:witherspoon = " -Djson-control=disabled"
Matthew Bartha3f54c82020-04-22 10:53:50 -050062
Adriana Kobylakb96c7502021-08-06 16:25:30 +000063PACKAGECONFIG:append:p10bmc = " json sensor-monitor"
Matthew Barth530e1d82020-11-23 19:40:56 -060064
Matthew Bartha3f54c82020-04-22 10:53:50 -050065# 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
Adriana Kobylakb96c7502021-08-06 16:25:30 +000067SYSTEMD_SUBSTITUTIONS:witherspoon = "ADDR:100:phosphor-fan-control@.service"
68SYSTEMD_SUBSTITUTIONS:witherspoon-tacoma = "ADDR:200:phosphor-fan-control@.service"
Matthew Barthb1b01592021-09-15 12:42:03 -050069
70# Set the PKG_DEFAULT_MACHINE name to "witherspoon" for tacoma so witherspoon's
71# JSON config files are installed on tacoma machines (since they use the same ones)
72PKG_DEFAULT_MACHINE:witherspoon-tacoma = "witherspoon"