Go to file
Andrii Nakryiko 947e40e1fd sync_kernel.sh: revamp sync script to work in the presence of merges (#15)
Previous version of script relied on squashing baseline commit and
rebasing rest of commits on top of it. This doesn't work well with git
histories containing merges. This patch changes approach by cherry-picking
commits that have libbpf-related changes and then rewriting history since
last checkpoint.

This still might fail if there were manually resolved merge conflicts for
libbpf, but it's the best we can get as far as I can tell.

Script now also verifies that state of libbpf in Linux's repository exactly
matches the state of libbpf in github repo.

If everything goes smoothing (including verification step), we clean up after
ourselves and only leave libbpf-sync-XXX branch in github's libbpf repo to
push to remote.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
2019-03-02 21:19:17 -08:00
include sync with latest bpf-next (#11) 2019-02-15 07:38:45 -08:00
scripts sync_kernel.sh: revamp sync script to work in the presence of merges (#15) 2019-03-02 21:19:17 -08:00
src libbpf sync 2019-02-17T06:35:29.358Z (#14) 2019-02-16 22:41:31 -08:00
CHECKPOINT-COMMIT libbpf sync 2019-02-17T06:35:29.358Z (#14) 2019-02-16 22:41:31 -08:00
README mirror uapi/linux/bpf_common.h file (#2) 2018-10-12 12:57:55 -07:00

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