blob: 243a02f1c5e264358311baca3d39c5c0aed3a47b [file] [log] [blame]
Brad Bishop6587e6c2019-05-13 14:46:48 -04001FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
Brandon Wyman37e55d82017-04-28 18:26:45 -05002
3# Package configuration
Brad Bishopbb0e1d02019-07-17 17:35:55 -04004FAN_PACKAGES_append_ibm-ac-server = " \
Brandon Wyman37e55d82017-04-28 18:26:45 -05005 phosphor-cooling-type \
Ben_Pai949f9142019-08-05 18:34:34 +08006 "
7
8FAN_PACKAGES_append_mihawk = " \
9 phosphor-cooling-type \
10 "
Brandon Wyman23db01f2017-06-09 17:50:42 -050011
Brad Bishopbb0e1d02019-07-17 17:35:55 -040012PACKAGECONFIG_append_ibm-ac-server = " cooling-type"
Ben_Pai949f9142019-08-05 18:34:34 +080013PACKAGECONFIG_append_mihawk = " cooling-type"
Brandon Wyman23db01f2017-06-09 17:50:42 -050014
Brandon Wyman23db01f2017-06-09 17:50:42 -050015TMPL_COOLING = "phosphor-cooling-type@.service"
16INSTFMT_COOLING = "phosphor-cooling-type@{0}.service"
Matthew Barthf59761e2019-09-20 09:56:35 -050017MULTI_USR_TGT = "multi-user.target"
18FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}"
Brandon Wyman37e55d82017-04-28 18:26:45 -050019
Brad Bishopbb0e1d02019-07-17 17:35:55 -040020FILES_phosphor-cooling-type_append_ibm-ac-server = " ${bindir}/phosphor-cooling-type"
21SYSTEMD_SERVICE_phosphor-cooling-type_append_ibm-ac-server = " ${TMPL_COOLING}"
22SYSTEMD_LINK_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Ben_Pai949f9142019-08-05 18:34:34 +080023FILES_phosphor-cooling-type_append_mihawk = " ${bindir}/phosphor-cooling-type"
24SYSTEMD_SERVICE_phosphor-cooling-type_append_mihawk = " ${TMPL_COOLING}"
25SYSTEMD_LINK_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wyman37e55d82017-04-28 18:26:45 -050026
27COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf"
28
Brad Bishopbb0e1d02019-07-17 17:35:55 -040029SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
Ben_Pai949f9142019-08-05 18:34:34 +080030SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}"
Brandon Wyman37e55d82017-04-28 18:26:45 -050031
Matthew Barthceacb772017-10-24 14:07:09 -050032#These services are protected by the watchdog
Matthew Barth2eb5a132019-04-12 13:43:18 -050033SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf"
34SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf"
35SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf"
Matt Spinlerd9aee4a2017-06-19 14:55:52 -050036
Matthew Barthceacb772017-10-24 14:07:09 -050037#These services need to be stopped when watchdog expires
Matthew Barth2eb5a132019-04-12 13:43:18 -050038SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf"
39SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf"
Matthew Barthf59761e2019-09-20 09:56:35 -050040
41# Remove fan control init service completely
42SYSTEMD_SERVICE_${PN}-control_remove_witherspoon = "${TMPL_CONTROL_INIT}"
43SYSTEMD_LINK_${PN}-control_remove_witherspoon = "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}"
44# Remove fan control from being linked
45SYSTEMD_LINK_${PN}-control_remove_witherspoon = "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}"
46
47# Link fan control service to be started at standby
48FMT_CONTROL_STDBY_witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}"
49SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}"
50# Link fan control service to also start at poweron
51FMT_CONTROL_PWRON_witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}"
52SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}"