diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-31 13:25:51 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-09-06 14:44:12 +0300 |
commit | ff075f6ee795a590b244d70a90cc312ba1f2d83d (patch) | |
tree | a617790bdbfdeef960665ba0242e1f0c93e5301a /meta-phosphor/recipes-phosphor/logging | |
parent | 3e4da38c127bb7e7641adc2fc41f4c33744cb918 (diff) | |
download | openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.tar.xz |
meta-phosphor: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-phosphor is still
a _long_ way from suitable for hosting on yoctoproject.org but things
like this don't help.
(From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b)
Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/logging')
7 files changed, 189 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/logging/ffdc.bb b/meta-phosphor/recipes-phosphor/logging/ffdc.bb new file mode 100644 index 0000000000..8c832d7082 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/ffdc.bb @@ -0,0 +1,22 @@ +SUMMARY = "FFDC collector script" +DESCRIPTION = "Command line tool to collect and tar up debug data" +PR = "r1" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +RDEPENDS_${PN} += " \ + systemd \ + ${VIRTUAL-RUNTIME_base-utils} \ + " + +S = "${WORKDIR}/git" +SRC_URI += "git://github.com/openbmc/phosphor-debug-collector" + +SRCREV = "90d147a1ee5340278506bbdf94edc32bb77154f2" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ffdc \ + ${D}${bindir}/ffdc +} diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-example-native.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-example-native.bb new file mode 100644 index 0000000000..f76d202e16 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-example-native.bb @@ -0,0 +1,18 @@ +SUMMARY = "Generated callout information for phosphor-logging" +PR = "r1" + +inherit native +inherit obmc-phosphor-license +inherit phosphor-logging + +SRC_URI += "file://callouts.yaml" + +PROVIDES += "virtual/phosphor-logging-callouts" + +S = "${WORKDIR}" + +do_install() { + DEST=${D}${callouts_datadir} + install -d ${DEST} + install callouts.yaml ${DEST} +} diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-example/callouts.yaml b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-example/callouts.yaml new file mode 100644 index 0000000000..5b92a04c4f --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-example/callouts.yaml @@ -0,0 +1 @@ +/sys/devices/device: /system/chassis/motherboard/device diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb new file mode 100644 index 0000000000..96852d4cab --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb @@ -0,0 +1,26 @@ +SUMMARY = "Generated callout information for phosphor-logging" +PR = "r1" + +inherit native +inherit obmc-phosphor-license +inherit phosphor-logging +inherit mrw-xml + +DEPENDS += " \ + mrw-native \ + mrw-perl-tools-native \ + " + +PROVIDES += "virtual/phosphor-logging-callouts" + +S = "${WORKDIR}" + +do_install() { + DEST=${D}${callouts_datadir} + install -d ${DEST} + + ${bindir}/perl-native/perl \ + ${bindir}/gen_callouts.pl \ + -m ${mrw_datadir}/${MRW_XML} \ + -o ${DEST}/callouts.yaml +} diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging-error-logs-native.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-error-logs-native.bb new file mode 100644 index 0000000000..0dfacb1b60 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-error-logs-native.bb @@ -0,0 +1,13 @@ +SUMMARY = "Phosphor OpenBMC - error log meta data generation" +PR = "r1" + +inherit native +inherit obmc-phosphor-license + +#To append new recipes that copies error yaml files to the known +#location, add DEPENDS relationhip using bbappend to +#phosphor-logging-error-log-native recipe with the native +#recipe name + +#Refer to openpower-debug-collector-error-native.bb to see how +#to copy error yaml files to a known location diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging.bb new file mode 100644 index 0000000000..9adbc4ff4b --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging.bb @@ -0,0 +1,97 @@ +SUMMARY = "Phosphor OpenBMC event and error logging" +DESCRIPTION = "An error and event log daemon application, and \ + supporting tools for OpenBMC." +HOMEPAGE = "https://github.com/openbmc/phosphor-logging" +PR = "r1" + +inherit autotools pkgconfig +inherit pythonnative +inherit obmc-phosphor-license +inherit obmc-phosphor-dbus-service +inherit phosphor-logging +inherit phosphor-dbus-yaml + +DEPENDS += "autoconf-archive-native" +DEPENDS += "systemd" +DEPENDS += "python-mako-native" +DEPENDS += "python-pyyaml-native" +DEPENDS += "sdbusplus sdbusplus-native" +DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native" +DEPENDS += "virtual/phosphor-logging-callouts" +DEPENDS += "phosphor-logging-error-logs-native" +DEPENDS += "phosphor-logging-native" +DEPENDS += "cereal" + +PACKAGE_BEFORE_PN = "${PN}-test" +FILES_${PN}-test = "${bindir}/*-test" + +PACKAGE_BEFORE_PN += "${PN}-elog" +FILES_${PN}-elog += "${elog_dir}" + +# Package configuration +LOGGING_PACKAGES = " \ + ${PN}-base \ +" + +ALLOW_EMPTY_${PN} = "1" +PACKAGE_BEFORE_PN += "${LOGGING_PACKAGES}" +SYSTEMD_PACKAGES = "${LOGGING_PACKAGES}" +DBUS_PACKAGES = "${LOGGING_PACKAGES}" + +RDEPENDS_${PN}-base += "sdbusplus phosphor-dbus-interfaces" +FILES_${PN}-base += " \ + ${sbindir}/phosphor-log-manager \ + ${libdir}/libphosphor_logging.so.* \ +" +DBUS_SERVICE_${PN}-base += "xyz.openbmc_project.Logging.service" + +SRC_URI += "git://github.com/openbmc/phosphor-logging" +SRCREV = "5ac1bde129258d906246f5d4ad78e036f03a6e80" + +S = "${WORKDIR}/git" + +# Do not DEPEND on the specified packages for native build +# as they will not be available in host machine +DEPENDS_remove_class-native = " \ + virtual/phosphor-logging-callouts \ + sdbus++ \ + systemd \ + cereal \ + " + +# Do not DEPEND on the specified packages for native SDK build +# as they will not be available in host machine +DEPENDS_remove_class-nativesdk = " \ + virtual/phosphor-logging-callouts \ + sdbus++-native \ + cereal \ + systemd \ + phosphor-dbus-interfaces \ + " + +PACKAGECONFIG ??= "metadata-processing install_scripts" + +PACKAGECONFIG[metadata-processing] = " \ + --enable-metadata-processing, \ + --disable-metadata-processing, , \ + " + +# Provide a means to enable/disable install_scripts feature +PACKAGECONFIG[install_scripts] = " \ + --enable-install_scripts, \ + --disable-install_scripts, ,\ + " + +# Enable install_scripts during native and native SDK build +PACKAGECONFIG_add_class-native = "install_scripts" +PACKAGECONFIG_add_class-nativesdk = "install_scripts" + +# Disable install_scripts during target build +PACKAGECONFIG_remove_class-target = "install_scripts" + +EXTRA_OECONF = " \ + YAML_DIR=${STAGING_DIR_NATIVE}${yaml_dir} \ + CALLOUTS_YAML=${STAGING_DIR_NATIVE}${callouts_datadir}/callouts.yaml \ + " + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service b/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service new file mode 100644 index 0000000000..946c3bf161 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service @@ -0,0 +1,12 @@ +[Unit] +Description=Phosphor Log Manager + +[Service] +ExecStart=/usr/bin/env phosphor-log-manager +SyslogIdentifier=phosphor-log-manager +Restart=always +Type=dbus +BusName={BUSNAME} + +[Install] +WantedBy={SYSTEMD_DEFAULT_TARGET} |