From 708556b4437479409ea676efd024294e145c3c2c Mon Sep 17 00:00:00 2001 From: Vincent Li Date: Sat, 21 Dec 2024 17:56:33 -0800 Subject: [PATCH] libbpf: add libbpf Signed-off-by: Vincent Li --- config/rootfiles/common/libbpf | 4 ++ lfs/libbpf | 77 ++++++++++++++++++++++++++++++++++ make.sh | 1 + 3 files changed, 82 insertions(+) create mode 100644 config/rootfiles/common/libbpf create mode 100644 lfs/libbpf diff --git a/config/rootfiles/common/libbpf b/config/rootfiles/common/libbpf new file mode 100644 index 000000000..b3ef39c1a --- /dev/null +++ b/config/rootfiles/common/libbpf @@ -0,0 +1,4 @@ +usr/lib/libbpf.a +usr/lib/libbpf.so +usr/lib/libbpf.so.1 +usr/lib/libbpf.so.1.4.6 diff --git a/lfs/libbpf b/lfs/libbpf new file mode 100644 index 000000000..aa767c2de --- /dev/null +++ b/lfs/libbpf @@ -0,0 +1,77 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2023 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.4.6 + +THISAPP = libbpf-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_BLAKE2 = 590eb2f8f5a8caa24c94a8c3e0eddb0c8685051ea08967b4307fc8e6df41b81237637fe70f946f2579520948b56dd08fb0b6f4db9218e561930c9636f84d97ca + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +b2 : $(subst %,%_BLAKE2,$(objects)) + +############################################################################### +# Downloading, checking, b2sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_BLAKE2,$(objects)) : + @$(B2SUM) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + + cd $(DIR_APP)/src && make $(MAKETUNING) + cd $(DIR_APP)/src && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index b1d20140f..5f13414ec 100755 --- a/make.sh +++ b/make.sh @@ -2089,6 +2089,7 @@ build_system() { lfsmake2 inotify-tools lfsmake2 grub-btrfs lfsmake2 pahole + lfsmake2 libbpf lfsmake2 llvm-project lfsmake2 linux