Skip to content

Commit

Permalink
iproute2: add cake fwmark support
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Mar 20, 2019
1 parent d118a76 commit a52f85c
Show file tree
Hide file tree
Showing 17 changed files with 416 additions and 493 deletions.
24 changes: 13 additions & 11 deletions package/libs/elfutils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=elfutils
PKG_VERSION:=0.174
PKG_RELEASE:=2
PKG_VERSION:=0.175
PKG_RELEASE:=4

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
PKG_HASH:=cdf27e70076e10a29539d89e367101d516bc4aa11b0d7777fe52139e3fcad08a
PKG_HASH:=f7ef925541ee32c6d15ae5cb27da5f119e01a5ccdbe9fe57bf836730d7b7a65b
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <[email protected]>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
Expand All @@ -33,24 +33,26 @@ define Package/elfutils/Default
CATEGORY:=Libraries
TITLE:=ELF manipulation libraries
URL:=https://fedorahosted.org/elfutils/
ABI_VERSION:=1
endef

define Package/libasm
$(call Package/elfutils/Default)
TITLE+= (libasm)
DEPENDS:=libelf1 +libdw
DEPENDS:=+libelf +libdw
endef

define Package/libdw
$(call Package/elfutils/Default)
DEPENDS:=libelf1 +libbz2
DEPENDS:=+libelf +libbz2
TITLE+= (libdw)
endef

define Package/libelf1
define Package/libelf
$(call Package/elfutils/Default)
DEPENDS:=$(INTL_DEPENDS) +zlib
TITLE+= (libelf)
PROVIDES:=libelf1
endef

ifeq ($(CONFIG_BUILD_NLS),y)
Expand Down Expand Up @@ -79,19 +81,19 @@ endef

define Package/libasm/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm{-*.so,*.so.*} $(1)/usr/lib/
endef

define Package/libdw/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw{-*.so,*.so.*} $(1)/usr/lib/
endef

define Package/libelf1/install
define Package/libelf/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf{-*.so,*.so.*} $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libasm))
$(eval $(call BuildPackage,libdw))
$(eval $(call BuildPackage,libelf1))
$(eval $(call BuildPackage,libelf))
53 changes: 33 additions & 20 deletions package/network/utils/iproute2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=iproute2
PKG_VERSION:=4.19.0
PKG_RELEASE:=8
PKG_VERSION:=4.20.0
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
PKG_HASH:=d9ec5ca1f47d8a85416fa26e7dc1cbf5d067640eb60e90bdc1c7e5bdc6a29984
PKG_HASH:=c8adaa6a40f888476b23acb283cfa30c0dd55f07b5aa20663ed5ba2ef1f6fda8
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
Expand All @@ -37,6 +37,7 @@ define Package/ip-tiny
$(call Package/iproute2/Default)
TITLE:=Routing control utility (Minimal)
VARIANT:=tiny
DEFAULT_VARIANT:=1
PROVIDES:=ip
ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
Expand All @@ -48,55 +49,66 @@ $(call Package/iproute2/Default)
VARIANT:=full
PROVIDES:=ip
ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
DEPENDS:=+libnl-tiny +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef

define Package/tc
$(call Package/iproute2/Default)
TITLE:=Traffic control utility
DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libelf1
VARIANT:=tc
PROVIDES:=tc
DEPENDS:=+kmod-sched-core +libxtables +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
endef

define Package/genl
$(call Package/iproute2/Default)
TITLE:=General netlink utility frontend
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
endef

define Package/ip-bridge
$(call Package/iproute2/Default)
TITLE:=Bridge configuration utility from iproute2
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
endef

define Package/ss
$(call Package/iproute2/Default)
TITLE:=Socket statistics utility
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
endef

define Package/nstat
$(call Package/iproute2/Default)
TITLE:=Network statistics utility
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
endef

define Package/devlink
$(call Package/iproute2/Default)
TITLE:=Network devlink utility
DEPENDS:=+libmnl
DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
endef

define Package/rdma
$(call Package/iproute2/Default)
TITLE:=Network rdma utility
DEPENDS:=+libmnl
DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
endef

ifeq ($(BUILD_VARIANT),tiny)
IP_CONFIG_TINY:=y
endif

ifeq ($(BUILD_VARIANT),full)
HAVE_ELF:=y
endif

ifeq ($(BUILD_VARIANT),tc)
HAVE_ELF:=y
SHARED_LIBS:=y
endif

ifdef CONFIG_PACKAGE_devlink
HAVE_MNL:=y
endif
Expand All @@ -106,25 +118,22 @@ ifdef CONFIG_PACKAGE_rdma
endif

define Build/Configure
$(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
$(PKG_BUILD_DIR)/Makefile
$(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
$(PKG_BUILD_DIR)/Makefile
echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \
> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
endef

TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny

MAKE_FLAGS += \
EXTRA_CCOPTS="-I$(STAGING_DIR)/usr/include/libnl-tiny" \
KERNEL_INCLUDE="$(LINUX_DIR)/include" \
SHARED_LIBS="" \
LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \
SHARED_LIBS=$(SHARED_LIBS) \
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
HAVE_ELF=$(HAVE_ELF) \
HAVE_MNL=$(HAVE_MNL) \
IPT_LIB_DIR=/usr/lib/iptables \
XT_LIB_DIR=/usr/lib/iptables \
FPIC="$(FPIC)"

define Build/Compile
Expand Down Expand Up @@ -153,6 +162,10 @@ define Package/tc/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/15-teql $(1)/etc/hotplug.d/iface/
ifeq ($(SHARED_LIBS),y)
$(INSTALL_DIR) $(1)/usr/lib/tc
$(CP) $(PKG_BUILD_DIR)/tc/*.so $(1)/usr/lib/tc
endif
endef

define Package/genl/install
Expand Down
Loading

0 comments on commit a52f85c

Please sign in to comment.