All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-rockchip][PATCH v2] kernel: add config fragment for lttng-modules prerequisites
@ 2026-10-01 16:04 Trevor Woerner
  0 siblings, 0 replies; only message in thread
From: Trevor Woerner @ 2026-10-01 16:04 UTC (permalink / raw)
  To: yocto-patches

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)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
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/20260326130653.478746-1-twoerner@gmail.com/
---
 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

diff --git a/recipes-kernel/linux/linux-rockchip.inc b/recipes-kernel/linux/linux-rockchip.inc
index 6c62e849834c..8e73c84a95ea 100644
--- a/recipes-kernel/linux/linux-rockchip.inc
+++ b/recipes-kernel/linux/linux-rockchip.inc
@@ -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"
diff --git a/recipes-kernel/linux/linux-rockchip/lttng.cfg b/recipes-kernel/linux/linux-rockchip/lttng.cfg
new file mode 100644
index 000000000000..17ba2a8116eb
--- /dev/null
+++ b/recipes-kernel/linux/linux-rockchip/lttng.cfg
@@ -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
-- 
2.50.0.173.g8b6f19ccfc3a



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-01 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 16:04 [meta-rockchip][PATCH v2] kernel: add config fragment for lttng-modules prerequisites Trevor Woerner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.