Add recipes for Witherspoon VCS workaround
Create vcs-workaround machine feature p9.inc
Add new recipe vcs-pre-post.bb
Add new recipe p9-vcs-workaround.bb
Add new recipe start_host.bb
Create preferred providers
Create host control machine/distro/image feature
Add dependencies
Partially resolves openbmc/openbmc#647
Change-Id: I285cafc81afda20977fdf360ad8ad34d15e38685
Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com>
diff --git a/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service b/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service
index 6b29110..dbf6021 100644
--- a/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service
+++ b/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service
@@ -5,7 +5,7 @@
Conflicts=obmc-chassis-stop@%i.target
[Service]
-ExecStart={bindir}/start_host.sh
+ExecStart={bindir}/start_host.sh {MACHINE}
Type=oneshot
RemainAfterExit=yes
diff --git a/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service b/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service
index e15d2cf..6b4d425 100644
--- a/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service
+++ b/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service
@@ -5,7 +5,7 @@
Conflicts=obmc-chassis-stop@%i.target
[Service]
-ExecStart={bindir}/vcs_workaround.sh
+ExecStart={bindir}/vcs_workaround.sh {MACHINE}
Type=oneshot
RemainAfterExit=yes
diff --git a/common/recipes-phosphor/host/p9-host-start.bb b/common/recipes-phosphor/host/p9-host-start.bb
new file mode 100644
index 0000000..3f7bf2b
--- /dev/null
+++ b/common/recipes-phosphor/host/p9-host-start.bb
@@ -0,0 +1,32 @@
+SUMMARY = "POWER9 start host"
+DESCRIPTION = "Service to start POWER9 IPL through SBE"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-pdbg-host-control:"
+
+PROVIDES += 'virtual/obmc-host-ctl'
+RPROVIDES_${PN} += 'virtual-obmc-host-ctl'
+
+RDEPENDS_${PN} += "pdbg \
+ p9-vcs-workaround"
+
+S = "${WORKDIR}"
+SRC_URI += "file://start_host.sh"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/start_host.sh \
+ ${D}${bindir}/start_host.sh
+}
+
+TMPL = "start_host@.service"
+INSTFMT = "start_host@{0}.service"
+TGTFMT = "obmc-chassis-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SUBSTITUTIONS += "MACHINE:${MACHINE}:${TMPL}"
diff --git a/common/recipes-phosphor/host/p9-vcs-workaround.bb b/common/recipes-phosphor/host/p9-vcs-workaround.bb
new file mode 100644
index 0000000..530085b
--- /dev/null
+++ b/common/recipes-phosphor/host/p9-vcs-workaround.bb
@@ -0,0 +1,29 @@
+SUMMARY = "POWER9 VCS workaround"
+DESCRIPTION = "Apply fixes over FSI to POWER9 CPUs prior to host power on"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-pdbg-host-control:"
+
+RDEPENDS_${PN} += "pdbg \
+ virtual-p9-vcs-workaround"
+
+S = "${WORKDIR}"
+SRC_URI += "file://vcs_workaround.sh"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/vcs_workaround.sh \
+ ${D}${bindir}/vcs_workaround.sh
+}
+
+TMPL = "vcs_workaround@.service"
+INSTFMT = "vcs_workaround@{0}.service"
+TGTFMT = "obmc-chassis-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SUBSTITUTIONS += "MACHINE:${MACHINE}:${TMPL}"
diff --git a/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb b/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
index 268caf5..40b6b6f 100644
--- a/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
+++ b/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
@@ -41,7 +41,6 @@
obmc-op-control-power \
obmc-pcie-detect \
obmc-watchdog \
- obmc-op-control-host \
obmc-control-led \
"