summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorTao Chen <chen.dylane@gmail.com>2024-04-28 19:10:32 +0300
committerAndrii Nakryiko <andrii@kernel.org>2024-04-30 02:10:03 +0300
commit397658ddc88ce3c21d2aa3bed8e15fc69dfec946 (patch)
treea3b94164746442be2099cba5133067d3698adbed /samples
parent0db63c0b86e981a1e97d2596d64ceceba1a5470e (diff)
downloadlinux-397658ddc88ce3c21d2aa3bed8e15fc69dfec946.tar.xz
samples/bpf: Add valid info for VMLINUX_BTF
When I use the command 'make M=samples/bpf' to compile samples/bpf code in ubuntu 22.04, the error info occured: Cannot find a vmlinux for VMLINUX_BTF at any of " /home/ubuntu/code/linux/vmlinux", build the kernel or set VMLINUX_BTF or VMLINUX_H variable Others often encounter this kind of issue, new kernel has the vmlinux, so we can set the path in error info which seems more intuitive, like: Cannot find a vmlinux for VMLINUX_BTF at any of " /home/ubuntu/code/linux/vmlinux", buiild the kernel or set VMLINUX_BTF like "VMLINUX_BTF=/sys/kernel/btf/vmlinux" or VMLINUX_H variable Signed-off-by: Tao Chen <chen.dylane@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240428161032.239043-1-chen.dylane@gmail.com
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 933f6c3fe6b0..9aa027b144df 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -337,7 +337,7 @@ $(obj)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL)
ifeq ($(VMLINUX_H),)
ifeq ($(VMLINUX_BTF),)
$(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)",\
- build the kernel or set VMLINUX_BTF or VMLINUX_H variable)
+ build the kernel or set VMLINUX_BTF like "VMLINUX_BTF=/sys/kernel/btf/vmlinux" or VMLINUX_H variable)
endif
$(Q)$(BPFTOOL) btf dump file $(VMLINUX_BTF) format c > $@
else