Marri Devender Rao | 6a48c3c | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 1 | SUMMARY = "OpenPOWER Debug Collector" |
Vishwanatha Subbanna | 3a532e9 | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 2 | DESCRIPTION = "Application to log error during host checkstop and watchdog timeout" |
Marri Devender Rao | 6a48c3c | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 3 | |
| 4 | PR = "r1" |
| 5 | |
| 6 | inherit autotools \ |
| 7 | pkgconfig \ |
| 8 | obmc-phosphor-systemd \ |
Marri Devender Rao | 0c0e7e2 | 2017-09-27 21:55:57 -0500 | [diff] [blame] | 9 | pythonnative \ |
| 10 | phosphor-dbus-yaml |
Marri Devender Rao | 6a48c3c | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 11 | |
| 12 | require ${PN}.inc |
| 13 | |
| 14 | DEPENDS += " \ |
| 15 | phosphor-logging \ |
| 16 | autoconf-archive-native \ |
Marri Devender Rao | 9d87330 | 2017-05-14 08:53:45 -0500 | [diff] [blame] | 17 | sdbus++-native \ |
Marri Devender Rao | 6a48c3c | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 18 | " |
Marri Devender Rao | 6a48c3c | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 19 | RDEPENDS_${PN} += " \ |
| 20 | phosphor-logging \ |
| 21 | " |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
Vishwanatha Subbanna | be519ef | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 25 | # This provides below 2 applications that are called into in case |
| 26 | # of host checkstop and host watchdog timeout respectively. |
| 27 | APPS = "checkstop watchdog" |
Marri Devender Rao | 6a48c3c | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 28 | |
Vishwanatha Subbanna | be519ef | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 29 | DEBUG_TMPL = "openpower-debug-collector-{0}@.service" |
| 30 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}" |
| 31 | |
| 32 | # This needs to be executed as part of host crash |
| 33 | CHECKSTOP_TMPL = "openpower-debug-collector-checkstop@.service" |
| 34 | CRASH_TGTFMT = "obmc-host-crash@{0}.target" |
| 35 | CHECKSTOP_INSTFMT = "openpower-debug-collector-checkstop@{0}.service" |
| 36 | CRASH_CHECKSTOP_FMT = "../${CHECKSTOP_TMPL}:${CRASH_TGTFMT}.wants/${CHECKSTOP_INSTFMT}" |
| 37 | |
Vishwanatha Subbanna | 3a532e9 | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 38 | # Make watchdog part of obmc-host-timeout target |
Vishwanatha Subbanna | be519ef | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 39 | WDOG_TMPL = "openpower-debug-collector-watchdog@.service" |
Vishwanatha Subbanna | 3a532e9 | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 40 | TIMEOUT_TGTFMT = "obmc-host-timeout@{0}.target" |
Vishwanatha Subbanna | be519ef | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 41 | WDOG_INSTFMT = "openpower-debug-collector-watchdog@{0}.service" |
Vishwanatha Subbanna | 3a532e9 | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 42 | TIMEOUT_WDOG_FMT = "../${WDOG_TMPL}:${TIMEOUT_TGTFMT}.wants/${WDOG_INSTFMT}" |
Vishwanatha Subbanna | be519ef | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 43 | |
spashabk-in | cbdf1a1 | 2017-10-11 07:59:07 -0500 | [diff] [blame] | 44 | # Capture debug information on watchdog timeout |
| 45 | DEBUG_WD_TIMEOUT_TMPL = "openpower-debug-collector-watchdog-timeout@.service" |
| 46 | DEBUG_WD_TIMEOUT_INSTFMT = "openpower-debug-collector-watchdog-timeout@{0}.service" |
| 47 | DEBUG_WD_TIMEOUT_FMT = "../${DEBUG_WD_TIMEOUT_TMPL}:${TIMEOUT_TGTFMT}.wants/${DEBUG_WD_TIMEOUT_INSTFMT}" |
| 48 | |
Vishwanatha Subbanna | be519ef | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 49 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}" |
Vishwanatha Subbanna | 3a532e9 | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 50 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}" |
spashabk-in | cbdf1a1 | 2017-10-11 07:59:07 -0500 | [diff] [blame] | 51 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'DEBUG_WD_TIMEOUT_FMT', 'OBMC_HOST_INSTANCES')}" |
Marri Devender Rao | 0c0e7e2 | 2017-09-27 21:55:57 -0500 | [diff] [blame] | 52 | |
| 53 | # Do not depend on phosphor-logging for native build |
| 54 | DEPENDS_remove_class-native = "phosphor-logging" |
| 55 | |
| 56 | # Do not depend on phosphor-logging for native SDK build |
| 57 | DEPENDS_remove_class-nativesdk = "phosphor-logging" |
| 58 | |
| 59 | # Provide a means to enable/disable install_error_yaml feature |
| 60 | PACKAGECONFIG ??= "install_error_yaml" |
| 61 | PACKAGECONFIG[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 |
| 67 | PACKAGECONFIG_add_class-native = "install_error_yaml" |
| 68 | PACKAGECONFIG_add_class-nativesdk = "install_error_yaml" |
| 69 | |
| 70 | # Disable install_error_yaml during target build |
| 71 | PACKAGECONFIG_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 |
| 75 | EXTRA_OECONF += "--disable-gen_errors" |
| 76 | |
| 77 | BBCLASSEXTEND += "native nativesdk" |