diff options
Diffstat (limited to 'meta-inspur/meta-fp5280g2/recipes-phosphor/fans')
3 files changed, 38 insertions, 0 deletions
diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan/obmc/phosphor-fan/phosphor-cooling-type-0.conf b/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan/obmc/phosphor-fan/phosphor-cooling-type-0.conf new file mode 100644 index 000000000..25a4ffc9b --- /dev/null +++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan/obmc/phosphor-fan/phosphor-cooling-type-0.conf @@ -0,0 +1,2 @@ +OBJPATH="--path=/system/chassis" +AIR="--air" diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan/phosphor-cooling-type@.service b/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan/phosphor-cooling-type@.service new file mode 100644 index 000000000..9232b13fc --- /dev/null +++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan/phosphor-cooling-type@.service @@ -0,0 +1,15 @@ +[Unit] +Description=Phosphor Cooling Type +Wants=mapper-wait@-xyz-openbmc_project-inventory.service +After=mapper-wait@-xyz-openbmc_project-inventory.service +ConditionPathExists={envfiledir}/obmc/phosphor-fan/phosphor-cooling-type-%i.conf + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile={envfiledir}/obmc/phosphor-fan/phosphor-cooling-type-%i.conf +ExecStart=/usr/bin/env phosphor-cooling-type ${{OBJPATH}} ${{AIR}} +SyslogIdentifier=phosphor-cooling-type + +[Install] +RequiredBy=multi-user.target diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan_%.bbappend new file mode 100644 index 000000000..1db0942d8 --- /dev/null +++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/fans/phosphor-fan_%.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend_fp5280g2:= "${THISDIR}/${BPN}:" + +# Package configuration +FAN_PACKAGES += " \ + phosphor-cooling-type \ +" + +PACKAGECONFIG_append_fp5280g2 = " 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}" + +FILES_phosphor-cooling-type = "${bindir}/phosphor-cooling-type" +SYSTEMD_SERVICE_phosphor-cooling-type += "${TMPL_COOLING}" +SYSTEMD_LINK_phosphor-cooling-type += "${@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_fp5280g2 = " ${@compose_list(d, 'COOLING_ENV_FMT', 'OBMC_CHASSIS_INSTANCES')}" |