blob: be84209af7d02f024bf100435ef158039b69947f [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
44SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}"
Vishwanatha Subbanna3a532e92017-06-13 15:00:24 +053045SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}"
Marri Devender Rao0c0e7e22017-09-27 21:55:57 -050046
47# Do not depend on phosphor-logging for native build
48DEPENDS_remove_class-native = "phosphor-logging"
49
50# Do not depend on phosphor-logging for native SDK build
51DEPENDS_remove_class-nativesdk = "phosphor-logging"
52
53# Provide a means to enable/disable install_error_yaml feature
54PACKAGECONFIG ??= "install_error_yaml"
55PACKAGECONFIG[install_error_yaml] = " \
56 --enable-install_error_yaml, \
57 --disable-install_error_yaml, ,\
58 "
59
60# Enable install_error_yaml during native and native SDK build
61PACKAGECONFIG_add_class-native = "install_error_yaml"
62PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
63
64# Disable install_error_yaml during target build
65PACKAGECONFIG_remove_class-target = "install_error_yaml"
66
67# Disable generating elog error header file during bitbake. Applications
68# should be using the elog header generated by phosphor-logging recipe
69EXTRA_OECONF += "--disable-gen_errors"
70
71BBCLASSEXTEND += "native nativesdk"