blob: ac4cd014110758c80af3fc2ad240f33e05b4d23a [file] [log] [blame]
Marri Devender Rao6a48c3c2017-04-27 03:38:39 -05001SUMMARY = "OpenPOWER Debug Collector"
Vishwanatha Subbanna3a532e92017-06-13 15:00:24 +05302DESCRIPTION = "Application to log error during host checkstop and watchdog timeout"
Marri Devender Rao6a48c3c2017-04-27 03:38:39 -05003
4PR = "r1"
5
6inherit autotools \
7 pkgconfig \
8 obmc-phosphor-systemd \
Marri Devender Rao0c0e7e22017-09-27 21:55:57 -05009 pythonnative \
10 phosphor-dbus-yaml
Marri Devender Rao6a48c3c2017-04-27 03:38:39 -050011
12require ${PN}.inc
13
14DEPENDS += " \
15 phosphor-logging \
16 autoconf-archive-native \
Marri Devender Rao9d873302017-05-14 08:53:45 -050017 sdbus++-native \
Marri Devender Rao6a48c3c2017-04-27 03:38:39 -050018 "
Marri Devender Rao6a48c3c2017-04-27 03:38:39 -050019RDEPENDS_${PN} += " \
20 phosphor-logging \
21 "
22
23S = "${WORKDIR}/git"
24
Vishwanatha Subbannabe519ef2017-06-13 14:11:06 +053025# This provides below 2 applications that are called into in case
26# of host checkstop and host watchdog timeout respectively.
27APPS = "checkstop watchdog"
Marri Devender Rao6a48c3c2017-04-27 03:38:39 -050028
Vishwanatha Subbannabe519ef2017-06-13 14:11:06 +053029DEBUG_TMPL = "openpower-debug-collector-{0}@.service"
30SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}"
31
32# This needs to be executed as part of host crash
33CHECKSTOP_TMPL = "openpower-debug-collector-checkstop@.service"
34CRASH_TGTFMT = "obmc-host-crash@{0}.target"
35CHECKSTOP_INSTFMT = "openpower-debug-collector-checkstop@{0}.service"
36CRASH_CHECKSTOP_FMT = "../${CHECKSTOP_TMPL}:${CRASH_TGTFMT}.wants/${CHECKSTOP_INSTFMT}"
37
Vishwanatha Subbanna3a532e92017-06-13 15:00:24 +053038# Make watchdog part of obmc-host-timeout target
Vishwanatha Subbannabe519ef2017-06-13 14:11:06 +053039WDOG_TMPL = "openpower-debug-collector-watchdog@.service"
Vishwanatha Subbanna3a532e92017-06-13 15:00:24 +053040TIMEOUT_TGTFMT = "obmc-host-timeout@{0}.target"
Vishwanatha Subbannabe519ef2017-06-13 14:11:06 +053041WDOG_INSTFMT = "openpower-debug-collector-watchdog@{0}.service"
Vishwanatha Subbanna3a532e92017-06-13 15:00:24 +053042TIMEOUT_WDOG_FMT = "../${WDOG_TMPL}:${TIMEOUT_TGTFMT}.wants/${WDOG_INSTFMT}"
Vishwanatha Subbannabe519ef2017-06-13 14:11:06 +053043
spashabk-incbdf1a12017-10-11 07:59:07 -050044# Capture debug information on watchdog timeout
45DEBUG_WD_TIMEOUT_TMPL = "openpower-debug-collector-watchdog-timeout@.service"
46DEBUG_WD_TIMEOUT_INSTFMT = "openpower-debug-collector-watchdog-timeout@{0}.service"
47DEBUG_WD_TIMEOUT_FMT = "../${DEBUG_WD_TIMEOUT_TMPL}:${TIMEOUT_TGTFMT}.wants/${DEBUG_WD_TIMEOUT_INSTFMT}"
48
Vishwanatha Subbannabe519ef2017-06-13 14:11:06 +053049SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}"
Vishwanatha Subbanna3a532e92017-06-13 15:00:24 +053050SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}"
spashabk-incbdf1a12017-10-11 07:59:07 -050051SYSTEMD_LINK_${PN} += "${@compose_list(d, 'DEBUG_WD_TIMEOUT_FMT', 'OBMC_HOST_INSTANCES')}"
Marri Devender Rao0c0e7e22017-09-27 21:55:57 -050052
53# Do not depend on phosphor-logging for native build
54DEPENDS_remove_class-native = "phosphor-logging"
55
56# Do not depend on phosphor-logging for native SDK build
57DEPENDS_remove_class-nativesdk = "phosphor-logging"
58
59# Provide a means to enable/disable install_error_yaml feature
60PACKAGECONFIG ??= "install_error_yaml"
61PACKAGECONFIG[install_error_yaml] = " \
62 --enable-install_error_yaml, \
63 --disable-install_error_yaml, ,\
64 "
65
66# Enable install_error_yaml during native and native SDK build
67PACKAGECONFIG_add_class-native = "install_error_yaml"
68PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
69
70# Disable install_error_yaml during target build
71PACKAGECONFIG_remove_class-target = "install_error_yaml"
72
73# Disable generating elog error header file during bitbake. Applications
74# should be using the elog header generated by phosphor-logging recipe
75EXTRA_OECONF += "--disable-gen_errors"
76
77BBCLASSEXTEND += "native nativesdk"