diff options
author | Sergey Solomin <sergey.solomin@us.ibm.com> | 2016-11-28 15:03:24 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-12-16 21:11:39 +0000 |
commit | aac4adf831eebc74d97076e94125ebf5b6d5da48 (patch) | |
tree | 0b3ed6b9682a74a086e1a52b074854781611e3fd | |
parent | 370c28d56f3421d54d74cf23f89a184f3408b1ac (diff) | |
download | talos-openbmc-aac4adf831eebc74d97076e94125ebf5b6d5da48.tar.gz talos-openbmc-aac4adf831eebc74d97076e94125ebf5b6d5da48.zip |
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>
12 files changed, 119 insertions, 3 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service index 6b291100d..dbf6021e3 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service @@ -5,7 +5,7 @@ After=vcs_on@.service 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/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service index e15d2cf3b..6b4d4255e 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service @@ -5,7 +5,7 @@ After=obmc-power-on@%i.target 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/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb new file mode 100644 index 000000000..3f7bf2bf0 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/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/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb new file mode 100644 index 000000000..530085bbb --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/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/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb index 268caf5ba..40b6b6fb1 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb @@ -41,7 +41,6 @@ RDEPENDS_${PN}-chassis = " \ obmc-op-control-power \ obmc-pcie-detect \ obmc-watchdog \ - obmc-op-control-host \ obmc-control-led \ " diff --git a/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc b/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc index c333784eb..9fc843f3e 100644 --- a/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc +++ b/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc @@ -4,6 +4,7 @@ OBMC_MACHINE_FEATURES += "\ obmc-phosphor-sensor-mgmt \ obmc-phosphor-flash-mgmt \ obmc-host-ipmi \ + obmc-host-ctl \ openpower-pflash \ " @@ -15,4 +16,5 @@ PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-op-apps" PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-op-apps" PREFERRED_PROVIDER_virtual/obmc-sensor-mgmt = "packagegroup-op-apps" PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-op-apps" +PREFERRED_PROVIDER_virtual/obmc-host-ctl ?= "obmc-op-control-host" PREFERRED_PROVIDER_virtual/obmc-inventory-data ?= "${VIRTUAL-RUNTIME_skeleton_workbook}" diff --git a/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc b/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc new file mode 100644 index 000000000..936576d43 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/conf/machine/include/p9.inc @@ -0,0 +1,2 @@ +OBMC_MACHINE_FEATURES += 'p9-vcs-workaround' +PREFERRED_PROVIDER_virtual/obmc-host-ctl = "p9-host-start" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf index 40c835750..e3fcad85f 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf @@ -5,9 +5,12 @@ UBOOT_MACHINE = "ast_g5_ncsi_config" OBMC_MACHINE_FEATURES += "obmc-mrw" +PREFERRED_PROVIDER_virtual/p9-vcs-workaround = 'vcs-pre-post' + require conf/machine/include/ast2500.inc require conf/machine/include/obmc-bsp-common.inc require conf/machine/include/ibm.inc +require conf/machine/include/p9.inc PHOSPHOR_MRW_URI = "git://github.com/open-power/witherspoon-xml" PHOSPHOR_MRW_REV = "657550f28ebd09854a93c299a5a5aff182375a66" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb new file mode 100644 index 000000000..676df3d95 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post.bb @@ -0,0 +1,43 @@ +SUMMARY = "Witherspoon P9 power on" +DESCRIPTION = "Witherspoon power on workaround" +PR = "r1" + +inherit obmc-phosphor-systemd +inherit obmc-phosphor-license + +RDEPENDS_${PN} += "i2c-tools" + +PROVIDES += 'virtual/p9-vcs-workaround' +RPROVIDES_${PN} += 'virtual-p9-vcs-workaround' + +S = "${WORKDIR}" +SRC_URI += "file://vcs_off.sh \ + file://vcs_on.sh \ + file://ucd_disable_vcs.sh" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/vcs_off.sh ${D}${bindir}/vcs_off.sh + install -m 0755 ${WORKDIR}/vcs_on.sh ${D}${bindir}/vcs_on.sh + install -m 0755 ${WORKDIR}/ucd_disable_vcs.sh \ + ${D}${bindir}/ucd_disable_vcs.sh +} + +TMPL_OFF = "vcs_off@.service" +TMPL_ON = "vcs_on@.service" +TMPL_UCD = "ucd_disable_vcs@.service" +INSTFMT_OFF = "vcs_off@{0}.service" +INSTFMT_ON = "vcs_on@{0}.service" +INSTFMT_UCD = "ucd_disable_vcs@{0}.service" +TGTFMT = "obmc-chassis-start@{0}.target" +FMT_OFF = "../${TMPL_OFF}:${TGTFMT}.wants/${INSTFMT_OFF}" +FMT_ON = "../${TMPL_ON}:${TGTFMT}.wants/${INSTFMT_ON}" +FMT_UCD = "../${TMPL_UCD}:${TGTFMT}.wants/${INSTFMT_UCD}" + +SYSTEMD_SERVICE_${PN} += "${TMPL_OFF}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SERVICE_${PN} += "${TMPL_ON}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_SERVICE_${PN} += "${TMPL_UCD}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_UCD', 'OBMC_CHASSIS_INSTANCES')}" + diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass index 813b20d4f..31f99cf60 100644 --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass @@ -27,6 +27,7 @@ FEATURE_PACKAGES_obmc-settings-mgmt ?= "${@df_enabled('obmc-settings-mgmt', 'vir FEATURE_PACKAGES_obmc-system-mgmt ?= "${@df_enabled('obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt', d)}" FEATURE_PACKAGES_obmc-host-ipmi ?= "${@cf_enabled('obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw', d)}" FEATURE_PACKAGES_obmc-logging-mgmt ?= "${@cf_enabled('obmc-logging-mgmt', 'virtual-obmc-logging-mgmt', d)}" +FEATURE_PACKAGES_obmc-host-ctl ?= "${@cf_enabled('obmc-host-ctl', 'virtual-obmc-host-ctl', d)}" # Install entire Phosphor application stack by default IMAGE_FEATURES += " \ @@ -40,6 +41,7 @@ IMAGE_FEATURES += " \ obmc-system-mgmt \ obmc-host-ipmi \ obmc-logging-mgmt \ + obmc-host-ctl \ ssh-server-dropbear \ " diff --git a/meta-phosphor/common/recipes-phosphor/hosts/obmc-op-control-host.bb b/meta-phosphor/common/recipes-phosphor/hosts/obmc-op-control-host.bb index dabc4a8a6..2b5e8b1dc 100644 --- a/meta-phosphor/common/recipes-phosphor/hosts/obmc-op-control-host.bb +++ b/meta-phosphor/common/recipes-phosphor/hosts/obmc-op-control-host.bb @@ -5,6 +5,9 @@ PR = "r1" inherit skeleton-gdbus inherit obmc-phosphor-dbus-service +PROVIDES += "virtual/obmc-host-ctl" +RPROVIDES_${PN} += "virtual-obmc-host-ctl" + SKELETON_DIR = "op-hostctl" FMT = "org.openbmc.control.Host@{0}.service" diff --git a/meta-phosphor/conf/distro/openbmc-phosphor.conf b/meta-phosphor/conf/distro/openbmc-phosphor.conf index 22b6bc632..2355dca26 100644 --- a/meta-phosphor/conf/distro/openbmc-phosphor.conf +++ b/meta-phosphor/conf/distro/openbmc-phosphor.conf @@ -31,6 +31,7 @@ DISTRO_FEATURES = "\ obmc-host-ipmi \ obmc-mrw \ obmc-logging-mgmt \ + obmc-host-ctl \ avahi \ ${DISTRO_FEATURES_LIBC} \ " |