summaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
blob: 5a82ce3dd84265cd296bc1529c47a0e6c77baf03 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# DLT for Linux container integration
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"

# NOTE:
# file://0001-Disable-noisy-log-from-dlt-daemon.patch removed
# until someone can review its status with upstream and rebase
# it if it is still required.
SRC_URI:append = " \
    file://dlt.conf \
    file://dlt-system.conf \
    file://dlt_logstorage.conf \
"

# Mandatory require to systemd feature
inherit features_check
REQUIRED_DISTRO_FEATURES = "systemd"

PACKAGECONFIG = "systemd systemd-watchdog systemd-journal dlt-system unixsocket"

# General Options
PACKAGECONFIG[unixsocket] = "-DDLT_IPC=UNIX_SOCKET -DDLT_USER_IPC_PATH=${DLT_COMMON_IPC_PATH},-DDLT_IPC=FIFO"

# Common DLT log transfer path between host and guest
DLT_COMMON_IPC_PATH = "/run/dlt/"

# Breakdown each package from all in one
PACKAGE_BEFORE_PN:append = "libdlt ${PN}-command ${PN}-system ${PN}-gateway ${PN}-dbus ${PN}-example"

SYSTEMD_PACKAGES:append = " \
    ${@bb.utils.contains('PACKAGECONFIG', 'dlt-system', '${PN}-system', '', d)} \
    ${@bb.utils.contains('PACKAGECONFIG', 'dlt-dbus', ' ${PN}-dbus', '', d)} \
"
SYSTEMD_SERVICE:${PN}-system = "dlt-system.service"
SYSTEMD_AUTO_ENABLE:${PN}-system = "enable"
SYSTEMD_SERVICE:${PN}-dbus = "dlt-dbus.service"
SYSTEMD_AUTO_ENABLE:${PN}-dbus = "enable"
SYSTEMD_SERVICE:${PN} = "dlt.service"

do_install:append() {
    install -d ${D}${sysconfdir}
    install -m 0644 ${WORKDIR}/dlt.conf ${D}${sysconfdir}/
    install -m 0644 ${WORKDIR}/dlt-system.conf ${D}${sysconfdir}/

    install -d ${D}/var/nvlog/dlt
    install -m 0644 ${WORKDIR}/dlt_logstorage.conf ${D}/var/nvlog/dlt
}

FILES:libdlt = "${libdir}/libdlt${SOLIBS}"
FILES:${PN}-command = " \
    ${bindir}/dlt-receive \
    ${bindir}/dlt-control \
    ${bindir}/dlt-convert \
    ${bindir}/dlt-logstorage-ctrl \
    ${bindir}/dlt-sortbytimestamp \
    ${bindir}/dlt-adaptor-stdin \
"
FILES:${PN}-system = " \
    ${bindir}/dlt-system \
    ${sysconfdir}/dlt-system.conf \
    ${systemd_system_unitdir}/dlt-system.service \
"
FILES:${PN}-gateway = " \
    ${bindir}/dlt-passive-node-ctrl \
    ${sysconfdir}/dlt_gateway.conf \
"
FILES:${PN}-dbus = " \
    ${bindir}/dlt-dbus \
    ${sysconfdir}/dlt-dbus.conf \
"
FILES:${PN}-example = " \
    ${bindir}/dlt-example* \
"
FILES:${PN}:append = " \
    /var/nvlog/dlt/dlt_logstorage.conf \
"