2021-11-01 15:35:16 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2021 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=qosify
|
|
|
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2023-03-07 20:53:00 +00:00
|
|
|
PKG_SOURCE_DATE:=2023-03-07
|
|
|
|
PKG_SOURCE_VERSION:=9a47ea4b683dd845ec94534fcd82d3117c9ab313
|
|
|
|
PKG_MIRROR_HASH:=c4c313aed4a405492201612bdfef5e219c9a994a35f35acc84fc8327d9aa73d2
|
2023-05-17 13:08:40 +00:00
|
|
|
PKG_RELEASE:=1
|
2021-11-01 15:35:16 +00:00
|
|
|
|
|
|
|
PKG_LICENSE:=GPL-2.0
|
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
PKG_BUILD_DEPENDS:=bpf-headers
|
2021-11-09 10:03:10 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
2021-11-01 15:35:16 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
include $(INCLUDE_DIR)/bpf.mk
|
2021-11-03 17:54:04 +00:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2021-11-01 15:35:16 +00:00
|
|
|
|
|
|
|
define Package/qosify
|
2021-11-15 16:53:43 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Base system
|
2021-11-01 15:35:16 +00:00
|
|
|
TITLE:=A simple QoS solution based eBPF + CAKE
|
2022-04-05 19:27:40 +00:00
|
|
|
DEPENDS:=+libbpf +libubox +libubus +libnl-tiny +kmod-sched-cake +kmod-sched-bpf +kmod-ifb +tc $(BPF_DEPENDS)
|
2021-11-01 15:35:16 +00:00
|
|
|
endef
|
|
|
|
|
2022-04-05 19:27:40 +00:00
|
|
|
TARGET_CFLAGS += \
|
|
|
|
-Wno-error=deprecated-declarations \
|
|
|
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
|
|
|
-I$(STAGING_DIR)/usr/include
|
|
|
|
|
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-DLIBNL_LIBS=-lnl-tiny
|
2022-03-15 13:33:59 +00:00
|
|
|
|
2021-11-01 15:35:16 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
|
|
|
|
$(Build/Compile/Default)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/qosify/conffiles
|
|
|
|
/etc/config/qosify
|
2021-11-08 21:26:45 +00:00
|
|
|
/etc/qosify/00-defaults.conf
|
2021-11-01 15:35:16 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/qosify/install
|
2021-11-22 16:21:51 +00:00
|
|
|
$(INSTALL_DIR) \
|
|
|
|
$(1)/lib/bpf \
|
|
|
|
$(1)/usr/sbin \
|
|
|
|
$(1)/etc/init.d \
|
|
|
|
$(1)/etc/config \
|
|
|
|
$(1)/etc/qosify \
|
|
|
|
$(1)/etc/hotplug.d/net \
|
|
|
|
$(1)/etc/hotplug.d/iface
|
2021-11-01 15:35:16 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/qosify-bpf.o $(1)/lib/bpf
|
2021-11-19 22:50:50 +00:00
|
|
|
$(INSTALL_BIN) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/bin/qosify \
|
|
|
|
./files/qosify-status \
|
|
|
|
$(1)/usr/sbin/
|
2021-11-01 15:35:16 +00:00
|
|
|
$(INSTALL_BIN) ./files/qosify.init $(1)/etc/init.d/qosify
|
2021-11-08 21:26:45 +00:00
|
|
|
$(INSTALL_DATA) ./files/qosify-defaults.conf $(1)/etc/qosify/00-defaults.conf
|
2021-11-01 15:35:16 +00:00
|
|
|
$(INSTALL_DATA) ./files/qosify.conf $(1)/etc/config/qosify
|
|
|
|
$(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/net/10-qosify
|
2021-11-22 16:21:51 +00:00
|
|
|
$(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/iface/10-qosify
|
2021-11-01 15:35:16 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,qosify))
|