When built against musl, this fails with the following error:
https://gist.github.com/OldManYellsAtCloud/3a96bf193bad86c8cd67ab30faa38d3a


On 3/6/26 12:39, Peter Bergin via lists.openembedded.org wrote:
> 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 <[email protected]>
> ---
>  .../packagegroups/packagegroup-meta-oe.bb     |  1 +
>  meta-oe/recipes-kernel/rtla/rtla.bb           | 47 +++++++++++++++++++
>  2 files changed, 48 insertions(+)
>  create mode 100644 meta-oe/recipes-kernel/rtla/rtla.bb
> 
> 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 = "\
>      nbench-byte \
>      phoronix-test-suite \
>      qperf \
> +    rtla \
>      s-suite \
>      stressapptest \
>      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..af40fd5bd2
> --- /dev/null
> +++ b/meta-oe/recipes-kernel/rtla/rtla.bb
> @@ -0,0 +1,47 @@
> +SUMMARY = "Real-Time Linux Analysis tool"
> +LICENSE = "GPL-2.0-only"
> +
> +DEPENDS = "libtraceevent libtracefs"
> +PROVIDES = "virtual/rtla"
> +
> +B = "${WORKDIR}/${BPN}-${PV}"
> +
> +inherit kernelsrc kernel-arch pkgconfig
> +
> +do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
> +
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[cpupower] = ",,cpupower"
> +
> +EXTRA_OEMAKE = "V=1 -C ${S}/tools/tracing/rtla O=${B} CROSS=${TARGET_PREFIX} 
> \
> +    CC="${CC} ${DEBUG_PREFIX_MAP}" LD="${LD}" AR=${AR} ARCH=${ARCH} \
> +    BUILD_BPF_SKEL=0"
> +
> +do_compile() {
> +    # Older kernels (before 6.9) use a standalone rtla Makefile that does 
> not honor
> +    # O= so outputs land in the kernel source tree (shared workdir). Remove
> +    # build output to make sure it is rebuilt. For newer kernels this wil be 
> a no-op.
> +    rm -f ${S}/tools/tracing/rtla/rtla
> +    rm -f ${S}/tools/tracing/rtla/src/*.o
> +
> +    # Older kernels need additional variable EXTRA_LDFLAGS to pick up 
> correct linker options.
> +    export EXTRA_LDFLAGS="${LDFLAGS}"
> +    oe_runmake
> +}
> +
> +do_install() {
> +    install -d ${D}${bindir}
> +
> +    # Older kernels (before 6.9) use a standalone rtla Makefile that does 
> not honor
> +    # O= for the final binary, so it ends up in the kernel source tree.
> +    rtla_bin="${B}/rtla"
> +    [ -f "${rtla_bin}" ] || rtla_bin="${S}/tools/tracing/rtla/rtla"
> +    install -m 755 "${rtla_bin}" ${D}${bindir}/rtla
> +
> +    # rtla, osnoise, hwnoise, and timerlat are all the same binary
> +    ln -s rtla ${D}${bindir}/osnoise
> +    ln -s rtla ${D}${bindir}/hwnoise
> +    ln -s rtla ${D}${bindir}/timerlat
> +}
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#125218): 
https://lists.openembedded.org/g/openembedded-devel/message/125218
Mute This Topic: https://lists.openembedded.org/mt/118168854/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to