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
|
2022-03-21 19:26:56 +00:00
|
|
|
PKG_SOURCE_DATE:=2022-03-22
|
|
|
|
PKG_SOURCE_VERSION:=57c7817f91c2ff2f247b2d7eb8554e861c4aec33
|
|
|
|
PKG_MIRROR_HASH:=409f7db13a36334557de861a016a8d9f241070b2bbf6f738e992281b36f41cd4
|
2022-03-04 15:25:59 +00:00
|
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
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
|
2021-11-08 20:28:27 +00:00
|
|
|
DEPENDS:=+libbpf +libubox +libubus +kmod-sched-cake +kmod-sched-bpf +kmod-ifb +tc-full $(BPF_DEPENDS)
|
2021-11-01 15:35:16 +00:00
|
|
|
endef
|
|
|
|
|
2022-03-15 13:33:59 +00:00
|
|
|
TARGET_CFLAGS += -Wno-error=deprecated-declarations
|
|
|
|
|
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))
|