diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-22 21:40:54 -0400 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 12:39:42 -0400 |
commit | 194ff4f1f5d44b12e9cb06ddafa6adb20174a13c (patch) | |
tree | 823835cd29daf8901a31ac14c7e6534abf199be3 /meta-ibm/recipes-phosphor | |
parent | 4feb727cd6b77a68bdaca63e121b378d814f5eaf (diff) | |
download | blackbird-openbmc-194ff4f1f5d44b12e9cb06ddafa6adb20174a13c.tar.gz blackbird-openbmc-194ff4f1f5d44b12e9cb06ddafa6adb20174a13c.zip |
[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-ibm/recipes-phosphor')
15 files changed, 243 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/bmcweb/bmcweb.bbappend b/meta-ibm/recipes-phosphor/bmcweb/bmcweb.bbappend new file mode 100644 index 000000000..e3f627f53 --- /dev/null +++ b/meta-ibm/recipes-phosphor/bmcweb/bmcweb.bbappend @@ -0,0 +1,10 @@ +SUMMARY = "Modifications to support Nginx" + +# Behind NGINX so disable SSL in bmcweb +EXTRA_OECMAKE += "-DBMCWEB_INSECURE_DISABLE_SSL=ON" + +# Only need redfish support +EXTRA_OECMAKE += "-DBMCWEB_ENABLE_KVM=OFF -DBMCWEB_ENABLE_DBUS_REST=OFF" + +# override service and socket file to use nginx +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.service b/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.service new file mode 100644 index 000000000..832eb0491 --- /dev/null +++ b/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.service @@ -0,0 +1,9 @@ +[Unit] +Description=BMC Redfish Server (bmcweb) +After=network.target +After=obmc-webserver-pre.target + +[Service] +Restart=always +ExecStart=/usr/bin/env bmcweb +SyslogIdentifier=bmcweb diff --git a/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket b/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket new file mode 100644 index 000000000..40e68975c --- /dev/null +++ b/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Phosphor redfish socket (bmcweb) + +[Socket] +ListenStream=127.0.0.1:8082 + +[Install] +WantedBy=sockets.target diff --git a/meta-ibm/recipes-phosphor/dbus/ibm-dbus-interfaces-mapper-config-native.bb b/meta-ibm/recipes-phosphor/dbus/ibm-dbus-interfaces-mapper-config-native.bb new file mode 100644 index 000000000..8347b9eec --- /dev/null +++ b/meta-ibm/recipes-phosphor/dbus/ibm-dbus-interfaces-mapper-config-native.bb @@ -0,0 +1,10 @@ +SUMMARY="Add /com/ibm namespace to phosphor-mapper" +DESCRIPTION="Add the /com/ibm path namespace and \ +com.ibm interface prefix to the mapper watch list." + +inherit phosphor-mapper +inherit native +inherit obmc-phosphor-license + +PHOSPHOR_MAPPER_NAMESPACE_append = " /com/ibm" +PHOSPHOR_MAPPER_INTERFACE_append = " com.ibm" diff --git a/meta-ibm/recipes-phosphor/dbus/ibm-dbus-interfaces.bb b/meta-ibm/recipes-phosphor/dbus/ibm-dbus-interfaces.bb new file mode 100644 index 000000000..947f5d7db --- /dev/null +++ b/meta-ibm/recipes-phosphor/dbus/ibm-dbus-interfaces.bb @@ -0,0 +1,32 @@ +SUMMARY = "IBM DBus Interfaces" +DESCRIPTION = "Generated bindings, using sdbus++, for the IBM YAML" +PR = "r1" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig +inherit obmc-phosphor-license +inherit pythonnative +inherit phosphor-dbus-yaml + +DEPENDS += "autoconf-archive-native" +DEPENDS += "sdbus++-native" + +SRC_URI += "git://github.com/openbmc/ibm-dbus-interfaces" +SRCREV = "62c7bff037587fe0fbfdffbe622058d86c7d7b7b" + +DEPENDS_remove_class-native = "sdbus++-native" +DEPENDS_remove_class-nativesdk = "sdbus++-native" + +PACKAGECONFIG ??= "libibm_dbus" +PACKAGECONFIG[libibm_dbus] = " \ + --enable-libibm_dbus, \ + --disable-libibm_dbus, \ + systemd sdbusplus, \ + libsystemd sdbusplus \ + " + +PACKAGECONFIG_remove_class-native = "libibm_dbus" +PACKAGECONFIG_remove_class-nativesdk = "libibm_dbus" + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta-ibm/recipes-phosphor/dbus/phosphor-mapper-config-native.bbappend b/meta-ibm/recipes-phosphor/dbus/phosphor-mapper-config-native.bbappend new file mode 100644 index 000000000..d94a55490 --- /dev/null +++ b/meta-ibm/recipes-phosphor/dbus/phosphor-mapper-config-native.bbappend @@ -0,0 +1 @@ +PHOSPHOR_MAPPER_CONFIGS_append = " ibm-dbus-interfaces-mapper-config-native" diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend new file mode 100644 index 000000000..402e4fa09 --- /dev/null +++ b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://plugins.d/ibm_elogall" + +install_ibm_plugins() { + + install -m 0755 ${WORKDIR}/plugins.d/ibm_elogall ${D}${dreport_plugin_dir} + +} + +#Link in the plugins so dreport run them at the appropriate time +python link_ibm_plugins() { + + workdir = d.getVar('WORKDIR', True) + script = os.path.join(workdir, 'plugins.d', 'ibm_elogall') + install_dreport_user_script(script, d) + +} + +do_install[postfuncs] += "install_ibm_plugins" +do_install[postfuncs] += "link_ibm_plugins" diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall new file mode 100644 index 000000000..3054f237c --- /dev/null +++ b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall @@ -0,0 +1,29 @@ +#!/bin/bash +# +# config: 2 20 +# @brief: Get the IBM specific elog objects +# + +. $DREPORT_INCLUDE/functions + +desc="IBM elog" + +entries=$(busctl --list --no-pager tree \ + com.ibm.Logging | grep \ + '/xyz/openbmc_project/logging/entry/') + +#check for elog entries. +if [ -z "$entries" ]; then + log_info "No $desc entries" + exit 0 +fi + +command="busctl call --verbose --no-pager \ + com.ibm.Logging \ + /xyz/openbmc_project/logging \ + org.freedesktop.DBus.ObjectManager \ + GetManagedObjects" + +file_name="ibm_elogall.log" + +add_cmd_output "$command" "$file_name" "$desc" diff --git a/meta-ibm/recipes-phosphor/logging/ibm-logging.bb b/meta-ibm/recipes-phosphor/logging/ibm-logging.bb new file mode 100644 index 000000000..e32678708 --- /dev/null +++ b/meta-ibm/recipes-phosphor/logging/ibm-logging.bb @@ -0,0 +1,79 @@ +SUMMARY = "IBM enhanced error logging" +DESCRIPTION = "Adds additional error logging functionality for IBM systems" +PR = "r1" +HOMEPAGE = "https://github.com/openbmc/ibm-logging" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" +SRC_URI += "git://github.com/openbmc/ibm-logging" +SRCREV = "34af47ff623ce077670d270693f36e4c51adfa10" + +inherit autotools +inherit pkgconfig +inherit pythonnative +inherit obmc-phosphor-dbus-service +inherit obmc-phosphor-systemd +inherit phosphor-dbus-yaml + +DEPENDS += " \ + ibm-dbus-interfaces \ + phosphor-logging \ + nlohmann-json \ + autoconf-archive-native \ + sdbusplus \ + " + +RDEPENDS_${PN} += " \ + phosphor-logging \ + phosphor-dbus-interfaces \ + sdbusplus \ + " + +S = "${WORKDIR}/git" + +SRC_URI += "file://policyTable.json" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[policy-interface] = "--enable-policy-interface, --disable-policy-interface,," + +SERVICE = "com.ibm.Logging.service" +DBUS_SERVICE_${PN} += "${SERVICE}" + +#The link is so that this service will restart if phosphor-logging restarts. +#The BindsTo in the service will not do the restart, it will only do the +#original start and a stop. +LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}" +SYSTEMD_LINK_${PN} += "${LOG_FMT}" + +do_install_append(){ + + install -d ${D}${datadir}/ibm-logging + + ${S}/condense_policy.py \ + -p ${WORKDIR}/policyTable.json \ + -c ${D}/${datadir}/ibm-logging/policy.json +} + +#An optional task to generate a report on all of the errors +#created by OpenBMC, and compare these errors to what is +#in the error policy table +do_report(){ + + ${S}/create_error_reports.py \ + -p ${D}/${datadir}/ibm-logging/policy.json \ + -y ${STAGING_DIR_NATIVE}${yaml_dir} \ + -e ${WORKDIR}/build/all_errors.json \ + -x ${WORKDIR}/build/policy_crosscheck.txt + +} + +addtask report + +#Collect all of the error YAML files into our recipe-sysroot-native dir. +do_report[depends] = " \ + ibm-logging:do_install \ + phosphor-logging-error-logs-native:do_populate_sysroot \ + phosphor-dbus-interfaces-native:do_populate_sysroot \ + openpower-dbus-interfaces-native:do_populate_sysroot \ + openpower-occ-control-native:do_populate_sysroot \ + openpower-debug-collector-native:do_populate_sysroot \ + " diff --git a/meta-ibm/recipes-phosphor/logging/ibm-logging/com.ibm.Logging.service b/meta-ibm/recipes-phosphor/logging/ibm-logging/com.ibm.Logging.service new file mode 100644 index 000000000..57ebc9973 --- /dev/null +++ b/meta-ibm/recipes-phosphor/logging/ibm-logging/com.ibm.Logging.service @@ -0,0 +1,14 @@ +[Unit] +Description=IBM Log Manager +After=xyz.openbmc_project.Logging.service +BindsTo=xyz.openbmc_project.Logging.service + +[Service] +ExecStart=/usr/bin/env ibm-log-manager +SyslogIdentifier=ibm-log-manager +Restart=always +Type=dbus +BusName={BUSNAME} + +[Install] +WantedBy=xyz.openbmc_project.Logging.service diff --git a/meta-ibm/recipes-phosphor/logging/ibm-logging/policyTable.json b/meta-ibm/recipes-phosphor/logging/ibm-logging/policyTable.json new file mode 100644 index 000000000..677c02437 --- /dev/null +++ b/meta-ibm/recipes-phosphor/logging/ibm-logging/policyTable.json @@ -0,0 +1,5 @@ +{ + "_comment": "This file should be overridden with one from the machine layer.", + "events": { + } +} diff --git a/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend new file mode 100644 index 000000000..0b0a9c9f2 --- /dev/null +++ b/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend @@ -0,0 +1,2 @@ +RDEPENDS_${PN}-logging += "ibm-logging" +RDEPENDS_${PN}-extras += "nginx bmcweb" diff --git a/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent.bbappend b/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent.bbappend new file mode 100644 index 000000000..6dd263b79 --- /dev/null +++ b/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent.bbappend @@ -0,0 +1,4 @@ +SUMMARY = "Modifications to support Nginx" + +# override service and socket file to use nginx +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent/phosphor-gevent.service b/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent/phosphor-gevent.service new file mode 100644 index 000000000..6b4e77ffe --- /dev/null +++ b/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent/phosphor-gevent.service @@ -0,0 +1,11 @@ +[Unit] +Description=Phosphor REST Server +After=network.target +After=obmc-webserver-pre.target + +[Service] +Restart=always +ExecStart=/usr/bin/env phosphor-gevent $APPLICATION --no-ssl +SyslogIdentifier=phosphor-gevent +Environment="PYTHONUNBUFFERED=1" +EnvironmentFile={envfiledir}/obmc/wsgi_app diff --git a/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent/phosphor-gevent.socket b/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent/phosphor-gevent.socket new file mode 100644 index 000000000..f7fde31be --- /dev/null +++ b/meta-ibm/recipes-phosphor/phosphor-gevent/phosphor-gevent/phosphor-gevent.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Phosphor Webserver socket + +[Socket] +ListenStream=127.0.0.1:8081 + +[Install] +WantedBy=sockets.target |