Matt Spinler | 575b0c0 | 2018-03-28 12:59:43 -0500 | [diff] [blame] | 1 | SUMMARY = "IBM enhanced error logging" |
| 2 | DESCRIPTION = "Adds additional error logging functionality for IBM systems" |
| 3 | PR = "r1" |
Patrick Venture | 18823e6 | 2018-10-26 09:39:44 -0700 | [diff] [blame] | 4 | PV = "1.0+git${SRCPV}" |
Matt Spinler | 575b0c0 | 2018-03-28 12:59:43 -0500 | [diff] [blame] | 5 | HOMEPAGE = "https://github.com/openbmc/ibm-logging" |
| 6 | LICENSE = "Apache-2.0" |
| 7 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" |
| 8 | SRC_URI += "git://github.com/openbmc/ibm-logging" |
Andrew Geissler | 528c1fe | 2018-11-13 19:10:09 +0000 | [diff] [blame] | 9 | SRCREV = "f5866e704d9429a7195a20aaf52c778591531d88" |
Matt Spinler | 575b0c0 | 2018-03-28 12:59:43 -0500 | [diff] [blame] | 10 | |
| 11 | inherit autotools |
| 12 | inherit pkgconfig |
Matt Spinler | 1739501 | 2018-03-28 14:00:19 -0500 | [diff] [blame] | 13 | inherit pythonnative |
Matt Spinler | 575b0c0 | 2018-03-28 12:59:43 -0500 | [diff] [blame] | 14 | inherit obmc-phosphor-dbus-service |
| 15 | inherit obmc-phosphor-systemd |
Matt Spinler | 1739501 | 2018-03-28 14:00:19 -0500 | [diff] [blame] | 16 | inherit phosphor-dbus-yaml |
Matt Spinler | 575b0c0 | 2018-03-28 12:59:43 -0500 | [diff] [blame] | 17 | |
| 18 | DEPENDS += " \ |
| 19 | ibm-dbus-interfaces \ |
| 20 | phosphor-logging \ |
| 21 | nlohmann-json \ |
| 22 | autoconf-archive-native \ |
| 23 | sdbusplus \ |
| 24 | " |
| 25 | |
| 26 | RDEPENDS_${PN} += " \ |
| 27 | phosphor-logging \ |
| 28 | phosphor-dbus-interfaces \ |
| 29 | sdbusplus \ |
| 30 | " |
| 31 | |
| 32 | S = "${WORKDIR}/git" |
| 33 | |
| 34 | SRC_URI += "file://policyTable.json" |
| 35 | |
| 36 | PACKAGECONFIG ??= "" |
| 37 | PACKAGECONFIG[policy-interface] = "--enable-policy-interface, --disable-policy-interface,," |
| 38 | |
| 39 | SERVICE = "com.ibm.Logging.service" |
| 40 | DBUS_SERVICE_${PN} += "${SERVICE}" |
| 41 | |
| 42 | #The link is so that this service will restart if phosphor-logging restarts. |
| 43 | #The BindsTo in the service will not do the restart, it will only do the |
| 44 | #original start and a stop. |
| 45 | LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}" |
| 46 | SYSTEMD_LINK_${PN} += "${LOG_FMT}" |
| 47 | |
| 48 | do_install_append(){ |
| 49 | |
| 50 | install -d ${D}${datadir}/ibm-logging |
| 51 | |
| 52 | ${S}/condense_policy.py \ |
| 53 | -p ${WORKDIR}/policyTable.json \ |
| 54 | -c ${D}/${datadir}/ibm-logging/policy.json |
| 55 | } |
Matt Spinler | 1739501 | 2018-03-28 14:00:19 -0500 | [diff] [blame] | 56 | |
| 57 | #An optional task to generate a report on all of the errors |
| 58 | #created by OpenBMC, and compare these errors to what is |
| 59 | #in the error policy table |
| 60 | do_report(){ |
| 61 | |
| 62 | ${S}/create_error_reports.py \ |
| 63 | -p ${D}/${datadir}/ibm-logging/policy.json \ |
| 64 | -y ${STAGING_DIR_NATIVE}${yaml_dir} \ |
| 65 | -e ${WORKDIR}/build/all_errors.json \ |
| 66 | -x ${WORKDIR}/build/policy_crosscheck.txt |
| 67 | |
| 68 | } |
| 69 | |
| 70 | addtask report |
| 71 | |
| 72 | #Collect all of the error YAML files into our recipe-sysroot-native dir. |
| 73 | do_report[depends] = " \ |
| 74 | ibm-logging:do_install \ |
| 75 | phosphor-logging-error-logs-native:do_populate_sysroot \ |
| 76 | phosphor-dbus-interfaces-native:do_populate_sysroot \ |
| 77 | openpower-dbus-interfaces-native:do_populate_sysroot \ |
| 78 | openpower-occ-control-native:do_populate_sysroot \ |
| 79 | openpower-debug-collector-native:do_populate_sysroot \ |
| 80 | " |