summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Bergin <peter@berginkonsult.se>2026-03-16 10:07:22 +0100
committerKhem Raj <raj.khem@gmail.com>2026-03-17 13:25:12 -0700
commit46ae413c63fbd5ee8b393254e8efda873c5de65e (patch)
treea00b9b10fb0caa0c1123b52f7ad1f813f16ce1e4
parentd6815efa84fcea4757cefed05609f2ef62fab91a (diff)
downloadmeta-openembedded-46ae413c63fbd5ee8b393254e8efda873c5de65e.tar.gz
rtla: add recipe for real-time linux analysis tool
rtla source code is present in the kernel source tree at tools/tracing/rtla. There is another build option for rtla to enable bpf bindings, this was not a quick one to get working and left as a future improvement. Makefile for rtla has evolved in newer kernels (v6.9). Some fixes needed for support with older kernels. This commit was tested against 6.18 and 6.8. Also add rtla to packagegroup-meta-oe-benchmarks. Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb1
-rw-r--r--meta-oe/recipes-kernel/rtla/rtla.bb47
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 @@
1SUMMARY = "Real-Time Linux Analysis tool"
2LICENSE = "GPL-2.0-only"
3
4DEPENDS = "libtraceevent libtracefs"
5PROVIDES = "virtual/rtla"
6
7B = "${WORKDIR}/${BPN}-${PV}"
8
9inherit kernelsrc kernel-arch pkgconfig
10
11do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
12
13PACKAGECONFIG ??= ""
14PACKAGECONFIG[cpupower] = ",,cpupower"
15
16EXTRA_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
20do_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
32do_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
47PACKAGE_ARCH = "${MACHINE_ARCH}"