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