meta-ibm: install services only on supported systems

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Id772552ca99651c47778ee2c04ba7f5ce187ec0b
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control.bb b/meta-ibm/recipes-phosphor/chassis/avsbus-control.bb
index 1ae5699..6668cb6 100644
--- a/meta-ibm/recipes-phosphor/chassis/avsbus-control.bb
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control.bb
@@ -10,15 +10,20 @@
 
 S = "${WORKDIR}"
 
-SRC_URI += "file://avsbus-enable.sh"
+SRC_URI:append:witherspoon = " file://avsbus-enable.sh"
 SRC_URI:append:witherspoon = " file://avsbus-disable.sh"
+SRC_URI:append:mihawk = " file://avsbus-enable.sh"
+SRC_URI:append:mihawk = " file://avsbus-disable.sh"
 
-do_install() {
+do_install:witherspoon() {
         install -d ${D}${bindir}
         install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
+        install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
 }
 
-do_install:append:witherspoon() {
+do_install:mihawk() {
+        install -d ${D}${bindir}
+        install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
         install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
 }
 
@@ -30,7 +35,12 @@
 FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
 FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
 
-SYSTEMD_SERVICE:${PN} += "${TMPL_EN}"
-SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_EN}"
 SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_DIS}"
 SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
+
+SYSTEMD_SERVICE:${PN}:append:mihawk = " ${TMPL_EN}"
+SYSTEMD_SERVICE:${PN}:append:mihawk = " ${TMPL_DIS}"
+SYSTEMD_LINK:${PN}:append:mihawk = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}:append:mihawk = " ${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-ibm/recipes-phosphor/chassis/vrm-control.bb b/meta-ibm/recipes-phosphor/chassis/vrm-control.bb
index cc297d2..7b3eaa5 100644
--- a/meta-ibm/recipes-phosphor/chassis/vrm-control.bb
+++ b/meta-ibm/recipes-phosphor/chassis/vrm-control.bb
@@ -10,15 +10,12 @@
 RDEPENDS:${PN} += "i2c-tools bash"
 
 S = "${WORKDIR}"
-SRC_URI = "file://ir35221-unbind-bind.sh"
+SRC_URI:append:ibm-ac-server = " file://ir35221-unbind-bind.sh"
 SRC_URI:append:ibm-ac-server = " file://vrm-control.sh"
 
-do_install() {
+do_install:ibm-ac-server() {
         install -d ${D}${bindir}
         install -m 0755 ${WORKDIR}/ir35221-unbind-bind.sh ${D}${bindir}/ir35221-unbind-bind.sh
-}
-
-do_install:append:ibm-ac-server() {
         install -m 0755 ${WORKDIR}/vrm-control.sh ${D}${bindir}/vrm-control.sh
 }
 
@@ -35,8 +32,8 @@
 INSTFMT_ON_IRUNBIND = "ir35221-on-unbind@{0}.service"
 FMT_ON_IRUNBIND = "../${TMPL_ON_IRUNBIND}:${TGTFMT_ON}.requires/${INSTFMT_ON_IRUNBIND}"
 
-SYSTEMD_SERVICE:${PN} += "${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
+SYSTEMD_SERVICE:${PN}:append:ibm-ac-server = " ${TMPL_ON_IRUNBIND} ${TMPL_ON_IRBIND}"
 SYSTEMD_SERVICE:${PN}:append:ibm-ac-server = " ${TMPL}"
 SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON_IRBIND', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}:append:ibm-ac-server = " ${@compose_list(d, 'FMT_ON_IRUNBIND', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-ibm/recipes-phosphor/dbus/thermal-policy.bb b/meta-ibm/recipes-phosphor/dbus/thermal-policy.bb
index 5c381b4..8eb5bc2 100644
--- a/meta-ibm/recipes-phosphor/dbus/thermal-policy.bb
+++ b/meta-ibm/recipes-phosphor/dbus/thermal-policy.bb
@@ -8,10 +8,16 @@
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
 
-SRC_URI = "file://thermal-policy.yaml"
+SRC_URI:append:ibm-ac-server = " file://thermal-policy.yaml"
+SRC_URI:append:mihawk = " file://thermal-policy.yaml"
 
-do_install() {
+do_install:ibm-ac-server() {
         install -D ${WORKDIR}/thermal-policy.yaml ${D}${config_dir}/thermal-policy.yaml
 }
 
-FILES:${PN} += "${config_dir}/thermal-policy.yaml"
+do_install:mihawk() {
+        install -D ${WORKDIR}/thermal-policy.yaml ${D}${config_dir}/thermal-policy.yaml
+}
+
+FILES:${PN}:append:ibm-ac-server = " ${config_dir}/thermal-policy.yaml"
+FILES:${PN}:append:mihawk = " ${config_dir}/thermal-policy.yaml"