Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 2 | |
| 3 | # Package configuration |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 4 | FAN_PACKAGES:append:ibm-ac-server = " \ |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 5 | phosphor-cooling-type \ |
Ben_Pai | fba5121 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 6 | " |
| 7 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 8 | PACKAGECONFIG:append:ibm-ac-server = " cooling-type" |
Brandon Wyman | 5b42b74 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 9 | |
Brandon Wyman | 5b42b74 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 10 | TMPL_COOLING = "phosphor-cooling-type@.service" |
| 11 | INSTFMT_COOLING = "phosphor-cooling-type@{0}.service" |
Matthew Barth | 1f00505 | 2019-09-20 09:56:35 -0500 | [diff] [blame] | 12 | MULTI_USR_TGT = "multi-user.target" |
| 13 | FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 14 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 15 | FILES:phosphor-cooling-type:append:ibm-ac-server = " ${bindir}/phosphor-cooling-type" |
| 16 | SYSTEMD_SERVICE:phosphor-cooling-type:append:ibm-ac-server = " ${TMPL_COOLING}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 17 | SYSTEMD_LINK:phosphor-cooling-type:append:ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 18 | |
| 19 | COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf" |
| 20 | |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 21 | SYSTEMD_ENVIRONMENT_FILE:phosphor-cooling-type:append:ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 22 | |
Matthew Barth | 770a1de | 2017-10-24 14:07:09 -0500 | [diff] [blame] | 23 | #These services are protected by the watchdog |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 24 | SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf" |
| 25 | SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf" |
| 26 | SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf" |
| 27 | SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf" |
| 28 | SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf" |
| 29 | SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf" |
| 30 | SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf" |
| 31 | SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf" |
Matt Spinler | 9994014 | 2017-06-19 14:55:52 -0500 | [diff] [blame] | 32 | |
Matthew Barth | 770a1de | 2017-10-24 14:07:09 -0500 | [diff] [blame] | 33 | #These services need to be stopped when watchdog expires |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 34 | SYSTEMD_OVERRIDE:phosphor-fan-control:witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf" |
| 35 | SYSTEMD_OVERRIDE:phosphor-fan-monitor:witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf" |
| 36 | SYSTEMD_OVERRIDE:phosphor-fan-control:p10bmc += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf" |
| 37 | SYSTEMD_OVERRIDE:phosphor-fan-monitor:p10bmc += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf" |
Matthew Barth | 1f00505 | 2019-09-20 09:56:35 -0500 | [diff] [blame] | 38 | |
Matthew Barth | b2e743f | 2020-04-06 14:28:14 -0500 | [diff] [blame] | 39 | # Witherspoon fan control service linking |
| 40 | # Link fan control init service |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 41 | SYSTEMD_SERVICE:${PN}-control:witherspoon += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 42 | SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}" |
Matthew Barth | 1f00505 | 2019-09-20 09:56:35 -0500 | [diff] [blame] | 43 | # Link fan control service to be started at standby |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 44 | FMT_CONTROL_STDBY:witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 45 | SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}" |
Matthew Barth | 1f00505 | 2019-09-20 09:56:35 -0500 | [diff] [blame] | 46 | # Link fan control service to also start at poweron |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 47 | FMT_CONTROL_PWRON:witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 48 | SYSTEMD_LINK:${PN}-control:witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}" |
Matthew Barth | 035b616 | 2020-01-14 14:21:46 -0600 | [diff] [blame] | 49 | |
| 50 | # Enable the use of JSON on the fan applications that support it |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 51 | PACKAGECONFIG:append:witherspoon = " json" |
Matt Spinler | cb26287 | 2022-08-12 21:44:17 +0000 | [diff] [blame] | 52 | EXTRA_OEMESON:append:witherspoon = " -Djson-control=disabled" |
Matthew Barth | a3f54c8 | 2020-04-22 10:53:50 -0500 | [diff] [blame] | 53 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 54 | PACKAGECONFIG:append:p10bmc = " json sensor-monitor" |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 55 | |
Matthew Barth | a3f54c8 | 2020-04-22 10:53:50 -0500 | [diff] [blame] | 56 | # 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 Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 58 | SYSTEMD_SUBSTITUTIONS:witherspoon = "ADDR:100:phosphor-fan-control@.service" |
| 59 | SYSTEMD_SUBSTITUTIONS:witherspoon-tacoma = "ADDR:200:phosphor-fan-control@.service" |
Matthew Barth | b1b0159 | 2021-09-15 12:42:03 -0500 | [diff] [blame] | 60 | |
| 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) |
| 63 | PKG_DEFAULT_MACHINE:witherspoon-tacoma = "witherspoon" |