From 3a8a3b4039e76103fe7cfa09a696dd49746648aa Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 21 Aug 2024 11:13:22 +0100 Subject: [PATCH] UBUNTU: [Packaging] do not attempt to generate BTF header on armhf BugLink: https://bugs.launchpad.net/bugs/2050083 armhf does not have working BTF for now, so create an empty header file like Debian does for now, to be dropped once that issue is fixed. Follow-up for aefbe1e1a9a1d3ed84bceac7e9739a92e1345f58 Signed-off-by: Luca Boccassi [ add do_tools_bpftool_stub to avoid hardcoding the arch in rules ] Signed-off-by: Timo Aaltonen (cherry-picked from commit 0c32444afa9bd036e66cbc8c05dbd8df8388bc6f oracular:linux) Signed-off-by: Mehmet Basaran --- debian.master/rules.d/armhf.mk | 1 + debian/rules.d/2-binary-arch.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/debian.master/rules.d/armhf.mk b/debian.master/rules.d/armhf.mk index 9036a5863606..9670269c8761 100644 --- a/debian.master/rules.d/armhf.mk +++ b/debian.master/rules.d/armhf.mk @@ -13,6 +13,7 @@ do_tools_perf = true do_tools_perf_jvmti = true do_tools_perf_python = true do_tools_bpftool = true +do_tools_bpftool_stub = true do_tools_rtla = true do_dtbs = true diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 6857a12a87e3..dfc14333f2e4 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -683,7 +683,11 @@ endif ifeq ($(do_tools_bpftool),true) mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux $(kmake) CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool +ifneq ($(do_tools_bpftool_stub),true) $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h +else + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h +endif rm -f $(builddirpa)/vmlinux endif ifeq ($(do_tools_x86),true)