View previous topic :: View next topic |
Author |
Message |
eborg n00b
Joined: 20 Sep 2014 Posts: 11
|
Posted: Wed Dec 27, 2023 8:32 pm Post subject: [Solved] Where is CONFIG_DEBUG_INFO_BTF? |
|
|
I have a 6.1.67 kernel and am trying to work with libbpf which calls for a kernel built with CONFIG_DEBUG_INFO_BTF=y. A search in 'menuconfig' says the module is here ...
-> Kernel hacking
-> Compile-time checks and compiler options
-> Generate BTF typeinfo (DEBUG_INFO_BTF [=n])
But when I go there, I do not see the option. How else can I find a way to enable these options witin the kernel?
Last edited by eborg on Thu Dec 28, 2023 1:53 am; edited 1 time in total |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1944
|
Posted: Wed Dec 27, 2023 9:02 pm Post subject: |
|
|
If you press 'z' in menuconfig, it may appear and allow you to choose "Help" to show what depending option is missing preventing its selection. |
|
Back to top |
|
|
eborg n00b
Joined: 20 Sep 2014 Posts: 11
|
Posted: Thu Dec 28, 2023 1:53 am Post subject: |
|
|
Thanks for that. |
|
Back to top |
|
|
n05ph3r42 Tux's lil' helper
Joined: 11 Jul 2016 Posts: 135
|
Posted: Wed Nov 27, 2024 6:25 pm Post subject: Re: [Solved] Where is CONFIG_DEBUG_INFO_BTF? |
|
|
eborg wrote: | I have a 6.1.67 kernel and am trying to work with libbpf which calls for a kernel built with CONFIG_DEBUG_INFO_BTF=y. A search in 'menuconfig' says the module is here ...
-> Kernel hacking
-> Compile-time checks and compiler options
-> Generate BTF typeinfo (DEBUG_INFO_BTF [=n])
But when I go there, I do not see the option. How else can I find a way to enable these options witin the kernel? |
Hi,
Im interested in test of Extensible Scheduler Class, which requires this option too.
Am i correct, that option depends on CLANG as default C compiler? (CC_IS_CLANG) |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5211 Location: Bavaria
|
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1759 Location: South America
|
Posted: Thu Nov 28, 2024 3:10 am Post subject: Re: [Solved] Where is CONFIG_DEBUG_INFO_BTF? |
|
|
n05ph3r42 wrote: | Im interested in test of Extensible Scheduler Class, which requires this option too.
Am i correct, that option depends on CLANG as default C compiler? (CC_IS_CLANG) |
I don't think that you need to build the kernel with Clang (CC_IS_CLANG=y), but it seems that you do need Clang for creating BPF programs.
According to the README.md file in tools/sched_ext/ for version 6.12.1:
Quote: | Compiling the examples
There are a few toolchain dependencies for compiling the example schedulers.
Toolchain dependencies
1. clang >= 16.0.0
The schedulers are BPF programs, and therefore must be compiled with clang. gcc is actively working on adding a BPF backend compiler as well, but are still missing some features such as BTF type tags which are necessary for using kptrs. |
And the makefile uses this recipe for compiling *.bpf.c files:
Code: | $(SCXOBJ_DIR)/%.bpf.o: %.bpf.c $(INCLUDE_DIR)/vmlinux.h include/scx/*.h \
| $(BPFOBJ) $(SCXOBJ_DIR)
$(call msg,CLNG-BPF,,$(notdir $@))
$(Q)$(CLANG) $(BPF_CFLAGS) -target bpf -c $< -o $@ |
That is, clang -target bpf -c. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
|