Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] export ARCH and CROSS_COMPILE for the post build script
@ 2012-10-18  6:17 Thierry Bultel
  2012-10-18 13:38 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Bultel @ 2012-10-18  6:17 UTC (permalink / raw)
  To: buildroot

Hello,

Could we make the export of PATH and CROSS_COMPILE to the post-build 
script ?
This would be really useful for building an external user application in 
one shot (and I need it in my case).

eg something like this in the top Makefile:

ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
     @$(call MESSAGE,"Executing post-build script")
*ARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS)* 
$(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
endif

Of course this could be implemented as an option.

What do you think about it ?

Thanks
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121018/62f707dd/attachment-0001.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] export ARCH and CROSS_COMPILE for the post build script
  2012-10-18  6:17 [Buildroot] export ARCH and CROSS_COMPILE for the post build script Thierry Bultel
@ 2012-10-18 13:38 ` Thomas Petazzoni
  2012-10-18 15:31   ` Thierry Bultel
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-18 13:38 UTC (permalink / raw)
  To: buildroot

Dear Thierry Bultel,

On Thu, 18 Oct 2012 08:17:31 +0200, Thierry Bultel wrote:

> Could we make the export of PATH and CROSS_COMPILE to the post-build 
> script ?
> This would be really useful for building an external user application
> in one shot (and I need it in my case).
> 
> eg something like this in the top Makefile:
> 
> ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
>      @$(call MESSAGE,"Executing post-build script")
> *ARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS)* 
> $(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
> endif
> 
> Of course this could be implemented as an option.
> 
> What do you think about it ?

Why don't you create a Buildroot package to build your external
application? It sounds much more logical.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] export ARCH and CROSS_COMPILE for the post build script
  2012-10-18 13:38 ` Thomas Petazzoni
@ 2012-10-18 15:31   ` Thierry Bultel
  2012-10-18 17:12     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Bultel @ 2012-10-18 15:31 UTC (permalink / raw)
  To: buildroot

Le 18/10/2012 15:38, Thomas Petazzoni a ?crit :
> Dear Thierry Bultel,
>
> On Thu, 18 Oct 2012 08:17:31 +0200, Thierry Bultel wrote:
>
>> Could we make the export of PATH and CROSS_COMPILE to the post-build
>> script ?
>> This would be really useful for building an external user application
>> in one shot (and I need it in my case).
>>
>> eg something like this in the top Makefile:
>>
>> ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
>>       @$(call MESSAGE,"Executing post-build script")
>> *ARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS)*
>> $(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
>> endif
>>
>> Of course this could be implemented as an option.
>>
>> What do you think about it ?
> Why don't you create a Buildroot package to build your external
> application? It sounds much more logical.

That was my very first idea.
But I wanted to keep the Buildroot tree unchanged.

And at the time I took the decision, I did not find out how
to make such a package be built after all the others.
So "post build" sounded appropriate.

> Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] export ARCH and CROSS_COMPILE for the post build script
  2012-10-18 15:31   ` Thierry Bultel
@ 2012-10-18 17:12     ` Thomas Petazzoni
  2012-10-18 19:21       ` Thierry Bultel
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-18 17:12 UTC (permalink / raw)
  To: buildroot

Dear Thierry Bultel,

On Thu, 18 Oct 2012 17:31:20 +0200, Thierry Bultel wrote:

> >> What do you think about it ?
> > Why don't you create a Buildroot package to build your external
> > application? It sounds much more logical.
> 
> That was my very first idea.
> But I wanted to keep the Buildroot tree unchanged.

You can keep your Buildroot tree unchanged and still have Buildroot
packages for your own application:

 buildroot/
 mysystem/
    mysystem.mk
    packages/
       myapp/myapp.mk
       myotherapp/myotherapp.mk

And then you can do something like this in mysystem.mk:

BR2_PACKAGE_MYAPP=y
BR2_PACKAGE_MYOTHERAPP=y
include packages/*/*.mk

And your Buildroot configuration, set BR2_PACKAGE_OVERRIDE_FILE to
"$(TOPDIR)/../system.mk".

> And at the time I took the decision, I did not find out how
> to make such a package be built after all the others.

Why would you want to do that absolutely? If your packages have
dependencies, put them in <yourpackage>_DEPENDENCIES, and your package
will be built after its required dependencies. There is no reason to
build after *all* packages.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] export ARCH and CROSS_COMPILE for the post build script
  2012-10-18 17:12     ` Thomas Petazzoni
@ 2012-10-18 19:21       ` Thierry Bultel
  0 siblings, 0 replies; 5+ messages in thread
From: Thierry Bultel @ 2012-10-18 19:21 UTC (permalink / raw)
  To: buildroot

Le 18/10/2012 19:12, Thomas Petazzoni a ?crit :
> Dear Thierry Bultel,
>
> On Thu, 18 Oct 2012 17:31:20 +0200, Thierry Bultel wrote:
>
>>>> What do you think about it ?
>>> Why don't you create a Buildroot package to build your external
>>> application? It sounds much more logical.
>>
>> That was my very first idea.
>> But I wanted to keep the Buildroot tree unchanged.
>
> You can keep your Buildroot tree unchanged and still have Buildroot
> packages for your own application:
>
>   buildroot/
>   mysystem/
>      mysystem.mk
>      packages/
>         myapp/myapp.mk
>         myotherapp/myotherapp.mk
>
> And then you can do something like this in mysystem.mk:
>
> BR2_PACKAGE_MYAPP=y
> BR2_PACKAGE_MYOTHERAPP=y
> include packages/*/*.mk
>
> And your Buildroot configuration, set BR2_PACKAGE_OVERRIDE_FILE to
> "$(TOPDIR)/../system.mk".
>

Thanks, that is exactly what I need.

>> And at the time I took the decision, I did not find out how
>> to make such a package be built after all the others.
>
> Why would you want to do that absolutely? If your packages have
> dependencies, put them in <yourpackage>_DEPENDENCIES, and your package
> will be built after its required dependencies. There is no reason to
> build after *all* packages.

You are right, even if I need quite a lot of things, this does not
mean all the packages. And it is valuable to maintain a known
list of dependencies.

Thanks
Thierry
>
> Thomas
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-18 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  6:17 [Buildroot] export ARCH and CROSS_COMPILE for the post build script Thierry Bultel
2012-10-18 13:38 ` Thomas Petazzoni
2012-10-18 15:31   ` Thierry Bultel
2012-10-18 17:12     ` Thomas Petazzoni
2012-10-18 19:21       ` Thierry Bultel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox