From: David Bauer Date: Wed, 3 Mar 2021 23:11:31 +0000 (+0100) Subject: ethtool: add netlink build variant X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=6f71c19c3dfe3b628095412c236ae7b2940cf7dc;p=openwrt%2Fstaging%2Fblocktrron.git ethtool: add netlink build variant Netlink support is required for using the virtual cable tester functionality. Thus, add a build variant with enabled netlink support. Signed-off-by: David Bauer --- diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index 3efc90490b..ab068b9c20 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool PKG_VERSION:=5.10 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -34,28 +34,46 @@ define Package/ethtool URL:=http://www.kernel.org/pub/software/network/ethtool/ endef +define Package/ethtool-netlink + $(Package/ethtool) + TITLE += (netlink support) + VARIANT:=netlink + PROVIDES:=ethtool + CONFLICTS:=ethtool + DEPENDS:=+libmnl +endef + define Package/ethtool/description ethtool is a small utility for examining and tuning your ethernet-based network interface endef +Package/ethtool-netlink/description:=$(Package/ethtool/description) + define Package/ethtool/config config ETHTOOL_PRETTY_DUMP - depends on PACKAGE_ethtool + depends on PACKAGE_ethtool || PACKAGE_ethtool-netlink bool "Enable pretty printing" endef -CONFIGURE_ARGS += --disable-netlink - ifeq ($(CONFIG_ETHTOOL_PRETTY_DUMP),y) CONFIGURE_ARGS += --enable-pretty-dump else CONFIGURE_ARGS += --disable-pretty-dump endif +ifeq ($(BUILD_VARIANT),netlink) +CONFIGURE_ARGS += --enable-netlink +else +CONFIGURE_ARGS += --disable-netlink +endif + define Package/ethtool/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin endef +Package/ethtool-netlink/install=$(Package/ethtool/install) + $(eval $(call BuildPackage,ethtool)) +$(eval $(call BuildPackage,ethtool-netlink))