summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
blob: 7f8af837ee5d1b4b08c3ec8f7bcfb12711f04896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SUMMARY = "Hardware Diagnostics for POWER Systems"

DESCRIPTION = \
    "In the event of a system fatal error reported by the internal system \
    hardware (processor chips, memory chips, I/O chips, system memory, etc.), \
    POWER Systems have the ability to diagnose the root cause of the failure \
    and perform any service action needed to avoid repeated system failures."

HOMEPAGE = "https://github.com/openbmc/openpower-hw-diags"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

PR = "r1"
PV = "0.1+git${SRCPV}"

SRC_URI = "git://github.com/openbmc/openpower-hw-diags;branch=master;protocol=https"
SRCREV = "a92dc027c4532d20ba94c96ab7029d74fad6e6cb"

S = "${WORKDIR}/git"

inherit pkgconfig meson systemd

SYSTEMD_SERVICE:${PN} = "attn_handler.service"

DEPENDS = "boost libgpiod pdbg phosphor-logging sdbusplus openpower-libhei \
           nlohmann-json valijson fmt"

# This is required so that libhei is installed with the chip data files.
RDEPENDS:${PN} += "openpower-libhei"

# Conditionally pull in PHAL APIs, if available.
PACKAGECONFIG ??= "${@bb.utils.filter('MACHINE_FEATURES', 'phal', d)}"
PACKAGECONFIG[phal] = "-Dphal=enabled, -Dphal=disabled, ipl pdata"

# Don't build CI tests
EXTRA_OEMESON = "-Dtests=disabled"

pkg_postinst:${PN}() {
    mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.wants
    LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/attn_handler.service"
    TARGET="../attn_handler.service"
    ln -s $TARGET $LINK
}

pkg_prerm:${PN}() {
    LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/attn_handler.service"
    rm $LINK
}