-
Notifications
You must be signed in to change notification settings - Fork 98
CONFIG_BPF_SYSCALL is undefined #10
Comments
You need CONFIG_BPF_SYSCALL enabled and your kernel re-built with that, as
the error message says.
…On Thu, Aug 2, 2018 at 2:52 AM, Linuxuser4 ***@***.***> wrote:
Hi,
I am trying to get adeb-BCC working on a Hikey970 android platform. This
has 4.9 kernel flashed. I got the BCC compiled in adeb environment.
I built the kernel with required configurations enabled in kernel as per
the page https://github.com/joelagnel/adeb/blob/master/BCC.md. I made
sure CONFIG_BPF_SYSCALL is enabled by putting a kernel print.
But, any BCC tool I use including hello_world.py complains that
CONFIG_BPF_SYSCALL is not enabled. Below is detailed log. Any pointers
would be of great help !
***@***.***:/# /usr/share/bcc/examples/hello_world.py
In file included from :3:
/virtual/include/bcc/helpers.h:26:2: error: "CONFIG_BPF_SYSCALL is
undefined, please check your .config or ask your Linux distro to enable
this feature"
#error "CONFIG_BPF_SYSCALL is undefined, please check your .config or ask
your Linux distro to enable this feature"
^
1 error generated.
Traceback (most recent call last):
File "/usr/share/bcc/examples/hello_world.py", line 12, in
BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello,
World!\n"); return 0; }').trace_print()
File "/usr/lib/python2.7/dist-packages/bcc/*init*.py", line 318, in *init*
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
***@***.***:/#
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACSVLzy_qMiPtLnP3DIi6S1jg63LwRpks5uMsvIgaJpZM4Vr-iW>
.
|
I realized the mistake. Original kernel headers on target did not have CONFIG_BPF_SYSCALL enabled. I then flashed new kernel with CONFIG_BPF_SYSCALL. I had failed to update the kernel headers using adeb prepare. I had to remove adeb and reinstall adeb with new kernel path. This makes sure new kernel headers are updated on target. Even though new kernel is flashed, header also needs to be updated in androdeb in target. I could get filetop (and a few other) command(s) working, though hello_world.py hangs. If I try to quit, it displays following message. It may not be of much consequence, though I wished this basic command to work. |
Also, by default, bcc native compilation on target board failed. I made following 2 changes for successful compilation on target. Thought of letting you know:
|
Feel free to follow up with this on BCC's issue list, or send a patch there if you feel something needs fixing there, your contribution there and here are appreciated! Closing this for now. |
uname -r get the system kernel version, |
Hi,
I am trying to get adeb-BCC working on a Hikey970 android platform. This has 4.9 kernel flashed. I got the BCC compiled in adeb environment.
I built the kernel with required configurations enabled in kernel as per the page https://github.com/joelagnel/adeb/blob/master/BCC.md. I made sure CONFIG_BPF_SYSCALL is enabled by putting a kernel print.
But, any BCC tool I use including hello_world.py complains that CONFIG_BPF_SYSCALL is not enabled. Below is detailed log. Any pointers would be of great help !
root@localhost:/# /usr/share/bcc/examples/hello_world.py
In file included from :3:
/virtual/include/bcc/helpers.h:26:2: error: "CONFIG_BPF_SYSCALL is undefined, please check your .config or ask your Linux distro to enable this feature"
#error "CONFIG_BPF_SYSCALL is undefined, please check your .config or ask your Linux distro to enable this feature"
^
1 error generated.
Traceback (most recent call last):
File "/usr/share/bcc/examples/hello_world.py", line 12, in
BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\n"); return 0; }').trace_print()
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 318, in init
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
root@localhost:/#
The text was updated successfully, but these errors were encountered: