* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
@ 2017-11-06 1:29 Florian Fainelli
2017-11-06 5:30 ` Baruch Siach
2017-11-06 8:52 ` Peter Korsgaard
0 siblings, 2 replies; 7+ messages in thread
From: Florian Fainelli @ 2017-11-06 1:29 UTC (permalink / raw)
To: buildroot
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).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
package/ethtool/Config.in | 10 ++++++++++
package/ethtool/ethtool.mk | 2 ++
2 files changed, 12 insertions(+)
diff --git a/package/ethtool/Config.in b/package/ethtool/Config.in
index 09704979e864..77795a838971 100644
--- a/package/ethtool/Config.in
+++ b/package/ethtool/Config.in
@@ -5,3 +5,13 @@ config BR2_PACKAGE_ETHTOOL
ethernet-based network interface.
https://www.kernel.org/pub/software/network/ethtool/
+
+if BR2_PACKAGE_ETHTOOL
+
+ config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
+ bool "enable pretty printing"
+ default y
+ help
+ Enables ethtool's pretty printing for drivers
+ and SFP modules.
+endif
diff --git a/package/ethtool/ethtool.mk b/package/ethtool/ethtool.mk
index 991df499a8fd..d8ebba5fae05 100644
--- a/package/ethtool/ethtool.mk
+++ b/package/ethtool/ethtool.mk
@@ -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))
--
2.14.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
2017-11-06 1:29 [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing Florian Fainelli
@ 2017-11-06 5:30 ` Baruch Siach
2017-11-06 5:36 ` Florian Fainelli
2017-11-06 8:52 ` Peter Korsgaard
1 sibling, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2017-11-06 5:30 UTC (permalink / raw)
To: buildroot
Hi Florian,
On Sun, Nov 05, 2017 at 05:29:06PM -0800, Florian Fainelli wrote:
> 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).
Have you measured the impact on the target size?
A test build I ran here (ARM Cortex-A9, musl) showed a significant reduction
of the (stripped) binary size from 233124 to 60408.
baruch
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> package/ethtool/Config.in | 10 ++++++++++
> package/ethtool/ethtool.mk | 2 ++
> 2 files changed, 12 insertions(+)
>
> diff --git a/package/ethtool/Config.in b/package/ethtool/Config.in
> index 09704979e864..77795a838971 100644
> --- a/package/ethtool/Config.in
> +++ b/package/ethtool/Config.in
> @@ -5,3 +5,13 @@ config BR2_PACKAGE_ETHTOOL
> ethernet-based network interface.
>
> https://www.kernel.org/pub/software/network/ethtool/
> +
> +if BR2_PACKAGE_ETHTOOL
> +
> + config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
> + bool "enable pretty printing"
> + default y
> + help
> + Enables ethtool's pretty printing for drivers
> + and SFP modules.
> +endif
> diff --git a/package/ethtool/ethtool.mk b/package/ethtool/ethtool.mk
> index 991df499a8fd..d8ebba5fae05 100644
> --- a/package/ethtool/ethtool.mk
> +++ b/package/ethtool/ethtool.mk
> @@ -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)
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
2017-11-06 5:30 ` Baruch Siach
@ 2017-11-06 5:36 ` Florian Fainelli
0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2017-11-06 5:36 UTC (permalink / raw)
To: buildroot
On November 5, 2017 9:30:03 PM PST, Baruch Siach <baruch@tkos.co.il> wrote:
>Hi Florian,
>
>On Sun, Nov 05, 2017 at 05:29:06PM -0800, Florian Fainelli wrote:
>> 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).
>
>Have you measured the impact on the target size?
Yes, this was included in the original commit message:
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=875616dfcbe57ea0f639a20d85fcbad2172ad744
~500 Kbytes on a x86_64 build
~337 Kbytes on a arm build
(savings from the original size)
>
>A test build I ran here (ARM Cortex-A9, musl) showed a significant
>reduction
>of the (stripped) binary size from 233124 to 60408.
My numbers were not stripped AFAIR, but what you are posting sounds about right.
Thanks
Hello,
--
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
2017-11-06 1:29 [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing Florian Fainelli
2017-11-06 5:30 ` Baruch Siach
@ 2017-11-06 8:52 ` Peter Korsgaard
2017-11-06 9:05 ` Thomas Petazzoni
1 sibling, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2017-11-06 8:52 UTC (permalink / raw)
To: buildroot
>>>>> "Florian" == Florian Fainelli <f.fainelli@gmail.com> writes:
> 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).
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> package/ethtool/Config.in | 10 ++++++++++
> package/ethtool/ethtool.mk | 2 ++
> 2 files changed, 12 insertions(+)
> diff --git a/package/ethtool/Config.in b/package/ethtool/Config.in
> index 09704979e864..77795a838971 100644
> --- a/package/ethtool/Config.in
> +++ b/package/ethtool/Config.in
> @@ -5,3 +5,13 @@ config BR2_PACKAGE_ETHTOOL
> ethernet-based network interface.
> https://www.kernel.org/pub/software/network/ethtool/
> +
> +if BR2_PACKAGE_ETHTOOL
> +
> + config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
> + bool "enable pretty printing"
> + default y
> + help
> + Enables ethtool's pretty printing for drivers
> + and SFP modules.
> +endif
We don't indent sub options in Config.in, and normally don't do the if
BR2_PACKAGE_FOO ... endif unless there are several sub options - so I've
fixed that and committed, thanks.
Consider running utils/check-package on your patches before sending as
it would have complained about this.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
2017-11-06 8:52 ` Peter Korsgaard
@ 2017-11-06 9:05 ` Thomas Petazzoni
2017-11-06 9:07 ` Baruch Siach
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-11-06 9:05 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 06 Nov 2017 09:52:37 +0100, Peter Korsgaard wrote:
> > +if BR2_PACKAGE_ETHTOOL
> > +
> > + config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
> > + bool "enable pretty printing"
> > + default y
Should this really be "default y" ? Baruch reported a significant size
increase with this option enabled.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
2017-11-06 9:05 ` Thomas Petazzoni
@ 2017-11-06 9:07 ` Baruch Siach
2017-11-06 9:19 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2017-11-06 9:07 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Mon, Nov 06, 2017 at 10:05:35AM +0100, Thomas Petazzoni wrote:
> On Mon, 06 Nov 2017 09:52:37 +0100, Peter Korsgaard wrote:
>
> > > +if BR2_PACKAGE_ETHTOOL
> > > +
> > > + config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
> > > + bool "enable pretty printing"
> > > + default y
>
> Should this really be "default y" ? Baruch reported a significant size
> increase with this option enabled.
This is the current default. The added option only allows to to remove pretty
printing.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing
2017-11-06 9:07 ` Baruch Siach
@ 2017-11-06 9:19 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-11-06 9:19 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 6 Nov 2017 11:07:57 +0200, Baruch Siach wrote:
> On Mon, Nov 06, 2017 at 10:05:35AM +0100, Thomas Petazzoni wrote:
> > On Mon, 06 Nov 2017 09:52:37 +0100, Peter Korsgaard wrote:
> >
> > > > +if BR2_PACKAGE_ETHTOOL
> > > > +
> > > > + config BR2_PACKAGE_ETHTOOL_PRETTY_PRINT
> > > > + bool "enable pretty printing"
> > > > + default y
> >
> > Should this really be "default y" ? Baruch reported a significant size
> > increase with this option enabled.
>
> This is the current default. The added option only allows to to remove pretty
> printing.
Aah, ok. Works for me then.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-11-06 9:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-06 1:29 [Buildroot] [PATCH] ethtool: Allow enabling/disabling pretty printing Florian Fainelli
2017-11-06 5:30 ` Baruch Siach
2017-11-06 5:36 ` Florian Fainelli
2017-11-06 8:52 ` Peter Korsgaard
2017-11-06 9:05 ` Thomas Petazzoni
2017-11-06 9:07 ` Baruch Siach
2017-11-06 9:19 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox