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 | RDEPENDS_${PN} += " \ |
| 21 | phosphor-logging \ |
| 22 | " |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
Vishwanatha Subbanna | b7f7419 | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 26 | # This provides below 2 applications that are called into in case |
| 27 | # of host checkstop and host watchdog timeout respectively. |
| 28 | APPS = "checkstop watchdog" |
Marri Devender Rao | 84f125e | 2017-04-27 03:38:39 -0500 | [diff] [blame] | 29 | |
Vishwanatha Subbanna | b7f7419 | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 30 | DEBUG_TMPL = "openpower-debug-collector-{0}@.service" |
| 31 | SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}" |
| 32 | |
| 33 | # This needs to be executed as part of host crash |
| 34 | CHECKSTOP_TMPL = "openpower-debug-collector-checkstop@.service" |
| 35 | CRASH_TGTFMT = "obmc-host-crash@{0}.target" |
| 36 | CHECKSTOP_INSTFMT = "openpower-debug-collector-checkstop@{0}.service" |
| 37 | CRASH_CHECKSTOP_FMT = "../${CHECKSTOP_TMPL}:${CRASH_TGTFMT}.wants/${CHECKSTOP_INSTFMT}" |
| 38 | |
Vishwanatha Subbanna | eeae33c | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 39 | # Make watchdog part of obmc-host-timeout target |
Vishwanatha Subbanna | b7f7419 | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 40 | WDOG_TMPL = "openpower-debug-collector-watchdog@.service" |
Vishwanatha Subbanna | eeae33c | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 41 | TIMEOUT_TGTFMT = "obmc-host-timeout@{0}.target" |
Vishwanatha Subbanna | b7f7419 | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 42 | WDOG_INSTFMT = "openpower-debug-collector-watchdog@{0}.service" |
Vishwanatha Subbanna | eeae33c | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 43 | TIMEOUT_WDOG_FMT = "../${WDOG_TMPL}:${TIMEOUT_TGTFMT}.wants/${WDOG_INSTFMT}" |
Vishwanatha Subbanna | b7f7419 | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 44 | |
spashabk-in | 4287928 | 2017-10-11 07:59:07 -0500 | [diff] [blame] | 45 | # Capture debug information on watchdog timeout |
| 46 | DEBUG_WD_TIMEOUT_TMPL = "openpower-debug-collector-watchdog-timeout@.service" |
| 47 | DEBUG_WD_TIMEOUT_INSTFMT = "openpower-debug-collector-watchdog-timeout@{0}.service" |
| 48 | DEBUG_WD_TIMEOUT_FMT = "../${DEBUG_WD_TIMEOUT_TMPL}:${TIMEOUT_TGTFMT}.wants/${DEBUG_WD_TIMEOUT_INSTFMT}" |
| 49 | |
Vishwanatha Subbanna | b7f7419 | 2017-06-13 14:11:06 +0530 | [diff] [blame] | 50 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}" |
Vishwanatha Subbanna | eeae33c | 2017-06-13 15:00:24 +0530 | [diff] [blame] | 51 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}" |
spashabk-in | 4287928 | 2017-10-11 07:59:07 -0500 | [diff] [blame] | 52 | 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] | 53 | |
| 54 | # Do not depend on phosphor-logging for native build |
| 55 | DEPENDS_remove_class-native = "phosphor-logging" |
| 56 | |
| 57 | # Do not depend on phosphor-logging for native SDK build |
| 58 | DEPENDS_remove_class-nativesdk = "phosphor-logging" |
| 59 | |
| 60 | # Provide a means to enable/disable install_error_yaml feature |
| 61 | PACKAGECONFIG ??= "install_error_yaml" |
| 62 | PACKAGECONFIG[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 |
| 68 | PACKAGECONFIG_add_class-native = "install_error_yaml" |
| 69 | PACKAGECONFIG_add_class-nativesdk = "install_error_yaml" |
| 70 | |
| 71 | # Disable install_error_yaml during target build |
| 72 | PACKAGECONFIG_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 |
| 76 | EXTRA_OECONF += "--disable-gen_errors" |
| 77 | |
| 78 | BBCLASSEXTEND += "native nativesdk" |