blob: 389e46d40ffce516de403490737467e73d3cb0a3 [file] [log] [blame]
Matt Spinler522fe002018-03-28 12:59:43 -05001SUMMARY = "IBM enhanced error logging"
2DESCRIPTION = "Adds additional error logging functionality for IBM systems"
3PR = "r1"
Patrick Venture0818f6b2018-10-26 09:39:44 -07004PV = "1.0+git${SRCPV}"
Matt Spinler522fe002018-03-28 12:59:43 -05005HOMEPAGE = "https://github.com/openbmc/ibm-logging"
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
8SRC_URI += "git://github.com/openbmc/ibm-logging"
Andrew Geissler710c8302019-02-14 05:10:42 +00009SRCREV = "18825049f94eaeda078e7fa94d32eea31f1b48db"
Matt Spinler522fe002018-03-28 12:59:43 -050010
11inherit autotools
12inherit pkgconfig
Matt Spinlercf763692018-03-28 14:00:19 -050013inherit pythonnative
Matt Spinler522fe002018-03-28 12:59:43 -050014inherit obmc-phosphor-dbus-service
15inherit obmc-phosphor-systemd
Matt Spinlercf763692018-03-28 14:00:19 -050016inherit phosphor-dbus-yaml
Matt Spinler522fe002018-03-28 12:59:43 -050017
18DEPENDS += " \
19 ibm-dbus-interfaces \
20 phosphor-logging \
21 nlohmann-json \
22 autoconf-archive-native \
23 sdbusplus \
24 "
25
26RDEPENDS_${PN} += " \
27 phosphor-logging \
28 phosphor-dbus-interfaces \
29 sdbusplus \
30 "
31
32S = "${WORKDIR}/git"
33
34SRC_URI += "file://policyTable.json"
35
36PACKAGECONFIG ??= ""
37PACKAGECONFIG[policy-interface] = "--enable-policy-interface, --disable-policy-interface,,"
38
39SERVICE = "com.ibm.Logging.service"
40DBUS_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.
45LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}"
46SYSTEMD_LINK_${PN} += "${LOG_FMT}"
47
48do_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 Spinlercf763692018-03-28 14:00:19 -050056
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
60do_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
70addtask report
71
72#Collect all of the error YAML files into our recipe-sysroot-native dir.
73do_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 "