mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
2f0d672088
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>
27 lines
860 B
Diff
27 lines
860 B
Diff
From 668d1c2951e18512a27aec20b80dea627d01bf04 Mon Sep 17 00:00:00 2001
|
|
From: Tony Ambardar <Tony.Ambardar@gmail.com>
|
|
Date: Thu, 20 Aug 2020 16:05:48 -0700
|
|
Subject: [PATCH] tools/bpftool: allow passing BPFTOOL_VERSION to make
|
|
|
|
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
|
|
---
|
|
tools/bpf/bpftool/Makefile | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
|
|
index 9e85f101be85..d9d821736c31 100644
|
|
--- a/tools/bpf/bpftool/Makefile
|
|
+++ b/tools/bpf/bpftool/Makefile
|
|
@@ -25,7 +25,7 @@ endif
|
|
|
|
LIBBPF = $(LIBBPF_PATH)libbpf.a
|
|
|
|
-BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
|
|
+BPFTOOL_VERSION ?= $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
|
|
|
|
$(LIBBPF): FORCE
|
|
$(if $(LIBBPF_OUTPUT),@mkdir -p $(LIBBPF_OUTPUT))
|
|
--
|
|
2.25.1
|
|
|