[PATCH dwarves] github CI: build/install bpftool from kernel tree

Alan Maguire <[email protected]> Thu, 18 Jun 2026 19:53:56 +0100
Newsgroups org.kernel.vger.dwarves
Message-ID <[email protected]>
It will be useful for selftests.

Signed-off-by: Alan Maguire <[email protected]>
---
 .github/scripts/build-kernel.sh  | 3 +++
 .github/scripts/run-selftests.sh | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/scripts/build-kernel.sh b/.github/scripts/build-kernel.sh
index 0a1fd3f..9f11b22 100755
--- a/.github/scripts/build-kernel.sh
+++ b/.github/scripts/build-kernel.sh
@@ -40,3 +40,6 @@ make $buildopts olddefconfig && make prepare
 cat .config
 make -j $((4*$(nproc))) $buildopts all
 
+# Build, install bpftool
+cd tools/bpf/bpftool
+LLVM_STRIP=llvm-strip-${LLVM_VERSION} make && make DESTDIR=${GITHUB_WORKSPACE}/install/ install
diff --git a/.github/scripts/run-selftests.sh b/.github/scripts/run-selftests.sh
index f9ba24e..2e73706 100755
--- a/.github/scripts/run-selftests.sh
+++ b/.github/scripts/run-selftests.sh
@@ -8,8 +8,9 @@ GITHUB_WORKSPACE=${GITHUB_WORKSPACE:-$(pwd)}
 VMLINUX=${GITHUB_WORKSPACE}/.kernel/vmlinux
 SELFTESTS=${GITHUB_WORKSPACE}/tests
 cd $SELFTESTS
-export PATH=${GITHUB_WORKSPACE}/install/usr/local/bin:${PATH}
+export PATH=${GITHUB_WORKSPACE}/install/usr/local/bin:${GITHUB_WORKSPACE}/install/usr/local/sbin:${PATH}
 which pahole
 pahole --version
+bpftool --version
 vmlinux=$VMLINUX ./tests
 
-- 
2.43.5