Lines Matching +full:- +full:- +full:build +full:- +full:root
1 This is a mirror of [bpf-next Linux source
2 tree](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next)'s
5 All the gory details of syncing can be found in `scripts/sync-kernel.sh`
10 [bpf-next](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/)'s
16 Please check out [libbpf-bootstrap](https://github.com/libbpf/libbpf-bootstrap)
17 and [the companion blog post](https://nakryiko.com/posts/libbpf-bootstrap/) for
19 [libbpf-tools](https://github.com/iovisor/bcc/tree/master/libbpf-tools) are also
20 a good source of the real-world libbpf-based tracing tools.
22 See also ["BPF CO-RE reference guide"](https://nakryiko.com/posts/bpf-core-reference-guide/)
23 for the coverage of practical aspects of building BPF CO-RE applications and
24 ["BPF CO-RE"](https://nakryiko.com/posts/bpf-portability-and-co-re/) for
25 general introduction into BPF portability issues and BPF CO-RE origins.
29 subscribe to it [here](http://vger.kernel.org/vger-lists.html#bpf) and search
39 Build
43 [](https://…
47 pkg-config is used by default to find libelf, and the program called can be
50 If using `pkg-config` at build time is not desired, it can be disabled by
53 To build both static libbpf.a and shared libbpf.so:
59 To build only static libbpf.a library in directory
60 build/ and install them together with libbpf headers in a staging directory
61 root/:
64 $ mkdir build root
65 $ BUILD_STATIC_ONLY=y OBJDIR=build DESTDIR=root make install
68 To build both static libbpf.a and shared libbpf.so against a custom libelf
69 dependency installed in /build/root/ and install them together with libbpf
70 headers in a build directory /build/root/:
73 $ PKG_CONFIG_PATH=/build/root/lib64/pkgconfig DESTDIR=/build/root make install
76 BPF CO-RE (Compile Once – Run Everywhere)
79 Libbpf supports building BPF CO-RE-enabled applications, which, in contrast to
81 being deployed to target servers and doesn't rely on kernel-devel headers
87 - Fedora 31+
88 - RHEL 8.2+
89 - OpenSUSE Tumbleweed (in the next release, as of 2020-06-04)
90 - Arch Linux (from kernel 5.7.1.arch1-1)
91 - Manjaro (from kernel 5.4 if compiled after 2021-06-18)
92 - Ubuntu 20.10
93 - Debian 11 (amd64/arm64)
95 If your kernel doesn't come with BTF built-in, you'll need to build custom
97 - `pahole` 1.16+ tool (part of `dwarves` package), which performs DWARF to
99 - kernel built with `CONFIG_DEBUG_INFO_BTF=y` option;
100 - you can check if your kernel has BTF built-in by looking for
104 $ ls -la /sys/kernel/btf/vmlinux
105 -r--r--r--. 1 root root 3541561 Jun 2 18:16 /sys/kernel/btf/vmlinux
108 To develop and build BPF programs, you'll need Clang/LLVM 10+. The following
110 - Fedora 32+
111 - Ubuntu 20.04+
112 - Arch Linux
113 - Ubuntu 20.10 (LLVM 11)
114 - Debian 11 (LLVM 11)
115 - Alpine 3.13+
119 The following resources are useful to understand what BPF CO-RE is and how to
121 - [BPF CO-RE reference guide](https://nakryiko.com/posts/bpf-core-reference-guide/)
122 - [BPF Portability and CO-RE](https://nakryiko.com/posts/bpf-portability-and-co-re/)
123 - [HOWTO: BCC to libbpf conversion](https://nakryiko.com/posts/bcc-to-libbpf-howto-guide/)
124 - [libbpf-tools in BCC repo](https://github.com/iovisor/bcc/tree/master/libbpf-tools)
125 contain lots of real-world tools converted from BCC to BPF CO-RE. Consider
133 - [Fedora](https://src.fedoraproject.org/rpms/libbpf)
134 - [Gentoo](https://packages.gentoo.org/packages/dev-libs/libbpf)
135 - [Debian](https://packages.debian.org/source/sid/libbpf)
136 - [Arch](https://www.archlinux.org/packages/extra/x86_64/libbpf/)
137 - [Ubuntu](https://packages.ubuntu.com/source/impish/libbpf)
138 - [Alpine](https://pkgs.alpinelinux.org/packages?name=libbpf)
141 - Consistent versioning across distributions.
142 - No ties to any specific kernel, transparent handling of older kernels.
143 Libbpf is designed to be kernel-agnostic and work across multitude of
144 kernel versions. It has built-in mechanisms to gracefully handle older
148 - Continuous integration testing via
149 [TravisCI](https://travis-ci.org/libbpf/libbpf).
150 - Static code analysis via [LGTM](https://lgtm.com/projects/g/libbpf/libbpf)
154 - zlib
155 - libelf
157 [](https:…
162 This work is dual-licensed under BSD 2-clause license and GNU LGPL v2.1 license.
165 `SPDX-License-Identifier: BSD-2-Clause OR LGPL-2.1`