[oe] Usage of meta recipe external-toolchain-csl

C Michael Sundius msundius at sundius.com
Fri Apr 30 16:02:55 UTC 2010


This is my understanding:

- the meta-toolchain.bb creates an sdk from a tool chain built by OE.
- the external-toolchain.bb takes the sdk built by meta-toolchain.bb  
and installs it back into oe to be used by rest of the build.

If you are using a CS toolchain that you didn't build yourself w/ the  
meta toolchain recipe then you might have to make some tweeks here and  
there, but in general the external toolchain recipe will pull the  
toolchain into your oe environment:

  -- the compiler into the cross or host staging area
  -- the binutils into the cross or host staging area
  -- the libraries (libc libgcc etc) into the target staging area
  -- the headerfiles into the target staging area

you need to set the PREFERRED_PROVIDER for each of these packages to  
point to the external-toolchain recipe that you are using. This is  
described in the OE user manual.

its something like this:
PREFERRED_PROVIDER_libc-headers = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-mips-linux- 
toolchain"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external- 
mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate =  
"external-mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-mips- 
linux-toolchain"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external- 
mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/libc = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/libintl = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/libiconv = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_glibc-utils = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_libsegfault = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_glibc-thread-db = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_libgcc-dev = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_libgcc = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_libstdc++-dev = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_libstdc++ = "external-mips-linux-toolchain"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "external- 
mips-linux-toolchain"

that's what I use in my distro. Note that we are using a bit of a non- 
standard toolchain forced upon us for legacy reasons and some things  
were not in the exact same place that the external-toolchain recipe  
was expecting so we had to do our own recipe.

I'm by no means an expert, but at least that's how we have things  
working :] good luck

mike

On Apr 30, 2010, at 6:34 AM, Jerry Jacobs wrote:

> Dear all,
>
> I'm very new to openembedded and already have a clear view how it is
> structured. My embedded board mini2440 is already in git and want to  
> create
> my own distro.
> The problem where I bump against is how to use the Codesourcery  
> external
> toolchain for my target. I know there is the file in recipes/meta/
> external-toolchain-csl.bb
> but it not clear how to use it.
>
> This is how my tree looks like:
>
> /opt/arm-2010q1/bin  ==> codesourcery toolchain
>
> /opt/mini2440/oe/
>   |----- bitbake              ==> bitbake
>   |----- openembedded ==> openembedded overlay
>   |----- tunebox             ==> my distro buildir
>           | ------ conf        ==> configuration dir for local.conf
>           | ------ setenv    ==> script to set the environment
>
> setenv:
> export OEBASE=/opt/mini2440/oe/openembedded
> export PATH=/opt/mini2440/oe/bitbake/bin:/opt/arm-2010q1/bin:$PATH
> export BBPATH=/opt/mini2440/oe/tunebox:$OEBASE
> export BB_ENV_EXTRAWHITE="OEBASE"
>
> local.conf:
> BBFILES = "/opt/mini2440/oe/openembedded/recipes/*/*.bb"
> DISTRO = "micro"
> MACHINE = "mini2440"
>
> I found also the arago distro which has a toolchain-csl.conf and  
> includes it
> in local.conf, but they do black magic to set the variables:
> TOOLCHAIN_SYSPATH
> TOOLCHAIN_PATH
> SDK_PATH
>
> which can be found in the git repository.
>
> I hope somebody can clear some things up, because its very obsecure  
> if you
> start from scratch.
>
> Kind regards,
> Jerry Jacobs
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel





More information about the Openembedded-devel mailing list