Code Monkey home page Code Monkey logo

Comments (3)

anakryiko avatar anakryiko commented on July 25, 2024 2

No, not really. You generally need "recent enough" bpftool, but it will handle older kernels just fine. I suspect in this case bpftool built from 5.8 kernel sources just doesn't handle BTF_KIND_FLOAT type that was introduced after 5.8. If you build bpftool from 5.15 and run it against 5.8 kernel it should work fine.

But generally, bpftool version is independent. We now also have Github mirror for bpftool, so you can build it from there: https://github.com/libbpf/bpftool/

I want to stop including prebuilt version of bpftool (to allow non-x86-64 builds of libbpf-bootstrap) and instead build it from sources (using the above Github repo). Just like we are going to do it for libbpf-tools. See iovisor/bcc@03163a6 for reference. If you'd like to contribute, wiring up bpftool from Github repo would be a great help!

As for vmlinux.h, you generally don't have to re-generate it very often or from very recent kernel. It just depends on types you are expecting to program against. If some latest kernel has some field that you'd like to reference, it would be more convenient to generate vmlinux.h from most recent kernel. But often old kernel's vmlinux.h is totally fine even for much more recent kernels. Please refer to https://nakryiko.com/posts/bpf-core-reference-guide/#defining-own-co-re-relocatable-type-definitions (and one section after the above one) for some more understanding of the role of vmlinux.h and how you can "complement" it with your own type definitions.

from libbpf-bootstrap.

nurdann avatar nurdann commented on July 25, 2024

I am very much open to contribute. From what I understand by making https://github.com/libbpf/bpftool/ a submodule, when bpftool is being built it will use libraries that are specific to an architecture so you wouldn't have to include multiple binaries in the version control? So, the steps are to exactly replicate how iovisor/bcc@03163a6 is being built.
Thanks for response!

from libbpf-bootstrap.

anakryiko avatar anakryiko commented on July 25, 2024

yes, exactly

from libbpf-bootstrap.

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.