bpftools: add utility and library packages supporting eBPF usage
authorTony Ambardar <itugrok@yahoo.com>
Thu, 20 Aug 2020 18:46:50 +0000 (11:46 -0700)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 31 Aug 2020 11:23:59 +0000 (12:23 +0100)
commit2f0d672088c39914ab9cd59b9de3d6f705cd6d5d
treeba3810d5384e7529d19f8f318c36d804e2354f96
parent735947229c0e89fd714b3cded1e76ea9093827ed
bpftools: add utility and library packages supporting eBPF usage

Add support for building bpftool and libbpf from the latest 5.8.3 kernel
sources, ensuring up-to-date functionality and fixes. Both are written to
be backwards compatible, which simplfies build and usage across different
OpenWRT image kernels.

'bpftool' is the primary userspace tool widely used for introspection and
manipulation of eBPF programs and maps. Two variants are built: a 'full'
version which supports object disassembly and depends on libbfd/libopcodes
(total ~500KB); and a 'minimal' version without disassembly functions and
dependencies. The default 'minimal' variant is otherwise fully functional,
and both are compiled using LTO for further (~30KB) size reductions.

'libbpf' provides shared/static libraries and dev files needed for building
userspace programs that perform eBPF interaction.

Several cross-compilation and build-failure problems are addressed by new
patches and ones backported from farther upstream:

  * 001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch
  * 002-libbpf-fix-build-failure-from-uninitialized-variable.patch
  * 003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch
  * 004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
package/network/utils/bpftools/Makefile [new file with mode: 0644]
package/network/utils/bpftools/patches/001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch [new file with mode: 0644]
package/network/utils/bpftools/patches/002-libbpf-fix-build-failure-from-uninitialized-variable.patch [new file with mode: 0644]
package/network/utils/bpftools/patches/003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch [new file with mode: 0644]
package/network/utils/bpftools/patches/004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch [new file with mode: 0644]