blob: 89f8e35dd679de9929a06a270d381c0a95adb963 [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 Geissler08bd2232020-05-18 13:30:23 +00009SRCREV = "29c2ec6dd67df321662c906711ec95a4635b372f"
Matt Spinler522fe002018-03-28 12:59:43 -050010
11inherit autotools
12inherit pkgconfig
Matt Spinler04925b92020-02-20 10:56:34 -060013inherit python3native
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 += " \
Patrick Williamsf11928b2020-06-12 12:10:52 -050019 ${PYTHON_PN}-pyyaml-native \
Matt Spinler522fe002018-03-28 12:59:43 -050020 autoconf-archive-native \
Patrick Williamsf11928b2020-06-12 12:10:52 -050021 ibm-dbus-interfaces \
22 nlohmann-json \
23 phosphor-logging \
Matt Spinler522fe002018-03-28 12:59:43 -050024 sdbusplus \
25 "
26
Matt Spinler522fe002018-03-28 12:59:43 -050027S = "${WORKDIR}/git"
28
29SRC_URI += "file://policyTable.json"
30
31PACKAGECONFIG ??= ""
32PACKAGECONFIG[policy-interface] = "--enable-policy-interface, --disable-policy-interface,,"
33
Brad Bishop6e05ef22020-04-22 14:06:02 -040034PACKAGECONFIG_ibm-ac-server = "policy-interface"
35PACKAGECONFIG_mihawk = "policy-interface"
36
Matt Spinler522fe002018-03-28 12:59:43 -050037SERVICE = "com.ibm.Logging.service"
38DBUS_SERVICE_${PN} += "${SERVICE}"
39
40#The link is so that this service will restart if phosphor-logging restarts.
41#The BindsTo in the service will not do the restart, it will only do the
42#original start and a stop.
43LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}"
44SYSTEMD_LINK_${PN} += "${LOG_FMT}"
45
46do_install_append(){
47
48 install -d ${D}${datadir}/ibm-logging
49
50 ${S}/condense_policy.py \
51 -p ${WORKDIR}/policyTable.json \
52 -c ${D}/${datadir}/ibm-logging/policy.json
53}
Matt Spinlercf763692018-03-28 14:00:19 -050054
55#An optional task to generate a report on all of the errors
56#created by OpenBMC, and compare these errors to what is
57#in the error policy table
58do_report(){
59
60 ${S}/create_error_reports.py \
61 -p ${D}/${datadir}/ibm-logging/policy.json \
Patrick Williamsf11928b2020-06-12 12:10:52 -050062 -y ${STAGING_DIR_TARGET}${yaml_dir} \
Matt Spinlercf763692018-03-28 14:00:19 -050063 -e ${WORKDIR}/build/all_errors.json \
64 -x ${WORKDIR}/build/policy_crosscheck.txt
65
66}
67
Patrick Williamsf11928b2020-06-12 12:10:52 -050068addtask report after do_install