Brad Bishop | dd12ede | 2019-05-13 14:46:48 -0400 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 2 | |
| 3 | # Package configuration |
Brad Bishop | a29c2d5 | 2019-07-17 17:35:55 -0400 | [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 | |
| 8 | FAN_PACKAGES_append_mihawk = " \ |
| 9 | phosphor-cooling-type \ |
| 10 | " |
Brandon Wyman | 5b42b74 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 11 | |
Brad Bishop | a29c2d5 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 12 | PACKAGECONFIG_append_ibm-ac-server = " cooling-type" |
Ben_Pai | fba5121 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 13 | PACKAGECONFIG_append_mihawk = " cooling-type" |
Brandon Wyman | 5b42b74 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 14 | |
Brandon Wyman | 5b42b74 | 2017-06-09 17:50:42 -0500 | [diff] [blame] | 15 | TMPL_COOLING = "phosphor-cooling-type@.service" |
| 16 | INSTFMT_COOLING = "phosphor-cooling-type@{0}.service" |
Matthew Barth | 1f00505 | 2019-09-20 09:56:35 -0500 | [diff] [blame] | 17 | MULTI_USR_TGT = "multi-user.target" |
| 18 | FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 19 | |
Brad Bishop | a29c2d5 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 20 | FILES_phosphor-cooling-type_append_ibm-ac-server = " ${bindir}/phosphor-cooling-type" |
| 21 | SYSTEMD_SERVICE_phosphor-cooling-type_append_ibm-ac-server = " ${TMPL_COOLING}" |
| 22 | SYSTEMD_LINK_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}" |
Ben_Pai | fba5121 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 23 | FILES_phosphor-cooling-type_append_mihawk = " ${bindir}/phosphor-cooling-type" |
| 24 | SYSTEMD_SERVICE_phosphor-cooling-type_append_mihawk = " ${TMPL_COOLING}" |
| 25 | SYSTEMD_LINK_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 26 | |
| 27 | COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf" |
| 28 | |
Brad Bishop | a29c2d5 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 29 | SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
Ben_Pai | fba5121 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 30 | SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
Brandon Wyman | c50a8c4 | 2017-04-28 18:26:45 -0500 | [diff] [blame] | 31 | |
Matthew Barth | 770a1de | 2017-10-24 14:07:09 -0500 | [diff] [blame] | 32 | #These services are protected by the watchdog |
Matthew Barth | b2e743f | 2020-04-06 14:28:14 -0500 | [diff] [blame] | 33 | SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf" |
Matthew Barth | 8921e37 | 2019-04-12 13:43:18 -0500 | [diff] [blame] | 34 | SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf" |
| 35 | SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf" |
| 36 | SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf" |
Adriana Kobylak | 6234872 | 2021-03-25 16:40:34 +0000 | [diff] [blame] | 37 | SYSTEMD_OVERRIDE_phosphor-fan-control_p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf" |
| 38 | SYSTEMD_OVERRIDE_phosphor-fan-control_p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf" |
| 39 | SYSTEMD_OVERRIDE_phosphor-fan-monitor_p10bmc += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf" |
| 40 | 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] | 41 | |
Matthew Barth | 770a1de | 2017-10-24 14:07:09 -0500 | [diff] [blame] | 42 | #These services need to be stopped when watchdog expires |
Matthew Barth | 8921e37 | 2019-04-12 13:43:18 -0500 | [diff] [blame] | 43 | SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf" |
| 44 | SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf" |
Adriana Kobylak | 6234872 | 2021-03-25 16:40:34 +0000 | [diff] [blame] | 45 | SYSTEMD_OVERRIDE_phosphor-fan-control_p10bmc += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf" |
| 46 | 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] | 47 | |
Matthew Barth | b2e743f | 2020-04-06 14:28:14 -0500 | [diff] [blame] | 48 | # Witherspoon fan control service linking |
| 49 | # Link fan control init service |
| 50 | 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] | 51 | # Link fan control service to be started at standby |
| 52 | FMT_CONTROL_STDBY_witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}" |
| 53 | SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}" |
| 54 | # Link fan control service to also start at poweron |
| 55 | FMT_CONTROL_PWRON_witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}" |
| 56 | 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] | 57 | |
| 58 | # Enable the use of JSON on the fan applications that support it |
Matt Spinler | ab79e2a | 2021-01-25 15:25:11 -0600 | [diff] [blame] | 59 | PACKAGECONFIG_append_witherspoon = " json" |
| 60 | EXTRA_OECONF_append_witherspoon = " --disable-json-control" |
Matthew Barth | 035b616 | 2020-01-14 14:21:46 -0600 | [diff] [blame] | 61 | RDEPENDS_${PN}-presence-tach_append_witherspoon = " phosphor-fan-presence-config" |
Matthew Barth | 8daae52 | 2020-06-19 13:48:27 -0500 | [diff] [blame] | 62 | RDEPENDS_${PN}-monitor_append_witherspoon = " phosphor-fan-monitor-config" |
Matthew Barth | a3f54c8 | 2020-04-22 10:53:50 -0500 | [diff] [blame] | 63 | |
Adriana Kobylak | 6234872 | 2021-03-25 16:40:34 +0000 | [diff] [blame] | 64 | PACKAGECONFIG_append_p10bmc = " json sensor-monitor" |
| 65 | FAN_PACKAGES_append_p10bmc = " sensor-monitor" |
| 66 | RDEPENDS_${PN}-presence-tach_append_p10bmc = " phosphor-fan-presence-config" |
| 67 | RDEPENDS_${PN}-monitor_append_p10bmc = " phosphor-fan-monitor-config" |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 68 | |
| 69 | # Install fan control JSON config files |
Adriana Kobylak | 6234872 | 2021-03-25 16:40:34 +0000 | [diff] [blame] | 70 | SRC_URI_append_p10bmc = " \ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 71 | file://manager.json \ |
| 72 | file://rainier/fans.json \ |
Andrew Geissler | a8887be | 2021-03-23 16:34:45 -0500 | [diff] [blame] | 73 | file://rainier-1s4u/fans.json \ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 74 | file://rainier-2u/zones.json \ |
| 75 | file://rainier-4u/zones.json \ |
Andrew Geissler | c22ef04 | 2021-03-23 18:25:27 -0500 | [diff] [blame] | 76 | file://rainier-1s4u/zones.json \ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 77 | file://everest/fans.json \ |
| 78 | file://everest/zones.json" |
Adriana Kobylak | 6234872 | 2021-03-25 16:40:34 +0000 | [diff] [blame] | 79 | do_install_append_p10bmc() { |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 80 | # Install fan control manager config file |
| 81 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ |
| 82 | install -m 0644 ${WORKDIR}/manager.json ${D}/${datadir}/phosphor-fan-presence/control/ |
| 83 | |
| 84 | # Install Rainier-2U/4U fan config files |
| 85 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier |
Andrew Geissler | a8887be | 2021-03-23 16:34:45 -0500 | [diff] [blame] | 86 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-1s4u |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 87 | install -m 0644 ${WORKDIR}/rainier/fans.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier/ |
Andrew Geissler | a8887be | 2021-03-23 16:34:45 -0500 | [diff] [blame] | 88 | install -m 0644 ${WORKDIR}/rainier-1s4u/fans.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-1s4u/ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 89 | |
| 90 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-2u/ |
| 91 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-4u/ |
Andrew Geissler | c22ef04 | 2021-03-23 18:25:27 -0500 | [diff] [blame] | 92 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-1s4u/ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 93 | install -m 0644 ${WORKDIR}/rainier-2u/zones.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-2u/ |
| 94 | install -m 0644 ${WORKDIR}/rainier-4u/zones.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-4u/ |
Andrew Geissler | c22ef04 | 2021-03-23 18:25:27 -0500 | [diff] [blame] | 95 | install -m 0644 ${WORKDIR}/rainier-1s4u/zones.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,rainier-1s4u/ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 96 | |
| 97 | # Install Everest fan config files |
| 98 | install -d ${D}/${datadir}/phosphor-fan-presence/control/ibm,everest |
| 99 | install -m 0644 ${WORKDIR}/everest/fans.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,everest/ |
| 100 | install -m 0644 ${WORKDIR}/everest/zones.json ${D}/${datadir}/phosphor-fan-presence/control/ibm,everest/ |
| 101 | } |
Adriana Kobylak | 6234872 | 2021-03-25 16:40:34 +0000 | [diff] [blame] | 102 | FILES_${PN}-control_append_p10bmc = " \ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 103 | ${datadir}/phosphor-fan-presence/control/manager.json \ |
| 104 | ${datadir}/phosphor-fan-presence/control/ibm,rainier/fans.json \ |
Andrew Geissler | a8887be | 2021-03-23 16:34:45 -0500 | [diff] [blame] | 105 | ${datadir}/phosphor-fan-presence/control/ibm,rainier-1s4u/fans.json \ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 106 | ${datadir}/phosphor-fan-presence/control/ibm,rainier-2u/zones.json \ |
| 107 | ${datadir}/phosphor-fan-presence/control/ibm,rainier-4u/zones.json \ |
Andrew Geissler | c22ef04 | 2021-03-23 18:25:27 -0500 | [diff] [blame] | 108 | ${datadir}/phosphor-fan-presence/control/ibm,rainier-1s4u/zones.json \ |
Matthew Barth | 530e1d8 | 2020-11-23 19:40:56 -0600 | [diff] [blame] | 109 | ${datadir}/phosphor-fan-presence/control/ibm,everest/fans.json \ |
| 110 | ${datadir}/phosphor-fan-presence/control/ibm,everest/zones.json" |
| 111 | |
Matthew Barth | a3f54c8 | 2020-04-22 10:53:50 -0500 | [diff] [blame] | 112 | # Set the appropriate i2c address used within the overridden phosphor-fan-control@.service |
| 113 | # file that's used for witherspoon type(including witherspoon-tacoma) machines |
| 114 | SYSTEMD_SUBSTITUTIONS_witherspoon = "ADDR:100:phosphor-fan-control@.service" |
| 115 | SYSTEMD_SUBSTITUTIONS_witherspoon-tacoma = "ADDR:200:phosphor-fan-control@.service" |