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