blob: 2dbfc07ce8e9c613d1b40a4f30eebb1c8004fc09 [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"
4HOMEPAGE = "https://github.com/openbmc/ibm-logging"
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
7SRC_URI += "git://github.com/openbmc/ibm-logging"
Andrew Geissler6b8f5982018-10-04 21:30:16 +00008SRCREV = "5b6d0f63c3d7391ede509cd0c0bd5820d15231d4"
Matt Spinler575b0c02018-03-28 12:59:43 -05009
10inherit autotools
11inherit pkgconfig
Matt Spinler17395012018-03-28 14:00:19 -050012inherit pythonnative
Matt Spinler575b0c02018-03-28 12:59:43 -050013inherit obmc-phosphor-dbus-service
14inherit obmc-phosphor-systemd
Matt Spinler17395012018-03-28 14:00:19 -050015inherit phosphor-dbus-yaml
Matt Spinler575b0c02018-03-28 12:59:43 -050016
17DEPENDS += " \
18 ibm-dbus-interfaces \
19 phosphor-logging \
20 nlohmann-json \
21 autoconf-archive-native \
22 sdbusplus \
23 "
24
25RDEPENDS_${PN} += " \
26 phosphor-logging \
27 phosphor-dbus-interfaces \
28 sdbusplus \
29 "
30
31S = "${WORKDIR}/git"
32
33SRC_URI += "file://policyTable.json"
34
35PACKAGECONFIG ??= ""
36PACKAGECONFIG[policy-interface] = "--enable-policy-interface, --disable-policy-interface,,"
37
38SERVICE = "com.ibm.Logging.service"
39DBUS_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.
44LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}"
45SYSTEMD_LINK_${PN} += "${LOG_FMT}"
46
47do_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 Spinler17395012018-03-28 14:00:19 -050055
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
59do_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
69addtask report
70
71#Collect all of the error YAML files into our recipe-sysroot-native dir.
72do_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 "