diff options
| -rw-r--r-- | meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-kernel/rtla/rtla.bb | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index 9fd7af6c08..0cbe3964c4 100644 --- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | |||
| @@ -68,6 +68,7 @@ RDEPENDS:packagegroup-meta-oe-benchmarks = "\ | |||
| 68 | nbench-byte \ | 68 | nbench-byte \ |
| 69 | phoronix-test-suite \ | 69 | phoronix-test-suite \ |
| 70 | qperf \ | 70 | qperf \ |
| 71 | rtla \ | ||
| 71 | s-suite \ | 72 | s-suite \ |
| 72 | stressapptest \ | 73 | stressapptest \ |
| 73 | tinymembench \ | 74 | tinymembench \ |
diff --git a/meta-oe/recipes-kernel/rtla/rtla.bb b/meta-oe/recipes-kernel/rtla/rtla.bb new file mode 100644 index 0000000000..829804c4ea --- /dev/null +++ b/meta-oe/recipes-kernel/rtla/rtla.bb | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | SUMMARY = "Real-Time Linux Analysis tool" | ||
| 2 | LICENSE = "GPL-2.0-only" | ||
| 3 | |||
| 4 | DEPENDS = "libtraceevent libtracefs" | ||
| 5 | PROVIDES = "virtual/rtla" | ||
| 6 | |||
| 7 | B = "${WORKDIR}/${BPN}-${PV}" | ||
| 8 | |||
| 9 | inherit kernelsrc kernel-arch pkgconfig | ||
| 10 | |||
| 11 | do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" | ||
| 12 | |||
| 13 | PACKAGECONFIG ??= "" | ||
| 14 | PACKAGECONFIG[cpupower] = ",,cpupower" | ||
| 15 | |||
| 16 | EXTRA_OEMAKE = "V=1 -C ${S}/tools/tracing/rtla O=${B} CROSS=${TARGET_PREFIX} \ | ||
| 17 | CC="${CC} ${DEBUG_PREFIX_MAP} -D_GNU_SOURCE" LD="${LD}" AR=${AR} ARCH=${ARCH} \ | ||
| 18 | BUILD_BPF_SKEL=0" | ||
| 19 | |||
| 20 | do_compile() { | ||
| 21 | # Older kernels (before 6.9) use a standalone rtla Makefile that does not honor | ||
| 22 | # O= so outputs land in the kernel source tree (shared workdir). Remove | ||
| 23 | # build output to make sure it is rebuilt. For newer kernels this wil be a no-op. | ||
| 24 | rm -f ${S}/tools/tracing/rtla/rtla | ||
| 25 | rm -f ${S}/tools/tracing/rtla/src/*.o | ||
| 26 | |||
| 27 | # Older kernels need additional variable EXTRA_LDFLAGS to pick up correct linker options. | ||
| 28 | export EXTRA_LDFLAGS="${LDFLAGS}" | ||
| 29 | oe_runmake | ||
| 30 | } | ||
| 31 | |||
| 32 | do_install() { | ||
| 33 | install -d ${D}${bindir} | ||
| 34 | |||
| 35 | # Older kernels (before 6.9) use a standalone rtla Makefile that does not honor | ||
| 36 | # O= for the final binary, so it ends up in the kernel source tree. | ||
| 37 | rtla_bin="${B}/rtla" | ||
| 38 | [ -f "${rtla_bin}" ] || rtla_bin="${S}/tools/tracing/rtla/rtla" | ||
| 39 | install -m 755 "${rtla_bin}" ${D}${bindir}/rtla | ||
| 40 | |||
| 41 | # rtla, osnoise, hwnoise, and timerlat are all the same binary | ||
| 42 | ln -s rtla ${D}${bindir}/osnoise | ||
| 43 | ln -s rtla ${D}${bindir}/hwnoise | ||
| 44 | ln -s rtla ${D}${bindir}/timerlat | ||
| 45 | } | ||
| 46 | |||
| 47 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
