From a3f54c8b8cbd50bc86efdc52cfb7d348d8c19d21 Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Wed, 22 Apr 2020 10:53:50 -0500 Subject: witherspoon/tacoma: Substitute variable in fan control service The fan control service has a dependency on the max31785 hwmon service being started where the i2c address of the max31785 is in the name of the service file. That i2c address is different between witherspoon and tacoma, so a systemd substitution is needed to place the correct address based on machine into the fan control service file. Tested: Built witherspoon and verified correct i2c address substituted Built tacoma and verified correct i2c address substituted Built mihawk and verified base fan control service used(no max31785) Built swift to verify base fan control service used(max31785) Verified witherspoon image on hardware (From meta-ibm rev: 7b56fea6e2180ca110d49868b3ad543f9a5e4e76) Change-Id: Ie0e43fb18f9349135ad66f40993a9fad662224ea Signed-off-by: Matthew Barth Signed-off-by: Andrew Geissler --- .../fans/phosphor-fan/witherspoon/phosphor-fan-control@.service | 4 ++-- .../meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'meta-ibm/meta-witherspoon') 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 index 489292bfa7..267907776a 100644 --- 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 @@ -1,7 +1,7 @@ [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 +Requires=max31785-hwmon-helper@ahb-apb-bus\x401e78a000-i2c\x2dbus\x40{ADDR}-max31785\x4052.service +After=max31785-hwmon-helper@ahb-apb-bus\x401e78a000-i2c\x2dbus\x40{ADDR}-max31785\x4052.service [Service] Restart=on-failure 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 82fb9db62a..713c0c6a28 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend @@ -52,3 +52,8 @@ SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON # Enable the use of JSON on the fan applications that support it EXTRA_OECONF_append_witherspoon = " --enable-json" RDEPENDS_${PN}-presence-tach_append_witherspoon = " phosphor-fan-presence-config" + +# Set the appropriate i2c address used within the overridden phosphor-fan-control@.service +# file that's used for witherspoon type(including witherspoon-tacoma) machines +SYSTEMD_SUBSTITUTIONS_witherspoon = "ADDR:100:phosphor-fan-control@.service" +SYSTEMD_SUBSTITUTIONS_witherspoon-tacoma = "ADDR:200:phosphor-fan-control@.service" -- cgit v1.2.3