Giter Site home page Giter Site logo

CONFIG_BPF_SYSCALL is undefined about adeb HOT 5 CLOSED

joelagnel avatar joelagnel commented on September 26, 2024
CONFIG_BPF_SYSCALL is undefined

from adeb.

Comments (5)

joelagnel avatar joelagnel commented on September 26, 2024

from adeb.

Linuxuser4 avatar Linuxuser4 commented on September 26, 2024

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.
root@localhost:/bcc-master# /usr/share/bcc/examples/hello_world.py
^CTraceback (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 1119, in trace_print
line = self.trace_readline(nonblocking=False)
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 1099, in trace_readline
line = trace.readline(1024).rstrip()
KeyboardInterrupt
root@localhost:/bcc-master#

from adeb.

Linuxuser4 avatar Linuxuser4 commented on September 26, 2024

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:

  1. A softlink to stdc++ was required since compilation complained of missing stdc++ library.
    ln -s /usr/lib/gcc/aarch64-linux-gnu/7/libstdc++.so /usr/lib/libstdc++.so

  2. Two include paths needed to be provided to avoid missing header error. These were added in CMakeLists.txt in the base folder:
    include_directories(/usr/include/c++/7/)
    include_directories(/usr/include/aarch64-linux-gnu/c++/7/)

from adeb.

joelagnel avatar joelagnel commented on September 26, 2024

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.

from adeb.

CodeForeverZou avatar CodeForeverZou commented on September 26, 2024

uname -r get the system kernel version,
if different with the built kernel version.
you need to build the kernel which same with the 'uname -r'

from adeb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.