diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-23 04:40:54 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 19:39:42 +0300 |
commit | 194ff4f1f5d44b12e9cb06ddafa6adb20174a13c (patch) | |
tree | 823835cd29daf8901a31ac14c7e6534abf199be3 /meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb | |
parent | 4feb727cd6b77a68bdaca63e121b378d814f5eaf (diff) | |
download | openbmc-194ff4f1f5d44b12e9cb06ddafa6adb20174a13c.tar.xz |
[Subtree] Bring openbmc machines to top level
The new subtree model brings the subtrees up from the openbmc-machines
layer.
Change-Id: I58a03ae1be374bc79ae1438e65e888375d12d0c0
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb')
-rw-r--r-- | meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb new file mode 100644 index 000000000..18b298cc3 --- /dev/null +++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb @@ -0,0 +1,111 @@ +SUMMARY = "OpenPOWER OCC controller" +DESCRIPTION = "Application to control the OpenPOWER On-Chip-Controller" +HOMEPAGE = "https://github.com/openbmc/openpower-occ-control" +PR = "r1" + +inherit autotools \ + pkgconfig \ + obmc-phosphor-dbus-service \ + pythonnative \ + phosphor-dbus-yaml + +require ${PN}.inc + +SRC_URI += "file://occ-active.sh" +do_install_append() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/occ-active.sh \ + ${D}${bindir}/occ-active.sh +} + +DBUS_SERVICE_${PN} += "org.open_power.OCC.Control.service" +SYSTEMD_SERVICE_${PN} += "op-occ-enable@.service" +SYSTEMD_SERVICE_${PN} += "op-occ-disable@.service" + +DEPENDS += "virtual/${PN}-config-native" +DEPENDS += " \ + sdbusplus \ + sdbusplus-native \ + phosphor-logging \ + openpower-dbus-interfaces \ + phosphor-dbus-interfaces \ + openpower-dbus-interfaces-native \ + autoconf-archive-native \ + obmc-targets \ + systemd \ + " + +RDEPENDS_${PN} += " \ + sdbusplus \ + phosphor-logging \ + openpower-dbus-interfaces \ + phosphor-dbus-interfaces \ + " + +EXTRA_OECONF = " \ + YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN} \ + PS_DERATING_FACTOR=${POWER_SUPPLY_DERATING_FACTOR} \ + " +EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}" + +OCC_ENABLE = "enable" +OCC_DISABLE = "disable" +HOST_START = "startmin" +HOST_STOP = "stop" + +# Ensure host-stop and host-startmin targets require needed occ states +OCC_TMPL = "op-occ-{0}@.service" +HOST_TGTFMT = "obmc-host-{1}@{2}.target" +OCC_INSTFMT = "op-occ-{0}@{2}.service" +HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.requires/${OCC_INSTFMT}" +SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_DISABLE', 'HOST_STOP', 'OBMC_HOST_INSTANCES')}" + +# Set the occ disable service to be executed on host error +HOST_ERROR_TARGETS = "crash timeout" + +OCC_DISABLE_TMPL = "op-occ-disable@.service" +HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target" +OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service" +HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}" + +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" + +S = "${WORKDIR}/git" + +# Remove packages not required for native build +DEPENDS_remove_class-native = " \ + phosphor-logging \ + obmc-targets \ + systemd \ + virtual/${PN}-config-native \ + " +# Remove packages not required for native SDK build +DEPENDS_remove_class-nativesdk = " \ + phosphor-logging \ + obmc-targets \ + systemd \ + virtual/${PN}-config-native \ + " + +# Provide a means to enable/disable install_error_yaml feature +PACKAGECONFIG ??= "install_error_yaml" +PACKAGECONFIG[install_error_yaml] = "\ + --enable-install_error_yaml,\ + --disable-install_error_yaml,\ + ,\ + " + +# Enable install_error_yaml during native and native SDK build +PACKAGECONFIG_add_class-native = "install_error_yaml" +PACKAGECONFIG_add_class-nativesdk = "install_error_yaml" + +# Disable install_error_yaml during target build +PACKAGECONFIG_remove_class-target = "install_error_yaml" + +# Disable generating elog error header file during bitbake. Applications +# should be using the elog header generated by phosphor-logging recipe +EXTRA_OECONF += "--disable-gen_errors" + +BBCLASSEXTEND += "native nativesdk" + |