* [PATCH] samples: bpf: Add valid info for VMLINUX_BTF
@ 2024-04-28 16:10 Tao Chen
2024-04-29 23:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Tao Chen @ 2024-04-28 16:10 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, chen.dylane
Cc: bpf, linux-kernel
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>
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 4ccf4236031c..6fbe9345eb6a 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -326,7 +326,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
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] samples: bpf: Add valid info for VMLINUX_BTF
2024-04-28 16:10 [PATCH] samples: bpf: Add valid info for VMLINUX_BTF Tao Chen
@ 2024-04-29 23:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-29 23:20 UTC (permalink / raw)
To: Tao Chen; +Cc: ast, daniel, andrii, martin.lau, song, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Mon, 29 Apr 2024 00:10:32 +0800 you wrote:
> 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
>
> [...]
Here is the summary with links:
- samples: bpf: Add valid info for VMLINUX_BTF
https://git.kernel.org/bpf/bpf-next/c/397658ddc88c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-29 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 16:10 [PATCH] samples: bpf: Add valid info for VMLINUX_BTF Tao Chen
2024-04-29 23:20 ` patchwork-bot+netdevbpf
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.