[SRU][R][PATCH 1/1] UBUNTU: [Packaging] dbgsym: add vmlinux symlink to headers directory
Jacob Martin
jacob.martin at canonical.com
Tue Mar 17 21:18:49 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2133794
Out-of-tree module builds warn about failed BTF generation without a
link to vmlinux included with the kernel headers. Create this link to
silence this warning and allow for the automatic generation of BTF debug
information.
Signed-off-by: Jacob Martin <jacob.martin at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index e79cd23290d7..d5d543accf21 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -128,7 +128,8 @@ $(stampdir)/stamp-install-%: baserustpkg = $(rust_pkg_name)
$(stampdir)/stamp-install-%: indeppkg = $(indep_hdrs_pkg_name)
$(stampdir)/stamp-install-%: kernfile = $(call custom_override,kernel_file,$*)
$(stampdir)/stamp-install-%: instfile = $(call custom_override,install_file,$*)
-$(stampdir)/stamp-install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
+$(stampdir)/stamp-install-%: hdrsysdir = usr/src/$(basepkg)-$*
+$(stampdir)/stamp-install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/$(hdrsysdir)
$(stampdir)/stamp-install-%: rustdir = $(CURDIR)/debian/$(baserustpkg)-$*/usr/src/$(baserustpkg)-$*
$(stampdir)/stamp-install-%: MODHASHALGO=sha512
$(stampdir)/stamp-install-%: MODSECKEY=$(build_dir)/certs/signing_key.pem
@@ -242,6 +243,8 @@ ifeq ($(do_dbgsym_package),true)
# Debug image is simple
install -m644 -D $(build_dir)/vmlinux \
$(dbgpkgdir)/usr/lib/debug/boot/vmlinux-$(abi_release)-$*
+ mkdir -p $(dbgpkgdir)/$(hdrsysdir)
+ $(LN) /usr/lib/debug/boot/vmlinux-$(abi_release)-$* $(dbgpkgdir)/$(hdrsysdir)/vmlinux
if [ -d $(build_dir)/scripts/gdb/linux ]; then \
install -m644 -D $(build_dir)/vmlinux-gdb.py \
$(dbgpkgdir)/usr/share/gdb/auto-load/boot/vmlinux-$(abi_release)-$*/vmlinuz-$(abi_release)-$*-gdb.py; \
--
2.43.0
More information about the kernel-team
mailing list