diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2021-06-18 00:04:30 +0300 |
---|---|---|
committer | Matthew Barth <msbarth@linux.ibm.com> | 2021-07-07 00:53:21 +0300 |
commit | cd9db6b70866d3ec78a420c8809d97ac1621e365 (patch) | |
tree | eec91b664c77d40d9a7c32ff92d192068e23dcbb /meta-phosphor/recipes-phosphor/fans | |
parent | 46c282b7fddfead985460ebb7029ce26e7c6a946 (diff) | |
download | openbmc-cd9db6b70866d3ec78a420c8809d97ac1621e365.tar.xz |
fans: Link phosphor-fan-control service for JSON vs YAML
JSON configured phosphor-fan-control only uses the non-init service to
start phosphor-fan-control at multi-user.target and poweron in case its
stopped after multi-user.target is loaded.
YAML configured phosphor-fan-control continues to use both the init and
non-init service files without changing the targets each is linked to.
Change-Id: I51a6fd9cafb72cde3dc8a0b37423dd56d1184a21
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/fans')
-rw-r--r-- | meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb index e13434eef..708fe4d22 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb @@ -84,15 +84,25 @@ FAN_CONTROL_TGT = "obmc-fan-control-ready@{0}.target" TMPL_CONTROL = "phosphor-fan-control@.service" INSTFMT_CONTROL = "phosphor-fan-control@{0}.service" FMT_CONTROL = "../${TMPL_CONTROL}:${FAN_CONTROL_TGT}.requires/${INSTFMT_CONTROL}" +FMT_CONTROL_MUSR = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}" +FMT_CONTROL_PWRON = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}" TMPL_CONTROL_INIT = "phosphor-fan-control-init@.service" INSTFMT_CONTROL_INIT = "phosphor-fan-control-init@{0}.service" FMT_CONTROL_INIT = "../${TMPL_CONTROL_INIT}:${POWERON_TGT}.wants/${INSTFMT_CONTROL_INIT}" FILES_${PN}-control = "${bindir}/phosphor-fan-control" -SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}" -SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL}" +SYSTEMD_SERVICE_${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', '', '${TMPL_CONTROL_INIT}', d)}" + +# JSON: Linked to multi-user and poweron +# YAML: Linked to fans-ready and fan control-init poweron +SYSTEMD_LINK_${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \ + compose_list(d, 'FMT_CONTROL_MUSR', 'OBMC_CHASSIS_INSTANCES'), \ + compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES'), d)}" +SYSTEMD_LINK_${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \ + compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES'), \ + compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES'), d)}" # -------------------------------------- # ${PN}-monitor specific configuration |