From 544379e8ce4b31c2b9c5731dacb5365db67d600e Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 14 Apr 2025 16:44:21 +0200 Subject: [PATCH 1/5] libbpf: Add version 1.5.0 [Description](https://libbpf.readthedocs.io/en/latest/libbpf_overview.html): > libbpf is a C-based library containing a BPF loader that takes > compiled BPF object files and prepares and loads them into the Linux > kernel. libbpf takes the heavy lifting of loading, verifying, and > attaching BPF programs to various kernel hooks, allowing BPF application > developers to focus only on BPF program correctness and performance. --- libbpf.be0 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 libbpf.be0 diff --git a/libbpf.be0 b/libbpf.be0 new file mode 100755 index 000000000..5613bda83 --- /dev/null +++ b/libbpf.be0 @@ -0,0 +1,35 @@ +#!/usr/bin/env beesh + +# BEE_VERSION libbpf-1.5.0-0 + +SRCURL[0]="https://github.com/libbpf/libbpf/archive/refs/tags/v${PKGVERSION}.tar.gz libbpf-${PKGVERSION}.tar.gz" + +# PATCHURL+=() + +# build_in_sourcedir + +sourcesubdir_append src + +#mee_extract() { +# bee_extract "${@}" +#} + +#mee_patch() { +# bee_patch "${@}" +#} + +#mee_configure() { +# bee_configure +#} + +#mee_build() { +# bee_build +#} + +#mee_install() { +# bee_install +#} + +#mee_install_post() { +# exit +#} From e0bd435b15525324bedb334c59495573bff59a0f Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 14 Apr 2025 16:45:04 +0200 Subject: [PATCH 2/5] libbpf: Download source archive from beehive.molgen.mpg.de --- libbpf.be0 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libbpf.be0 b/libbpf.be0 index 5613bda83..9904efb60 100755 --- a/libbpf.be0 +++ b/libbpf.be0 @@ -2,7 +2,8 @@ # BEE_VERSION libbpf-1.5.0-0 -SRCURL[0]="https://github.com/libbpf/libbpf/archive/refs/tags/v${PKGVERSION}.tar.gz libbpf-${PKGVERSION}.tar.gz" +#SRCURL[0]="https://github.com/libbpf/libbpf/archive/refs/tags/v${PKGVERSION}.tar.gz libbpf-${PKGVERSION}.tar.gz" +SRCURL[0]="https://beehive.molgen.mpg.de/a5bb7d7b06174e5d2f4b755a28332f87/libbpf-1.5.0.tar.gz" # PATCHURL+=() From f26da417511f0fb85d5de83eddcd2b27848e927a Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 14 Apr 2025 16:36:39 +0200 Subject: [PATCH 3/5] pahole: Add version 1.30 pahole is needed to build the BTF debug info for the Linux kernel. BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map. [Description](https://git.kernel.org/pub/scm/devel/pahole/pahole.git/tree/man-pages/pahole.1): > pahole - Shows, manipulates data structure layout and pretty prints raw data. > > pahole shows data structure layouts encoded in debugging information formats, > DWARF, CTF and BTF being supported. > > This is useful for, among other things: optimizing important data structures > by reducing its size, figuring out what is the field sitting at an offset from > the start of a data structure, investigating ABI changes and more generally > understanding a new codebase you have to work with. https://git.kernel.org/pub/scm/devel/pahole/pahole.git/ --- pahole.be0 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 pahole.be0 diff --git a/pahole.be0 b/pahole.be0 new file mode 100755 index 000000000..77ea88033 --- /dev/null +++ b/pahole.be0 @@ -0,0 +1,35 @@ +#!/usr/bin/env beesh + +# BEE_VERSION pahole-1.30-0 + +SRCURL[0]="https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${PKGVERSION}.tar.gz" + +# PATCHURL+=() + +# build_in_sourcedir + +# sourcesubdir_append src + +#mee_extract() { +# bee_extract "${@}" +#} + +#mee_patch() { +# bee_patch "${@}" +#} + +#mee_configure() { +# bee_configure +#} + +#mee_build() { +# bee_build +#} + +#mee_install() { +# bee_install +#} + +#mee_install_post() { +# exit +#} From 217c579c109bc6c313989b94a6b2b0c8b206e50d Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 14 Apr 2025 16:37:28 +0200 Subject: [PATCH 4/5] pahole: Download source archive from beehive.molgen.mpg.de --- pahole.be0 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pahole.be0 b/pahole.be0 index 77ea88033..45bac02ac 100755 --- a/pahole.be0 +++ b/pahole.be0 @@ -2,7 +2,8 @@ # BEE_VERSION pahole-1.30-0 -SRCURL[0]="https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${PKGVERSION}.tar.gz" +#SRCURL[0]="https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${PKGVERSION}.tar.gz" +SRCURL[0]="https://beehive.molgen.mpg.de/3787b1177acbe92388853cf0b8ce26f2/pahole-1.30.tar.gz" # PATCHURL+=() From 77205e0762c1ba3def3254fad42dd0ef52e845bd Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 14 Apr 2025 17:32:27 +0200 Subject: [PATCH 5/5] pahole: Explicitly build with the system libbpf [BEE] => entering bee_configure() .. [BEE] cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo /dev/shm/bee-pmenzel/pahole/pahole-1.30-0/source -- The C compiler identification is GNU 12.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Setting BUILD_SHARED_LIBS = ON -- Checking availability of DWARF and ELF development libraries -- Looking for dwfl_module_build_id in elf -- Looking for dwfl_module_build_id in elf - found -- Found dwarf.h header: /usr/include -- Found elfutils/libdw.h header: /usr/include -- Found libdw library: /usr/lib/libdw.so -- Found libelf library: /usr/lib/libelf.so -- Checking availability of DWARF and ELF development libraries - done -- Found ZLIB: /usr/lib/libz.so (found version "1.3.#define ZLIB_VERSION "1.3"") -- Checking availability of argp library -- Assuming argp is in libc -- Checking availability of argp library - done -- Checking availability of obstack library -- Assuming obstack is in libc -- Checking availability of obstack library - done CMake Error at CMakeLists.txt:75 (message): The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again. -- Configuring incomplete, errors occurred! See also "/dev/shm/bee-pmenzel/pahole/pahole-1.30-0/build/CMakeFiles/CMakeOutput.log". --- pahole.be0 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pahole.be0 b/pahole.be0 index 45bac02ac..c6718ac36 100755 --- a/pahole.be0 +++ b/pahole.be0 @@ -19,9 +19,10 @@ SRCURL[0]="https://beehive.molgen.mpg.de/3787b1177acbe92388853cf0b8ce26f2/pahole # bee_patch "${@}" #} -#mee_configure() { -# bee_configure -#} +mee_configure() { + bee_configure \ + -DLIBBPF_EMBEDDED=OFF +} #mee_build() { # bee_build