blob: 9127273d17025cd6d8271168ae76876f6e42b28d [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 \
Marri Devender Rao8763e752017-05-14 08:53:45 -050018 sdbus++-native \
Marri Devender Rao84f125e2017-04-27 03:38:39 -050019 "
Marri Devender Rao84f125e2017-04-27 03:38:39 -050020RDEPENDS_${PN} += " \
21 phosphor-logging \
22 "
23
24S = "${WORKDIR}/git"
25
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053026# This provides below 2 applications that are called into in case
27# of host checkstop and host watchdog timeout respectively.
28APPS = "checkstop watchdog"
Marri Devender Rao84f125e2017-04-27 03:38:39 -050029
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053030DEBUG_TMPL = "openpower-debug-collector-{0}@.service"
31SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}"
32
33# This needs to be executed as part of host crash
34CHECKSTOP_TMPL = "openpower-debug-collector-checkstop@.service"
35CRASH_TGTFMT = "obmc-host-crash@{0}.target"
36CHECKSTOP_INSTFMT = "openpower-debug-collector-checkstop@{0}.service"
37CRASH_CHECKSTOP_FMT = "../${CHECKSTOP_TMPL}:${CRASH_TGTFMT}.wants/${CHECKSTOP_INSTFMT}"
38
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053039# Make watchdog part of obmc-host-timeout target
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053040WDOG_TMPL = "openpower-debug-collector-watchdog@.service"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053041TIMEOUT_TGTFMT = "obmc-host-timeout@{0}.target"
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053042WDOG_INSTFMT = "openpower-debug-collector-watchdog@{0}.service"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053043TIMEOUT_WDOG_FMT = "../${WDOG_TMPL}:${TIMEOUT_TGTFMT}.wants/${WDOG_INSTFMT}"
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053044
spashabk-in42879282017-10-11 07:59:07 -050045# Capture debug information on watchdog timeout
46DEBUG_WD_TIMEOUT_TMPL = "openpower-debug-collector-watchdog-timeout@.service"
47DEBUG_WD_TIMEOUT_INSTFMT = "openpower-debug-collector-watchdog-timeout@{0}.service"
48DEBUG_WD_TIMEOUT_FMT = "../${DEBUG_WD_TIMEOUT_TMPL}:${TIMEOUT_TGTFMT}.wants/${DEBUG_WD_TIMEOUT_INSTFMT}"
49
Vishwanatha Subbannab7f74192017-06-13 14:11:06 +053050SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}"
Vishwanatha Subbannaeeae33c2017-06-13 15:00:24 +053051SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}"
spashabk-in42879282017-10-11 07:59:07 -050052SYSTEMD_LINK_${PN} += "${@compose_list(d, 'DEBUG_WD_TIMEOUT_FMT', 'OBMC_HOST_INSTANCES')}"
Marri Devender Raodb5a6c42017-09-27 21:55:57 -050053
54# Do not depend on phosphor-logging for native build
55DEPENDS_remove_class-native = "phosphor-logging"
56
57# Do not depend on phosphor-logging for native SDK build
58DEPENDS_remove_class-nativesdk = "phosphor-logging"
59
60# Provide a means to enable/disable install_error_yaml feature
61PACKAGECONFIG ??= "install_error_yaml"
62PACKAGECONFIG[install_error_yaml] = " \
63 --enable-install_error_yaml, \
64 --disable-install_error_yaml, ,\
65 "
66
67# Enable install_error_yaml during native and native SDK build
68PACKAGECONFIG_add_class-native = "install_error_yaml"
69PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
70
71# Disable install_error_yaml during target build
72PACKAGECONFIG_remove_class-target = "install_error_yaml"
73
74# Disable generating elog error header file during bitbake. Applications
75# should be using the elog header generated by phosphor-logging recipe
76EXTRA_OECONF += "--disable-gen_errors"
77
78BBCLASSEXTEND += "native nativesdk"