mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 08:49:06 +08:00
8e42f42533b2b1117f1f4cf92c4cf6e652b1919c
This script automates the process of applying libbpf-relevant changes from kernel repository on top of current state of libbpf repository. It uses CHECKPOINT-COMMIT file to keep track of last commit in kernel repo up to which libbpf is in sync with. If there are any new libbpf changes in kernel repository, script extracts them, preserving original commit metadata. It also creates a "sync commit" using cover letter as a template, which nicely summarizes changes since last sync with kernel. Usage: ./scripts/sync-kernel.sh <linux-repo> <libbpf-repo> If it succeeds, script will create a bunch of local commits in <libbpf-repo> in separate branch, which can be easily pushed into github to create a pull request. Script tries to clean up after itself, except in case of failure. But it doesn't clean up timestamped branches it creates in both kernel and libbpf repositories for now. We can add that later. Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This is a mirror of bpf-next linux tree (https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next) bpf-next/tools/lib/bpf directory plus its supporting header files. The following files will by sync'ed with bpf-next repo: src/ <-> bpf-next/tools/lib/bpf/ include/uapi/linux/bpf_common.h <-> bpf-next/tools/include/uapi/linux/bpf_common.h include/uapi/linux/bpf.h <-> bpf-next/tools/include/uapi/linux/bpf.h include/uapi/linux/btf.h <-> bpf-next/tools/include/uapi/linux/btf.h include/uapi/linux/if_link.h <-> bpf-next/tools/include/uapi/linux/if_link.h include/uapi/linux/netlink.h <-> bpf-next/tools/include/uapi/linux/netlink.h include/tools/libc_compat.h <-> bpf-next/tools/include/tools/libc_compat.h Other header files at this repo (include/linux/*.h) are reduced versions of their counterpart files at bpf-next/tools/include/linux/*.h to make compilation successful. Build ===== To build static library libbpf.a: cd src make To build both static libbpf.a and shared libbpf.so libraries in directory build/ and install them together with libbpf headers in a staging directory root/: cd src mkdir build root BUILD_SHARED=y OBJDIR=build DESTDIR=root make install
Description
Languages
C
98.3%
Shell
1.4%
Makefile
0.3%