From dd7a0806e420f29a7255153b6c578c8e5c352135 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Mon, 1 May 2017 14:29:20 -0500 Subject: Install phosphor-fan-monitor app and service Resolves openbmc/openbmc#1346 Change-Id: I9abac19b18b02158ff4fdae6e94406b64957cefb Signed-off-by: Matt Spinler --- .../common/recipes-phosphor/fans/phosphor-fan.bb | 23 +++++++++++++++++++++- .../common/recipes-phosphor/fans/phosphor-fan.inc | 2 +- .../phosphor-fan/phosphor-fan-monitor@.service | 12 +++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service (limited to 'meta-phosphor/common/recipes-phosphor/fans') diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb index 736149cc5..19eb4db0a 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb @@ -22,11 +22,12 @@ DEPENDS += "phosphor-logging" FAN_PACKAGES = " \ ${PN}-presence-tach \ ${PN}-control \ + ${PN}-monitor \ phosphor-chassis-cooling-type \ " PACKAGES_remove = "${PN}" PACKAGES += "${FAN_PACKAGES}" -PACKAGECONFIG ??= "presence control cooling-type" +PACKAGECONFIG ??= "presence control cooling-type monitor" SYSTEMD_PACKAGES = "${FAN_PACKAGES}" RDEPENDS_${PN}-dev = "${FAN_PACKAGES}" RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}" @@ -79,3 +80,23 @@ SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_I PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev," RDEPENDS_phosphor-chassis-cooling-type += "libevdev" FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type" + +# -------------------------------------- +# ${PN}-monitor specific configuration +PACKAGECONFIG[monitor] = "--enable-monitor \ + FAN_MONITOR_YAML_FILE=${STAGING_DIR_NATIVE}${monitor_datadir}/monitor.yaml \ + FAN_MONITOR_OUTPUT_DIR=${S}/monitor, \ + --disable-monitor, \ + phosphor-fan-monitor-config-native \ + , \ +" + +RDEPENDS_${PN}-monitor += "sdbusplus" + +TMPL_MONITOR = "phosphor-fan-monitor@.service" +INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service" +FMT_MONITOR = "../${TMPL_MONITOR}:${TGTFMT}.requires/${INSTFMT_MONITOR}" + +FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor" +SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR}" +SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc index 7a583abf7..193aab7cf 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-fan-presence" -SRCREV = "77d32d1b0b780b9ac773bc49a6c74c19508ff8e8" +SRCREV = "e824f985e7e32923d9f76e3ad5baf4909880739f" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service new file mode 100644 index 000000000..57b01c7aa --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Phosphor Fan Monitor Daemon +Wants=obmc-power-on@%i.target +After=obmc-power-on@%i.target +Conflicts=obmc-chassis-poweroff@%i.target + +[Service] +Restart=on-failure +ExecStart={sbindir}/phosphor-fan-monitor + +[Install] +RequiredBy=obmc-chassis-poweron@%i.target -- cgit v1.2.1