blob: b148921af0f113b6d1978a23ee6e57daebc3dc34 [file] [log] [blame]
Matt Spinler575b0c02018-03-28 12:59:43 -05001SUMMARY = "IBM enhanced error logging"
2DESCRIPTION = "Adds additional error logging functionality for IBM systems"
3PR = "r1"
Patrick Venture18823e62018-10-26 09:39:44 -07004PV = "1.0+git${SRCPV}"
Matt Spinler575b0c02018-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 Geissler7cbb5332018-10-25 13:30:08 +00009SRCREV = "9351665a5d9560e42b2fa42c3f95cd18f9455018"
Matt Spinler575b0c02018-03-28 12:59:43 -050010
11inherit autotools
12inherit pkgconfig
Matt Spinler17395012018-03-28 14:00:19 -050013inherit pythonnative
Matt Spinler575b0c02018-03-28 12:59:43 -050014inherit obmc-phosphor-dbus-service
15inherit obmc-phosphor-systemd
Matt Spinler17395012018-03-28 14:00:19 -050016inherit phosphor-dbus-yaml
Matt Spinler575b0c02018-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 Spinler17395012018-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 "