blob: 4e4362571bf264bdefaf951d119a652890a9d5ab [file] [log] [blame]
Marri Devender Rao84f125e2017-04-27 03:38:39 -05001SUMMARY = "OpenPOWER Debug Collector"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +05302DESCRIPTION = "Application to log error during host checkstop and watchdog timeout"
Marri Devender Rao84f125e2017-04-27 03:38:39 -05003
4PR = "r1"
Patrick Venturee2e5fa72018-10-26 09:43:44 -07005PV = "1.0+git${SRCPV}"
Marri Devender Rao84f125e2017-04-27 03:38:39 -05006
7inherit autotools \
8 pkgconfig \
9 obmc-phosphor-systemd \
Marri Devender Raodb5a6c42017-09-27 21:55:57 -050010 pythonnative \
11 phosphor-dbus-yaml
Marri Devender Rao84f125e2017-04-27 03:38:39 -050012
13require ${PN}.inc
14
15DEPENDS += " \
16 phosphor-logging \
17 autoconf-archive-native \
Patrick Williamsba5282b2020-03-31 16:43:15 -050018 ${PYTHON_PN}-sdbus++-native \
Marri Devender Rao84f125e2017-04-27 03:38:39 -050019 "
Marri Devender Rao84f125e2017-04-27 03:38:39 -050020S = "${WORKDIR}/git"
21
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053022# This provides below 2 applications that are called into in case
23# of host checkstop and host watchdog timeout respectively.
24APPS = "checkstop watchdog"
Marri Devender Rao84f125e2017-04-27 03:38:39 -050025
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053026DEBUG_TMPL = "openpower-debug-collector-{0}@.service"
27SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}"
28
29# This needs to be executed as part of host crash
30CHECKSTOP_TMPL = "openpower-debug-collector-checkstop@.service"
31CRASH_TGTFMT = "obmc-host-crash@{0}.target"
32CHECKSTOP_INSTFMT = "openpower-debug-collector-checkstop@{0}.service"
33CRASH_CHECKSTOP_FMT = "../${CHECKSTOP_TMPL}:${CRASH_TGTFMT}.wants/${CHECKSTOP_INSTFMT}"
34
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053035# Make watchdog part of obmc-host-timeout target
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053036WDOG_TMPL = "openpower-debug-collector-watchdog@.service"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053037TIMEOUT_TGTFMT = "obmc-host-timeout@{0}.target"
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053038WDOG_INSTFMT = "openpower-debug-collector-watchdog@{0}.service"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053039TIMEOUT_WDOG_FMT = "../${WDOG_TMPL}:${TIMEOUT_TGTFMT}.wants/${WDOG_INSTFMT}"
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053040
spashabk-in42879282017-10-11 07:59:07 -050041# Capture debug information on watchdog timeout
42DEBUG_WD_TIMEOUT_TMPL = "openpower-debug-collector-watchdog-timeout@.service"
43DEBUG_WD_TIMEOUT_INSTFMT = "openpower-debug-collector-watchdog-timeout@{0}.service"
44DEBUG_WD_TIMEOUT_FMT = "../${DEBUG_WD_TIMEOUT_TMPL}:${TIMEOUT_TGTFMT}.wants/${DEBUG_WD_TIMEOUT_INSTFMT}"
45
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053046SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053047SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}"
spashabk-in42879282017-10-11 07:59:07 -050048SYSTEMD_LINK_${PN} += "${@compose_list(d, 'DEBUG_WD_TIMEOUT_FMT', 'OBMC_HOST_INSTANCES')}"
Marri Devender Raodb5a6c42017-09-27 21:55:57 -050049
50# Do not depend on phosphor-logging for native build
51DEPENDS_remove_class-native = "phosphor-logging"
52
53# Do not depend on phosphor-logging for native SDK build
54DEPENDS_remove_class-nativesdk = "phosphor-logging"
55
56# Provide a means to enable/disable install_error_yaml feature
57PACKAGECONFIG ??= "install_error_yaml"
58PACKAGECONFIG[install_error_yaml] = " \
59 --enable-install_error_yaml, \
60 --disable-install_error_yaml, ,\
61 "
62
63# Enable install_error_yaml during native and native SDK build
64PACKAGECONFIG_add_class-native = "install_error_yaml"
65PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
66
67# Disable install_error_yaml during target build
68PACKAGECONFIG_remove_class-target = "install_error_yaml"
69
70# Disable generating elog error header file during bitbake. Applications
71# should be using the elog header generated by phosphor-logging recipe
72EXTRA_OECONF += "--disable-gen_errors"
73
74BBCLASSEXTEND += "native nativesdk"