Openembedded Core Discussions
 help / color / mirror / Atom feed
* meta-toolchain type SDK containing external toolchain possible?
@ 2012-07-19 21:13 Manuel Bessler
  2012-07-19 21:21 ` Mark Hatle
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Bessler @ 2012-07-19 21:13 UTC (permalink / raw)
  To: openembedded-core

Hi all,

I'm using a vendor-supplied external (pre-built) toolchain in my build
(poky-denzil).
Is it possible to setup my toolchain such that it will be part of the
SDK package instead of the default {gcc,binutils}-cross-canadian?

I'm modeling my SDK after the meta-toolchain type SDK.

Right now when I build my image, all target code is built using my
pre-built external toolchain,
but when I 'bitbake <mysdk>', the toolchain built and distributed in
the SDK tarball is one built by bitbake.

That, in effect, makes my SDK unusable as the toolchain inside is
based on a different GCC/Binutils versions.

From my digging around in the recipes and classes, I think if I could
somehow make my toolchain
look like it provides gcc-cross-canadian and binutils-cross-canadian,
it might work. However I'm not
quite sure what I need to set to make this happen.

I tried to add this to conf/distro/include/tcmode-external-xxx.inc in my layer:
PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} =
"external-xxx-toolchain"
PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} =
"external-xxx-toolchain"

That alone did not change anything.

Then I tried adding the following to
recipes-core/meta/external-xxx-toolchain_4.5.3.bb in my layer:
PROVIDES += " gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} "
PROVIDES += " binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} "

to which bitbake complained:
ERROR: Multiple .bb files are due to be built which each provide
gcc-cross-canadian-mipsel
(xxx/recipes-core/meta/external-xxx-toolchain_4.5.3.bb
xxx/meta/recipes-devtools/gcc/gcc-cross-canadian_4.6.bb).
 This usually means one provides something the other doesn't and should.
(and the same for binutils).

All I want is to dump the external toolchain tree into the SDK output.

Any clues as to what I might be missing, or am I on the wrong path?

Thanks,
Manuel



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

* Re: meta-toolchain type SDK containing external toolchain possible?
  2012-07-19 21:13 meta-toolchain type SDK containing external toolchain possible? Manuel Bessler
@ 2012-07-19 21:21 ` Mark Hatle
  2012-07-20 16:45   ` Manuel Bessler
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2012-07-19 21:21 UTC (permalink / raw)
  To: openembedded-core

On 7/19/12 3:13 PM, Manuel Bessler wrote:
> Hi all,
>
> I'm using a vendor-supplied external (pre-built) toolchain in my build
> (poky-denzil).
> Is it possible to setup my toolchain such that it will be part of the
> SDK package instead of the default {gcc,binutils}-cross-canadian?

It is possible, but the external toolchain needs to be provided via a 
crosssdk/cross-canadian binary.  The external-csl-toolchain.bb can be used as a 
model for how to do this.

PREFERRED_PROVIDER and similar may also be needed to ensure you get the correct 
version, and not rebuilt from source versions.

> I'm modeling my SDK after the meta-toolchain type SDK.
>
> Right now when I build my image, all target code is built using my
> pre-built external toolchain,
> but when I 'bitbake <mysdk>', the toolchain built and distributed in
> the SDK tarball is one built by bitbake.
>
> That, in effect, makes my SDK unusable as the toolchain inside is
> based on a different GCC/Binutils versions.
>
>  From my digging around in the recipes and classes, I think if I could
> somehow make my toolchain
> look like it provides gcc-cross-canadian and binutils-cross-canadian,
> it might work. However I'm not
> quite sure what I need to set to make this happen.
>
> I tried to add this to conf/distro/include/tcmode-external-xxx.inc in my layer:
> PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} =
> "external-xxx-toolchain"
> PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} =
> "external-xxx-toolchain"

For my stuff I did;

PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = 
"external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"

PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = 
"external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"

PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = 
"external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"


> That alone did not change anything.
>
> Then I tried adding the following to
> recipes-core/meta/external-xxx-toolchain_4.5.3.bb in my layer:
> PROVIDES += " gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} "
> PROVIDES += " binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} "

Within the external-cs-toolchain-cross-canadian.bb I had similar provides as well..

> to which bitbake complained:
> ERROR: Multiple .bb files are due to be built which each provide
> gcc-cross-canadian-mipsel
> (xxx/recipes-core/meta/external-xxx-toolchain_4.5.3.bb
> xxx/meta/recipes-devtools/gcc/gcc-cross-canadian_4.6.bb).
>   This usually means one provides something the other doesn't and should.
> (and the same for binutils).
>
> All I want is to dump the external toolchain tree into the SDK output.
>
> Any clues as to what I might be missing, or am I on the wrong path?
>
> Thanks,
> Manuel
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>





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

* Re: meta-toolchain type SDK containing external toolchain possible?
  2012-07-19 21:21 ` Mark Hatle
@ 2012-07-20 16:45   ` Manuel Bessler
  2012-07-20 17:55     ` Mark Hatle
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Bessler @ 2012-07-20 16:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hi Mark,

On Thu, Jul 19, 2012 at 5:21 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 7/19/12 3:13 PM, Manuel Bessler wrote:
>> Is it possible to setup my toolchain such that it will be part of the
>> SDK package instead of the default {gcc,binutils}-cross-canadian?
>
>
> It is possible, but the external toolchain needs to be provided via a
> crosssdk/cross-canadian binary.  The external-csl-toolchain.bb can be used
> as a model for how to do this.

What do you mean by "via a crosssdk/cross-canadian binary"? Built by
bitbake using the *-cross-canadian recipes?



> For my stuff I did;
>
> PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} =
> "external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>
> PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} =
> "external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>
> PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} =
> "external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>
>
>
>> That alone did not change anything.
>>
>> Then I tried adding the following to
>> recipes-core/meta/external-xxx-toolchain_4.5.3.bb in my layer:
>> PROVIDES += " gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} "
>> PROVIDES += " binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} "
>
>
> Within the external-cs-toolchain-cross-canadian.bb I had similar provides as
> well..

So you have a separate recipe to satisfy cross-canadian ? I tried
finding this file but had no luck...

Thanks,
Manuel



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

* Re: meta-toolchain type SDK containing external toolchain possible?
  2012-07-20 16:45   ` Manuel Bessler
@ 2012-07-20 17:55     ` Mark Hatle
  2012-07-23 21:55       ` Manuel Bessler
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2012-07-20 17:55 UTC (permalink / raw)
  To: openembedded-core

On 7/20/12 10:45 AM, Manuel Bessler wrote:
> Hi Mark,
>
> On Thu, Jul 19, 2012 at 5:21 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>> On 7/19/12 3:13 PM, Manuel Bessler wrote:
>>> Is it possible to setup my toolchain such that it will be part of the
>>> SDK package instead of the default {gcc,binutils}-cross-canadian?
>>
>>
>> It is possible, but the external toolchain needs to be provided via a
>> crosssdk/cross-canadian binary.  The external-csl-toolchain.bb can be used
>> as a model for how to do this.
>
> What do you mean by "via a crosssdk/cross-canadian binary"? Built by
> bitbake using the *-cross-canadian recipes?

You need to create a crosssdk/cross-canadian recipe that copies the binary 
toolchain into the right SDK location(s).  Using external-csl-toolchain (or 
similar) as a guide.

>
>
>> For my stuff I did;
>>
>> PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} =
>> "external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>>
>> PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} =
>> "external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>>
>> PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} =
>> "external-csl-toolchain-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>>
>>
>>
>>> That alone did not change anything.
>>>
>>> Then I tried adding the following to
>>> recipes-core/meta/external-xxx-toolchain_4.5.3.bb in my layer:
>>> PROVIDES += " gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} "
>>> PROVIDES += " binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} "
>>
>>
>> Within the external-cs-toolchain-cross-canadian.bb I had similar provides as
>> well..
>
> So you have a separate recipe to satisfy cross-canadian ? I tried
> finding this file but had no luck...

Yes, I have external-cs-toolchain.bb, and 
external-cs-toolchain-cross-canadian.bb, which is based on the former.

(most of it is generic, so a single ".inc" version used by both should be 
possible as well..)

--Mark

>
> Thanks,
> Manuel
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>





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

* Re: meta-toolchain type SDK containing external toolchain possible?
  2012-07-20 17:55     ` Mark Hatle
@ 2012-07-23 21:55       ` Manuel Bessler
  0 siblings, 0 replies; 5+ messages in thread
From: Manuel Bessler @ 2012-07-23 21:55 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, Jul 20, 2012 at 1:55 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>> What do you mean by "via a crosssdk/cross-canadian binary"? Built by
>> bitbake using the *-cross-canadian recipes?
>
>
> You need to create a crosssdk/cross-canadian recipe that copies the binary
> toolchain into the right SDK location(s).  Using external-csl-toolchain (or
> similar) as a guide.

I'm looking at external-csl-toolchain and others I've found as examples,
and I've had this working for regular builds for a while, but I'm missing
examples showing how this translates for SDKs, ie. cross-canadian.

> Yes, I have external-cs-toolchain.bb, and
> external-cs-toolchain-cross-canadian.bb, which is based on the former.
>
> (most of it is generic, so a single ".inc" version used by both should be
> possible as well..)

I'm slowly working on something like that, but if you have done this somewhere,
I'd really appreciate if I could take a look at an example thats known
to work...

Thanks,
Manuel



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

end of thread, other threads:[~2012-07-23 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 21:13 meta-toolchain type SDK containing external toolchain possible? Manuel Bessler
2012-07-19 21:21 ` Mark Hatle
2012-07-20 16:45   ` Manuel Bessler
2012-07-20 17:55     ` Mark Hatle
2012-07-23 21:55       ` Manuel Bessler

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