meta-ibm: install power workarounds appropriately
New yocto has gotten more strict (and found some bugs in our recipes)
that require correct FILESEXTRAPATHS and correct machine installs.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5511d543be0d2d17eba88ca63afa5372b8fda3a4
diff --git a/meta-ibm/recipes-phosphor/chassis/power-workarounds.bb b/meta-ibm/recipes-phosphor/chassis/power-workarounds.bb
index 6ab0ae2..452f5ce 100644
--- a/meta-ibm/recipes-phosphor/chassis/power-workarounds.bb
+++ b/meta-ibm/recipes-phosphor/chassis/power-workarounds.bb
@@ -10,9 +10,16 @@
S = "${WORKDIR}"
-SRC_URI += "file://power-workarounds.sh"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:"
+SRC_URI:append:witherspoon = " file://power-workarounds.sh"
+SRC_URI:append:swift = " file://power-workarounds.sh"
-do_install() {
+do_install:append:witherspoon() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh
+}
+
+do_install:append:swift() {
install -d ${D}${bindir}
install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh
}
@@ -22,5 +29,8 @@
TGTFMT = "obmc-chassis-poweron@{0}.target"
FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
-SYSTEMD_SERVICE:${PN} += "${TMPL_WA}"
-SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_WA}"
+SYSTEMD_LINK:${PN}:append:witherspoon = "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"
+
+SYSTEMD_SERVICE:${PN}:append:swift = " ${TMPL_WA}"
+SYSTEMD_LINK:${PN}:append:swift = "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"