blob: f98ee1c705e7917e76e120d48873aadc321dbca2 [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 Geissler70304172019-11-12 16:50:23 +00009SRCREV = "4c0e8945f072f9139d0efb04e8f955663b972a84"
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
Matt Spinler575b0c02018-03-28 12:59:43 -050026S = "${WORKDIR}/git"
27
28SRC_URI += "file://policyTable.json"
29
30PACKAGECONFIG ??= ""
31PACKAGECONFIG[policy-interface] = "--enable-policy-interface, --disable-policy-interface,,"
32
33SERVICE = "com.ibm.Logging.service"
34DBUS_SERVICE_${PN} += "${SERVICE}"
35
36#The link is so that this service will restart if phosphor-logging restarts.
37#The BindsTo in the service will not do the restart, it will only do the
38#original start and a stop.
39LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}"
40SYSTEMD_LINK_${PN} += "${LOG_FMT}"
41
42do_install_append(){
43
44 install -d ${D}${datadir}/ibm-logging
45
46 ${S}/condense_policy.py \
47 -p ${WORKDIR}/policyTable.json \
48 -c ${D}/${datadir}/ibm-logging/policy.json
49}
Matt Spinler17395012018-03-28 14:00:19 -050050
51#An optional task to generate a report on all of the errors
52#created by OpenBMC, and compare these errors to what is
53#in the error policy table
54do_report(){
55
56 ${S}/create_error_reports.py \
57 -p ${D}/${datadir}/ibm-logging/policy.json \
58 -y ${STAGING_DIR_NATIVE}${yaml_dir} \
59 -e ${WORKDIR}/build/all_errors.json \
60 -x ${WORKDIR}/build/policy_crosscheck.txt
61
62}
63
64addtask report
65
66#Collect all of the error YAML files into our recipe-sysroot-native dir.
67do_report[depends] = " \
68 ibm-logging:do_install \
69 phosphor-logging-error-logs-native:do_populate_sysroot \
70 phosphor-dbus-interfaces-native:do_populate_sysroot \
71 openpower-dbus-interfaces-native:do_populate_sysroot \
72 openpower-occ-control-native:do_populate_sysroot \
73 openpower-debug-collector-native:do_populate_sysroot \
74 "