meta-ampere: mtjade: fan: fix warning when BMC reboot
Below messages are displayed during BMC reboots:
mtjade (speed.sh)[710]: phosphor-fan-control@0.service: Failed to locate
executable /usr/bin/ampere_set_fan_max_speed.sh: No such file or directory.
mtjade (speed.sh)[710]: phosphor-fan-control@0.service: Failed at step EXEC
spawning /usr/bin/ampere_set_fan_max_speed.sh: No such file or directory
This commit fixes the issue by updating phosphor-fan configuration file
to properly install ampere_set_fan_max_speed to /usr/bin/.
Tested:
1. Reboot BMC
--> no above warning displayed
Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Change-Id: I5e630e320cf7d05ed33ea54e28ef98495d88f9a1
diff --git a/meta-ampere/meta-jade/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/fans/phosphor-fan_%.bbappend
index fbcb1be..fcf7e00 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/fans/phosphor-fan_%.bbappend
+++ b/meta-ampere/meta-jade/recipes-phosphor/fans/phosphor-fan_%.bbappend
@@ -1,7 +1,7 @@
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
FILESEXTRAPATHS:append := "${THISDIR}/${PN}/${MACHINE}:"
-RDEPENDS:${PN} += "bash"
+RDEPENDS:${PN}-monitor += "bash"
PACKAGECONFIG:append = " json"
@@ -16,6 +16,10 @@
file://ampere_set_fan_max_speed.sh \
"
+FILES:${PN}-monitor += " \
+ ${bindir}/ampere_set_fan_max_speed.sh \
+ "
+
do_configure:prepend() {
mkdir -p ${S}/control/config_files/${MACHINE}
cp ${WORKDIR}/events.json ${S}/control/config_files/${MACHINE}/events.json