blob: dd5f3ca756a6f431e91f7a25204b271a61509a61 [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 +00008PACKAGECONFIG:append:ibm-ac-server = " cooling-type"
Brandon Wyman5b42b742017-06-09 17:50:42 -05009
Brandon Wyman5b42b742017-06-09 17:50:42 -050010TMPL_COOLING = "phosphor-cooling-type@.service"
11INSTFMT_COOLING = "phosphor-cooling-type@{0}.service"
Matthew Barth1f005052019-09-20 09:56:35 -050012MULTI_USR_TGT = "multi-user.target"
13FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050014
Adriana Kobylakb96c7502021-08-06 16:25:30 +000015FILES:phosphor-cooling-type:append:ibm-ac-server = " ${bindir}/phosphor-cooling-type"
16SYSTEMD_SERVICE:phosphor-cooling-type:append:ibm-ac-server = " ${TMPL_COOLING}"
Patrick Williamse83c2202021-09-01 16:17:33 -050017SYSTEMD_LINK:phosphor-cooling-type:append:ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050018
19COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf"
20
Patrick Williamse83c2202021-09-01 16:17:33 -050021SYSTEMD_ENVIRONMENT_FILE:phosphor-cooling-type:append:ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wymanc50a8c42017-04-28 18:26:45 -050022
Matthew Barth770a1de2017-10-24 14:07:09 -050023#These services are protected by the watchdog
Patrick Williamse83c2202021-09-01 16:17:33 -050024SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf"
25SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
26SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
27SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf"
28SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf"
29SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
30SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
31SYSTEMD_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 -050032
Matthew Barth770a1de2017-10-24 14:07:09 -050033#These services need to be stopped when watchdog expires
Patrick Williamse83c2202021-09-01 16:17:33 -050034SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
35SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf"
36SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
37SYSTEMD_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 -050038
Matthew Barthb2e743f2020-04-06 14:28:14 -050039# Witherspoon fan control service linking
40# Link fan control init service
Adriana Kobylakb96c7502021-08-06 16:25:30 +000041SYSTEMD_SERVICE:${PN}-control:witherspoon += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}"
Patrick Williamse83c2202021-09-01 16:17:33 -050042SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth1f005052019-09-20 09:56:35 -050043# Link fan control service to be started at standby
Adriana Kobylakb96c7502021-08-06 16:25:30 +000044FMT_CONTROL_STDBY:witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050045SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth1f005052019-09-20 09:56:35 -050046# Link fan control service to also start at poweron
Adriana Kobylakb96c7502021-08-06 16:25:30 +000047FMT_CONTROL_PWRON:witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050048SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}"
Matthew Barth035b6162020-01-14 14:21:46 -060049
50# Enable the use of JSON on the fan applications that support it
Adriana Kobylakb96c7502021-08-06 16:25:30 +000051PACKAGECONFIG:append:witherspoon = " json"
Matt Spinlercb262872022-08-12 21:44:17 +000052EXTRA_OEMESON:append:witherspoon = " -Djson-control=disabled"
Matthew Bartha3f54c82020-04-22 10:53:50 -050053
Adriana Kobylakb96c7502021-08-06 16:25:30 +000054PACKAGECONFIG:append:p10bmc = " json sensor-monitor"
Matthew Barth530e1d82020-11-23 19:40:56 -060055
Matthew Bartha3f54c82020-04-22 10:53:50 -050056# Set the appropriate i2c address used within the overridden phosphor-fan-control@.service
57# file that's used for witherspoon type(including witherspoon-tacoma) machines
Adriana Kobylakb96c7502021-08-06 16:25:30 +000058SYSTEMD_SUBSTITUTIONS:witherspoon = "ADDR:100:phosphor-fan-control@.service"
59SYSTEMD_SUBSTITUTIONS:witherspoon-tacoma = "ADDR:200:phosphor-fan-control@.service"
Matthew Barthb1b01592021-09-15 12:42:03 -050060
61# Set the PKG_DEFAULT_MACHINE name to "witherspoon" for tacoma so witherspoon's
62# JSON config files are installed on tacoma machines (since they use the same ones)
63PKG_DEFAULT_MACHINE:witherspoon-tacoma = "witherspoon"