kernel: add config fragment for lttng-modules prerequisites
PATCH v2 1/1 kernel: add config fragment for lttng-modules prerequisites
These machines build from an upstream defconfig via KBUILD_DEFCONFIG rather than a yocto-kernel-cache BSP, so the standard kernel type's configuration never applies and lttng-modules gets neither CONFIG_KPROBES (a hard compile failure) nor CONFIG_TRACEPOINTS (builds no modules at all). Ship the fragment in-layer so it works for any kernel recipe here, not just ones that fetch the kernel cache.
AI-Generated: codex/claude-opus 5 (xhigh)
---
changes in v2:
- drop the dependency on yocto-kernel-cache; v1 added features/kprobes/kprobes.scc to KERNEL_FEATURES, which only resolves for kernel recipes that fetch the cache. linux-yocto fetches it in linux-yocto_7.2.bb, not in linux-yocto.inc, so recipes that require only the .inc never get it.
- a KERNEL_FEATURES entry that is not found is a hard do_kernel_metadata failure, not a warning, so a shared .inc can only reference fragments the layer itself ships. Ship the config in-layer instead.
- widen from :rockchip:arm to :rockchip. CONFIG_KPROBES is absent on every machine in the layer; 32-bit merely fails loudly. arm64 also lacks CONFIG_TRACEPOINTS, so lttng-modules silently builds zero modules and ships an empty package.
- link to v1:
https://lore.kernel.org/yocto-patches/[email protected]/
--- recipes-kernel/linux/linux-rockchip.inc | 1 + recipes-kernel/linux/linux-rockchip/lttng.cfg | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 recipes-kernel/linux/linux-rockchip/lttng.cfg
recipes-kernel/linux/linux-rockchip.inc +1 -0
@@ -32,6 +32,7 @@ COMPATIBLE_MACHINE:rock64 = "rock64" COMPATIBLE_MACHINE:soquartz = "soquartz" SRC_URI:append:rockchip = " file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta" +SRC_URI:append:rockchip = " file://lttng.cfg" SRC_URI:append:nanopi-r4s = " file://realtek-r8169.cfg" KERNEL_FEATURES:append:rockchip:arm = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
recipes-kernel/linux/linux-rockchip/lttng.cfg new file +17 -0
@@ -0,0 +1,17 @@ +# Prerequisites for building lttng-modules. +# +# These machines have no BSP description in yocto-kernel-cache and build +# from an upstream defconfig via KBUILD_DEFCONFIG, so the standard kernel +# type's configuration is never applied and neither the arm nor the arm64 +# defconfig enables what lttng-modules needs. +# +# kprobes is required outright: src/wrapper/kallsyms.c fails to compile +# without it on kernels >= 5.7. +# +# Tracepoints are what lttng-modules actually traces with, but that +# symbol has no prompt and can only be selected, so enabling the function +# tracer is what pulls it in. Without tracepoints lttng-modules builds no +# modules at all rather than failing, leaving an empty package behind. +CONFIG_KPROBES=y +CONFIG_FTRACE=y +CONFIG_FUNCTION_TRACER=y
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a