From e97d70d1526d2acb6e026ce8ada4c4e68ceb0638 Mon Sep 17 00:00:00 2001 From: Vincent Li Date: Tue, 20 Feb 2024 21:07:56 +0000 Subject: [PATCH] Add bpftool bpftool comes with Linux kernel source and it is handy to have bpftool on ipfire kernel with BPF/BTF enabled to diagnosis BPF related issue. Signed-off-by: Vincent Li --- config/rootfiles/common/x86_64/linux | 1 + lfs/linux | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/config/rootfiles/common/x86_64/linux b/config/rootfiles/common/x86_64/linux index f3a8dea19..2c051a0b4 100644 --- a/config/rootfiles/common/x86_64/linux +++ b/config/rootfiles/common/x86_64/linux @@ -23699,3 +23699,4 @@ lib/modules/KVER-ipfire/modules.symbols lib/modules/KVER-ipfire/modules.symbols.bin #lib/modules/KVER-ipfire/source sbin/gen_init_cpio +usr/sbin/bpftool diff --git a/lfs/linux b/lfs/linux index efd3e8533..8b6f8f283 100644 --- a/lfs/linux +++ b/lfs/linux @@ -170,12 +170,19 @@ else # Build the kernel cd $(DIR_APP) && make $(MAKETUNING) $(KERNEL_TARGET) modules + # Build bpftool + cd $(DIR_APP)/tools/bpf/bpftool && sed -i -e 's/^prefix ?= \/usr\/local/prefix ?= \/usr/' Makefile + cd $(DIR_APP)/tools/bpf/bpftool && make $(MAKETUNING) + # Install the kernel cd $(DIR_APP) && cp -v arch/$(KERNEL_ARCH)/boot/$(KERNEL_TARGET) /boot/vmlinuz-$(VER)-$(VERSUFIX) cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-$(VERSUFIX) cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX) cd $(DIR_APP) && make $(MAKETUNING) modules_install + # Install bpftool + cd $(DIR_APP)/tools/bpf/bpftool && make install + ifneq "$(BUILD_PLATFORM)" "x86" cd $(DIR_APP) && make $(MAKETUNING) dtbs mkdir -p /boot/dtb-$(VER)-$(VERSUFIX)