blob: 5e99c8eac1f52dee25a3c0b2e38969c695096e48 [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"
Patrick Williamsbb99d222022-01-24 15:55:09 -06008SRC_URI += "git://github.com/openbmc/ibm-logging;branch=master;protocol=https"
Andrew Geissler74362a12022-08-04 15:20:18 -05009SRCREV = "2d38eda128a26df4e8db29baae649d4a24aeb65b"
Matt Spinler575b0c02018-03-28 12:59:43 -050010
11inherit autotools
12inherit pkgconfig
Matt Spinler1a9ef192020-02-20 10:56:34 -060013inherit python3native
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 += " \
Patrick Williams20a9cf32020-06-12 12:10:52 -050019 ${PYTHON_PN}-pyyaml-native \
Matt Spinler575b0c02018-03-28 12:59:43 -050020 autoconf-archive-native \
Matt Spinlerde04acf2020-06-16 16:15:43 -050021 phosphor-dbus-interfaces \
Patrick Williams20a9cf32020-06-12 12:10:52 -050022 nlohmann-json \
23 phosphor-logging \
Matt Spinler575b0c02018-03-28 12:59:43 -050024 sdbusplus \
25 "
26
Matt Spinler575b0c02018-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
Adriana Kobylakb96c7502021-08-06 16:25:30 +000034PACKAGECONFIG:ibm-ac-server = "policy-interface"
Brad Bishope1615142020-04-22 14:06:02 -040035
Matt Spinler575b0c02018-03-28 12:59:43 -050036SERVICE = "com.ibm.Logging.service"
Patrick Williams57b76242021-08-11 15:27:06 -050037DBUS_SERVICE:${PN} += "${SERVICE}"
Matt Spinler575b0c02018-03-28 12:59:43 -050038
39#The link is so that this service will restart if phosphor-logging restarts.
40#The BindsTo in the service will not do the restart, it will only do the
41#original start and a stop.
42LOG_FMT = "../${SERVICE}:xyz.openbmc_project.Logging.service.wants/${SERVICE}"
Patrick Williamse83c2202021-09-01 16:17:33 -050043SYSTEMD_LINK:${PN} += "${LOG_FMT}"
Matt Spinler575b0c02018-03-28 12:59:43 -050044
Adriana Kobylakb96c7502021-08-06 16:25:30 +000045do_install:append(){
Matt Spinler575b0c02018-03-28 12:59:43 -050046
47 install -d ${D}${datadir}/ibm-logging
48
49 ${S}/condense_policy.py \
50 -p ${WORKDIR}/policyTable.json \
51 -c ${D}/${datadir}/ibm-logging/policy.json
52}
Matt Spinler17395012018-03-28 14:00:19 -050053
54#An optional task to generate a report on all of the errors
55#created by OpenBMC, and compare these errors to what is
56#in the error policy table
57do_report(){
58
59 ${S}/create_error_reports.py \
60 -p ${D}/${datadir}/ibm-logging/policy.json \
Patrick Williams20a9cf32020-06-12 12:10:52 -050061 -y ${STAGING_DIR_TARGET}${yaml_dir} \
Matt Spinler17395012018-03-28 14:00:19 -050062 -e ${WORKDIR}/build/all_errors.json \
63 -x ${WORKDIR}/build/policy_crosscheck.txt
64
65}
66
Patrick Williams20a9cf32020-06-12 12:10:52 -050067addtask report after do_install