* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
@ 2016-12-02 11:51 Marcin Nowakowski
2016-12-02 16:11 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: Marcin Nowakowski @ 2016-12-02 11:51 UTC (permalink / raw)
To: buildroot
When BR2_STRIP is set to none, a dummy 'true' app is used instead of
strip utility. However, kexec package always requires a real strip
executable as it is used to generate intermediate files during the build
process.
If 'true' is used the build system runs the following command:
true --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym
which obviously doesn't do anything useful and the build later fails
with:
bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c
/bin/sh: purgatory/purgatory.ro: No such file or directory
kexec/Makefile:7: recipe for target 'kexec/purgatory.c' failed
make[2]: *** [kexec/purgatory.c] Error 1
To resolve it always specify STRIP=$(CROSS_COMPILE)strip, regardless of
buildroot configuration.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
---
package/kexec/kexec.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk
index 4ca55e5..08c5424 100644
--- a/package/kexec/kexec.mk
+++ b/package/kexec/kexec.mk
@@ -10,6 +10,8 @@ KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kexec
KEXEC_LICENSE = GPLv2
KEXEC_LICENSE_FILES = COPYING
+KEXEC_MAKE_OPTS = STRIP="$(TARGET_CROSS)strip"
+
ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y)
KEXEC_CONF_OPTS += --with-zlib
KEXEC_DEPENDENCIES = zlib
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-02 11:51 [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y Marcin Nowakowski
@ 2016-12-02 16:11 ` Peter Korsgaard
2016-12-02 20:38 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2016-12-02 16:11 UTC (permalink / raw)
To: buildroot
>>>>> "Marcin" == Marcin Nowakowski <marcin.nowakowski@imgtec.com> writes:
> When BR2_STRIP is set to none, a dummy 'true' app is used instead of
> strip utility. However, kexec package always requires a real strip
> executable as it is used to generate intermediate files during the build
> process.
> If 'true' is used the build system runs the following command:
> true --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym
> which obviously doesn't do anything useful and the build later fails
> with:
> bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c
> /bin/sh: purgatory/purgatory.ro: No such file or directory
> kexec/Makefile:7: recipe for target 'kexec/purgatory.c' failed
> make[2]: *** [kexec/purgatory.c] Error 1
> To resolve it always specify STRIP=$(CROSS_COMPILE)strip, regardless of
> buildroot configuration.
My first thought was that we shouldn't strip when the user has selected
not to do so, but as it leaves the unstripped variant around I guess it
is OK.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-02 16:11 ` Peter Korsgaard
@ 2016-12-02 20:38 ` Thomas Petazzoni
2016-12-02 21:09 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 20:38 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 02 Dec 2016 17:11:07 +0100, Peter Korsgaard wrote:
> > When BR2_STRIP is set to none, a dummy 'true' app is used instead of
> > strip utility. However, kexec package always requires a real strip
> > executable as it is used to generate intermediate files during the build
> > process.
>
> > If 'true' is used the build system runs the following command:
>
> > true --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym
>
> > which obviously doesn't do anything useful and the build later fails
> > with:
>
> > bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c
> > /bin/sh: purgatory/purgatory.ro: No such file or directory
> > kexec/Makefile:7: recipe for target 'kexec/purgatory.c' failed
> > make[2]: *** [kexec/purgatory.c] Error 1
>
> > To resolve it always specify STRIP=$(CROSS_COMPILE)strip, regardless of
> > buildroot configuration.
>
> My first thought was that we shouldn't strip when the user has selected
> not to do so, but as it leaves the unstripped variant around I guess it
> is OK.
My other thought is that I believe it's not the first time (see commit
fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of
having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should
handle this in a different way.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-02 20:38 ` Thomas Petazzoni
@ 2016-12-02 21:09 ` Peter Korsgaard
2016-12-02 21:34 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2016-12-02 21:09 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
> My other thought is that I believe it's not the first time (see commit
> fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of
> having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should
> handle this in a different way.
The question is how? Create a dummy shell script to better emulate the
command line options / behaviour of strip?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-02 21:09 ` Peter Korsgaard
@ 2016-12-02 21:34 ` Thomas Petazzoni
2016-12-05 22:34 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 21:34 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 02 Dec 2016 22:09:53 +0100, Peter Korsgaard wrote:
> Hi,
>
> > My other thought is that I believe it's not the first time (see commit
> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of
> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should
> > handle this in a different way.
>
> The question is how? Create a dummy shell script to better emulate the
> command line options / behaviour of strip?
I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass
enough options to strip to have it not strip anything? :-)
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-02 21:34 ` Thomas Petazzoni
@ 2016-12-05 22:34 ` Peter Korsgaard
2016-12-06 23:48 ` Arnout Vandecappelle
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2016-12-05 22:34 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Hello,
> On Fri, 02 Dec 2016 22:09:53 +0100, Peter Korsgaard wrote:
>> Hi,
>>
>> > My other thought is that I believe it's not the first time (see commit
>> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of
>> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should
>> > handle this in a different way.
>>
>> The question is how? Create a dummy shell script to better emulate the
>> command line options / behaviour of strip?
> I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass
> enough options to strip to have it not strip anything? :-)
Not that I'm aware of at least. Anyone?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-05 22:34 ` Peter Korsgaard
@ 2016-12-06 23:48 ` Arnout Vandecappelle
2016-12-07 7:23 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2016-12-06 23:48 UTC (permalink / raw)
To: buildroot
On 05-12-16 23:34, Peter Korsgaard wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
> > Hello,
> > On Fri, 02 Dec 2016 22:09:53 +0100, Peter Korsgaard wrote:
>
> >> Hi,
> >>
> >> > My other thought is that I believe it's not the first time (see commit
> >> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of
> >> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should
> >> > handle this in a different way.
> >>
> >> The question is how? Create a dummy shell script to better emulate the
> >> command line options / behaviour of strip?
>
> > I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass
> > enough options to strip to have it not strip anything? :-)
>
> Not that I'm aware of at least. Anyone?
Why do we have to set TARGET_STRIP to something different when
BR2_STRIP_none=y? BR2_STRIP_none is supposed to mean that we don't strip all
binaries, it doesn't mean that an individual package isn't allowed to strip its
binaries...
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y
2016-12-06 23:48 ` Arnout Vandecappelle
@ 2016-12-07 7:23 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2016-12-07 7:23 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
>> >> > My other thought is that I believe it's not the first time (see commit
>> >> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of
>> >> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should
>> >> > handle this in a different way.
>> >>
>> >> The question is how? Create a dummy shell script to better emulate the
>> >> command line options / behaviour of strip?
>>
>> > I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass
>> > enough options to strip to have it not strip anything? :-)
>>
>> Not that I'm aware of at least. Anyone?
> Why do we have to set TARGET_STRIP to something different when
> BR2_STRIP_none=y? BR2_STRIP_none is supposed to mean that we don't strip all
> binaries, it doesn't mean that an individual package isn't allowed to strip its
> binaries...
Sorry, I don't agree. Quite some packages afaik call $(STRIP) (which we
set to TARGET_STRIP) in their 'make install'. Users don't really care if
binaries are stripped during <foo>-install-target or target-finalize,
the end result for them is the same.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-12-07 7:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 11:51 [Buildroot] [PATCH] kexec: fix build when BR2_STRIP_none=y Marcin Nowakowski
2016-12-02 16:11 ` Peter Korsgaard
2016-12-02 20:38 ` Thomas Petazzoni
2016-12-02 21:09 ` Peter Korsgaard
2016-12-02 21:34 ` Thomas Petazzoni
2016-12-05 22:34 ` Peter Korsgaard
2016-12-06 23:48 ` Arnout Vandecappelle
2016-12-07 7:23 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.