From fba5121cf3e2e40d2d44ac365ba1afc242f27b99 Mon Sep 17 00:00:00 2001 From: Ben_Pai Date: Mon, 5 Aug 2019 18:34:34 +0800 Subject: Add mihawk sensor, fan control and d-bus monitor Most of mihawk's sensors are different from witherspoon, so I temporarily added the mihawk part and did not change the witherspoon. Add mihawk version of fan control and d-bus monitor. Mihawk does not have a water cooled mode, so another independent folder is added. Tested: 1.Shut down the system if more than three cores have a temperature greater than 100 degrees Celcius. 2.Fan control support cpu core, dimm, Onboard. 3.Confirm that sensor is able to return normally via REST. (From meta-ibm rev: 949f91431bba2f0139cc823d674a741f9590c885) Signed-off-by: Ben Pai Signed-off-by: Brad Bishop Change-Id: Icc401f32c67b622f0f1448e1166112e02c135a8f Signed-off-by: Brad Bishop --- .../recipes-phosphor/fans/phosphor-fan_%.bbappend | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend') diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend index 88c32ffa6..085857c31 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend @@ -3,9 +3,14 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" # Package configuration FAN_PACKAGES_append_ibm-ac-server = " \ phosphor-cooling-type \ -" + " + +FAN_PACKAGES_append_mihawk = " \ + phosphor-cooling-type \ + " PACKAGECONFIG_append_ibm-ac-server = " cooling-type" +PACKAGECONFIG_append_mihawk = " cooling-type" TMPL_COOLING = "phosphor-cooling-type@.service" INSTFMT_COOLING = "phosphor-cooling-type@{0}.service" @@ -15,10 +20,14 @@ FMT_COOLING = "../${TMPL_COOLING}:${COOLING_TGT}.requires/${INSTFMT_COOLING}" FILES_phosphor-cooling-type_append_ibm-ac-server = " ${bindir}/phosphor-cooling-type" SYSTEMD_SERVICE_phosphor-cooling-type_append_ibm-ac-server = " ${TMPL_COOLING}" SYSTEMD_LINK_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}" +FILES_phosphor-cooling-type_append_mihawk = " ${bindir}/phosphor-cooling-type" +SYSTEMD_SERVICE_phosphor-cooling-type_append_mihawk = " ${TMPL_COOLING}" +SYSTEMD_LINK_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'FMT_COOLING', 'OBMC_CHASSIS_INSTANCES')}" COOLING_ENV_FMT = "obmc/phosphor-fan/phosphor-cooling-type-{0}.conf" SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_ibm-ac-server = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" #These services are protected by the watchdog SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf" -- cgit v1.2.3 From 1f0050508097c0276176231a0c7e3c20f3e07c43 Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Fri, 20 Sep 2019 09:56:35 -0500 Subject: wspoon: Enable fan control to run at BMC standby To allow thermal modes to be selected at BMC standby, the fan control application must be running. The phosphor-fan-control@.service file is needed to start fan control at BMC standby and the phosphor-fan-control-init@.service is no longer required. Tested: Witherspoon phosphor-fan-control@.service replaced in image phosphor-fan-control-init@.service removed from image fan watchdog configs appended to fan control service still phosphor-fan-control@.service started at BMC standby fan control thermal modes presented/changeable at BMC standby no function change in configured thermal modes (From meta-ibm rev: f59761e1af85b3ae6432bf0297f5cfe5be71e557) Change-Id: I4a946f58b6f0c22ebd402304ae9d8fd17a197571 Signed-off-by: Matthew Barth Signed-off-by: Brad Bishop --- .../witherspoon/phosphor-fan-control@.service | 11 +++++++++++ .../recipes-phosphor/fans/phosphor-fan_%.bbappend | 18 +++++++++++++++--- .../witherspoon-fan-watchdog.service | 4 ++-- .../witherspoon-reset-fan-watchdog.service | 4 ++-- 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend') diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service new file mode 100644 index 000000000..489292bfa --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan/witherspoon/phosphor-fan-control@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Phosphor Fan Control Daemon +Requires=max31785-hwmon-helper@ahb-apb-bus\x401e78a000-i2c\x2dbus\x40100-max31785\x4052.service +After=max31785-hwmon-helper@ahb-apb-bus\x401e78a000-i2c\x2dbus\x40100-max31785\x4052.service + +[Service] +Restart=on-failure +ExecStart=/usr/bin/phosphor-fan-control --control + +[Install] +RequiredBy=obmc-chassis-poweron@%i.target diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend index 085857c31..243a02f1c 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend @@ -14,8 +14,8 @@ PACKAGECONFIG_append_mihawk = " cooling-type" TMPL_COOLING = "phosphor-cooling-type@.service" INSTFMT_COOLING = "phosphor-cooling-type@{0}.service" -COOLING_TGT = "multi-user.target" -FMT_COOLING = "../${TMPL_COOLING}:${COOLING_TGT}.requires/${INSTFMT_COOLING}" +MULTI_USR_TGT = "multi-user.target" +FMT_COOLING = "../${TMPL_COOLING}:${MULTI_USR_TGT}.requires/${INSTFMT_COOLING}" FILES_phosphor-cooling-type_append_ibm-ac-server = " ${bindir}/phosphor-cooling-type" SYSTEMD_SERVICE_phosphor-cooling-type_append_ibm-ac-server = " ${TMPL_COOLING}" @@ -30,7 +30,6 @@ SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_ibm-ac-server = " ${@compo SYSTEMD_ENVIRONMENT_FILE_phosphor-cooling-type_append_mihawk = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" #These services are protected by the watchdog -SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control-init@0.service.d/fan-watchdog-monitor.conf" SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-control@0.service.d/fan-watchdog-monitor.conf" SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor-init@0.service.d/fan-watchdog-monitor.conf" SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-monitor.conf" @@ -38,3 +37,16 @@ SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-monitor.conf: #These services need to be stopped when watchdog expires SYSTEMD_OVERRIDE_phosphor-fan-control_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-control@0.service.d/fan-watchdog-conflicts.conf" SYSTEMD_OVERRIDE_phosphor-fan-monitor_witherspoon += "fan-watchdog-conflicts.conf:phosphor-fan-monitor@0.service.d/fan-watchdog-conflicts.conf" + +# Remove fan control init service completely +SYSTEMD_SERVICE_${PN}-control_remove_witherspoon = "${TMPL_CONTROL_INIT}" +SYSTEMD_LINK_${PN}-control_remove_witherspoon = "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}" +# Remove fan control from being linked +SYSTEMD_LINK_${PN}-control_remove_witherspoon = "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}" + +# Link fan control service to be started at standby +FMT_CONTROL_STDBY_witherspoon = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}" +SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY', 'OBMC_CHASSIS_INSTANCES')}" +# Link fan control service to also start at poweron +FMT_CONTROL_PWRON_witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}" +SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}" diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service index 5b59546e3..597ee03cb 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-fan-watchdog.service @@ -1,7 +1,7 @@ [Unit] Description=Witherspoon Fan Watchdog Daemon -Wants=phosphor-fan-control-init@0.service -Before=phosphor-fan-control-init@0.service +Wants=phosphor-fan-monitor-init@0.service +Before=phosphor-fan-monitor-init@0.service Conflicts=obmc-fan-watchdog-takeover.target [Service] diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service index e0ef0aeeb..675a67269 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service @@ -1,7 +1,7 @@ [Unit] Description=Witherspoon Fan Watchdog Reset -Wants=phosphor-fan-control-init@0.service -Before=phosphor-fan-control-init@0.service +Wants=phosphor-fan-monitor-init@0.service +Before=phosphor-fan-monitor-init@0.service Conflicts=obmc-chassis-poweroff@0.target [Service] -- cgit v1.2.3