ethtool: Allow enabling/disabling pretty printing
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 6 Nov 2017 01:29:06 +0000 (17:29 -0800)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 6 Nov 2017 08:50:51 +0000 (09:50 +0100)
Ethtool has a configure script option allowing the enabling or disabling of
pretty printing for drivers, SFP modules etc which can save a significant
amount of bytes on the root filesystem. Allow selecting that, and turn it on by
default (like ethtool's configure script).

[Peter: fix Config.in indentation/style]
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ethtool/Config.in
package/ethtool/ethtool.mk

index 09704979e864eed5e5331f3678405a8a1d4a90b1..48173bfe2e29a363750f4e58519479192ee0942c 100644 (file)
@@ -5,3 +5,11 @@ config BR2_PACKAGE_ETHTOOL
          ethernet-based network interface.
 
          https://www.kernel.org/pub/software/network/ethtool/
+
+config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
+       bool "enable pretty printing"
+       default y
+       depends on BR2_PACKAGE_ETHTOOL
+       help
+         Enables ethtool's pretty printing for drivers
+         and SFP modules.
index 991df499a8fda882742117fc34f2f9b4eee8ac62..d8ebba5fae0540d7a8eddc1a8b5935c7fcf454ea 100644 (file)
@@ -9,5 +9,7 @@ ETHTOOL_SOURCE = ethtool-$(ETHTOOL_VERSION).tar.xz
 ETHTOOL_SITE = $(BR2_KERNEL_MIRROR)/software/network/ethtool
 ETHTOOL_LICENSE = GPL-2.0
 ETHTOOL_LICENSE_FILES = COPYING
+ETHTOOL_CONF_OPTS = \
+       $(if $(BR2_PACKAGE_ETHTOOL_PRETTY_PRINT),--enable-pretty-dump,--disable-pretty-dump)
 
 $(eval $(autotools-package))