Eddie James | acd9d07 | 2022-01-24 15:42:34 -0600 | [diff] [blame] | 1 | SUMMARY = "Enable Linux trace events" |
| 2 | DESCRIPTION = "Enable Linux trace events based on a configuration file" |
| 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 5 | |
Eddie James | acd9d07 | 2022-01-24 15:42:34 -0600 | [diff] [blame] | 6 | SRC_URI += " file://trace-enable" |
| 7 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 8 | S = "${WORKDIR}" |
| 9 | SYSTEMD_SERVICE:${PN} = "trace-enable.service" |
Eddie James | acd9d07 | 2022-01-24 15:42:34 -0600 | [diff] [blame] | 10 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 11 | inherit obmc-phosphor-systemd |
Eddie James | acd9d07 | 2022-01-24 15:42:34 -0600 | [diff] [blame] | 12 | |
| 13 | do_install:append() { |
| 14 | install -d ${D}${sysconfdir} |
| 15 | for event in ${TRACE_EVENTS} |
| 16 | do |
| 17 | echo ${event} >> ${D}${sysconfdir}/trace-events.conf |
| 18 | done |
| 19 | echo >> ${D}${sysconfdir}/trace-events.conf |
| 20 | chmod 0644 ${D}${sysconfdir}/trace-events.conf |
Eddie James | acd9d07 | 2022-01-24 15:42:34 -0600 | [diff] [blame] | 21 | install -d ${D}${libexecdir} |
| 22 | install -m 0755 ${WORKDIR}/trace-enable ${D}${libexecdir} |
| 23 | } |
| 24 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 25 | RDEPENDS:${PN} = " \ |
| 26 | ${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'} \ |
| 27 | bash \ |
| 28 | " |
Eddie James | acd9d07 | 2022-01-24 15:42:34 -0600 | [diff] [blame] | 29 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 30 | FILES:${PN} += "${sysconfdir}/trace-events.conf" |
| 31 | FILES:${PN} += "${libexecdir}/trace-enable" |
| 32 | |
| 33 | TRACE_EVENTS = "" |