[oe] External toolchain

Luca Bolognini l.bolognini at tiscali.it
Thu Feb 24 09:13:15 UTC 2011


Hi all,thank you to Denys and Khem for their replies.I would be glad to write a short wiki on "setting an external toolchain" topic but I think the route I followed is not the straightest one.In fact, as Denys underlined, I was wrong in modifying angstrom-2008.1.conf instead of local.conf, where I could have handled much less variables.I think it's quite better to put Denys reply in a FAQ, where everyone can access this info in the quickest way.As you have understood I engaged in putting an external toolchainin OE to get apache2 and modphp (still them!) in my Arago FS. I don't know if you have read my previous posts on the topic (I think it's extremely hard if it's all in one row, what a poor email client, sorry! :-( ), maybe you could help me?
Thank you,bye
Luca




----Messaggio originale----
Da: denis at denix.org
Data: 24/02/2011 5.07
A: <openembedded-devel at lists.openembedded.org>
Ogg: Re: [oe] External toolchain

On Wed, Feb 23, 2011 at 11:28:51AM -0800, Khem Raj wrote:
> On Wed, Feb 23, 2011 at 3:49 AM, Luca Bolognini <l.bolognini at tiscali.it> wrote:
> > Hi,thank you Ahsan for you reply.I solved my issue and I succeed in using external toolchain CodeSourcery2009q1 to cross-compile some packages in my OE 2010.12 release.However I didn't create any symlink of arm-angstrom-linux-gnueabi-gcc to arm-none-linux-gnueabi-gcc.I added an instantiation of TARGET_SYS variable to the hints of Denys and Tom (se reference link in my previous email).It's important to do so in order not to have errors in the do_install task of external-toolchain-csl.bb recipe.Then, as a resume, my openembedded/conf/distro/angstrom-2008.1.conf file changed in this way:
> > # Set the toolchain type (internal, external) and brand (generic, csl etc.)# LUCATARGET_VENDOR = "-none"TOOLCHAIN_TYPE ?= "external"TOOLCHAIN_BRAND ?= "csl"TOOLCHAIN_PATH = "/opt/ti/codesourcery"TARGET_SYS = "arm-none-linux-gnueabi"TOOLCHAIN_SYSPATH = "${TOOLCHAIN_PATH}/arm-none-linux-gnueabi"PATH_prepend = "${TOOLCHAIN_PATH}/bin:"require conf/distro/include/toolchain-external.inc
> > instead of
> > # Set the toolchain type (internal, external) and brand (generic, csl etc.)TOOLCHAIN_TYPE ?= "internal"TOOLCHAIN_BRAND ?= ""
> > Then it worked.Bye,Luca
> >

Luca,

Your MUA ate all the newlines and made your message into one long line, which 
is quite hard to read... :)

Anyway, you don't need to set TARGET_SYS manually, as it is composed from 
TARGET_ARCH, TARGET_VENDOR and TARGET_OS in bitbake.conf. Also, don't worry 
about TOOLCHAIN_SYSPATH - the default is also set there and is fine.

The reason you are having the issue you've mentioned, is because instead of 
adding those variables to your local.conf file, you are modifying 
angstrom-2008.1.conf, where placement is important - before or after the 
toolchain variables are handled.

Plus, more importantly, to overwrite distro's TARGET_VENDOR properly, you need 
to set TOOLCHAIN_VENDOR variable.

So, here's the minimum set of variables you need to set in your local.conf:

----------------------------------------------------
TOOLCHAIN_VENDOR = "-none"
TOOLCHAIN_TYPE = "external"
TOOLCHAIN_BRAND = "csl"

TOOLCHAIN_PATH = "/opt/arm-2009q1"
# If you don't have toolchain in system PATH, then:
PATH_prepend = "${TOOLCHAIN_PATH}/bin:"
----------------------------------------------------

Since you also mentioned Arago, you could have looked at how I set CSL in 
there by default (in arago.conf and toolchain-csl.conf files)...


> good it worked for you. Would you please document the steps you took
> from the beginning to get it working ?
> and send it as reply to this email ? We would like to add this into
> the wiki or FAQs

Tom and I have explained it many times already. I guess it's still hard to 
collect all the relevant info from separate posts on the mailing list.
Probably I should bite the bullet and create the necessary Wiki entry... :)

-- 
Denys



> > ----Messaggio originale----
> > Da: Noor_Ahsan at mentor.com
> > Data: 22/02/2011 10.47
> > A: <openembedded-devel at lists.openembedded.org>
> > Ogg: Re: [oe] External toolchain
> >
> > Hello Luca,
> >
> > Probably you need to create symbolic links of arm-angstrom-linux-
> > gnueabi-gcc to arm-none-linux-gnueabi-gcc. OE assumes that the compiler name is arm-angstrom-linux-gnueabi-gcc. You can see the "CC" variable value by take environment of libtool-cross (using -e options) that how OE is creating the name of compiler.
> >
> > Regards,
> > Noor
> >
> > -----Original Message-----
> > From: openembedded-devel-bounces at lists.openembedded.org [mailto:openembedded-devel-bounces at lists.openembedded.org] On Behalf Of Luca Bolognini
> > Sent: Tuesday, February 22, 2011 2:16 PM
> > To: Open Embedded Mailing List
> > Subject: [oe] External toolchain
> >
> > Hi,
> > I would like to use an external toolchain (CodeSourcery2009q1) to
> > cross-compile some packages for my beagleboard (more or less the same
> > that happens in Arago) and then I expect not to download glibc package
> > and cross-compile again libc, libpthread and so on. I would like to use
> > the libraries inside my external CodeSourcery SDK.
> > I followed some
> > hints by Denys and Tom ( http://lists.linuxtogo.
> > org/pipermail/openembedded-devel/2010-April/019521.html ) and I put
> >
> > #
> > LUCA
> > TARGET_VENDOR = "-none"
> > TOOLCHAIN_TYPE ?= "external"
> >
> > TOOLCHAIN_BRAND ?= "csl"
> > TOOLCHAIN_PATH = "/opt/ti/codesourcery"
> >
> > TOOLCHAIN_SYSPATH = "${TOOLCHAIN_PATH}/arm-none-linux-gnueabi"
> >
> > PATH_prepend = "${TOOLCHAIN_PATH}/bin:"
> > require
> > conf/distro/include/toolchain-external.inc
> >
> > inside my
> > openembedded/conf/distro/angstrom-2008.1.conf
> >
> > As you know, cross-
> > compiler provided by CodeSoucery is arm-none-linux-gnueabi-gcc but I
> > get the following error with libtool-cross_2.2.6b.bb:
> > Build
> > Configuration:
> > BB_VERSION        = "1.8.19"
> > METADATA_BRANCH   =
> > "release-2010.12"
> > METADATA_REVISION = "dec3967"
> > TARGET_ARCH       =
> > "arm"
> > TARGET_OS         = "linux-gnueabi"
> > MACHINE           =
> > "beagleboard"
> > DISTRO            = "angstrom"
> > DISTRO_VERSION    =
> > "2010.7-test-20110221"
> > TARGET_FPU        = "hard"
> > [...]
> > | checking for
> > arm-angstrom-linux-gnueabi-gcc... arm-angstrom-linux-gnueabi-gcc -
> > march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-
> > interwork -mno-thumb
> > | checking whether the C compiler works... no
> > |
> > configure: error: in `/home/bolognini/diskp2/diskp2.4/pure-
> > oe/build/tmp/work/armv7a-angstrom-linux-gnueabi/libtool-cross-2.2.6b-
> > r27.1/libtool-2.2.6b':
> > | configure: error: C compiler cannot create
> > executables
> >
> > Obviously OE doesn't have to find arm-angstrom-linux-
> > gnueabi-gcc, but why does it search for arm-angstrom-linux-gnueabi-gcc
> > instead of arm-none-linux-gnueabi-gcc ?
> > What's wrong inside angstrom-
> > 2008.1.conf or what am I missing?
> >
> > Thank you for your support
> > Luca
> >
> >
> > Supera i limiti: raddoppia la velocit?? da 10 a 20 Mega!   Risparmia con Tutto Incluso: telefono + adsl 20 mega a soli 29,95 ??? al mese per due anni!  SCONTO DI 240 EURO!  http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso/?WT.mc_id=01fw
> >
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> >
> >
> >
> >
> >
> > Supera i limiti: raddoppia la velocit?? da 10 a 20 Mega!
> > Risparmia con Tutto Incluso: telefono + adsl 20 mega a soli 29,95 ??? al mese per due anni!
> > SCONTO DI 240 EURO!
> > http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso/?WT.mc_id=01fw
> >
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> >
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel


_______________________________________________
Openembedded-devel mailing list
Openembedded-devel at lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel





Supera i limiti: raddoppia la velocità da 10 a 20 Mega! 
Risparmia con Tutto Incluso: telefono + adsl 20 mega a soli 29,95 € al mese per due anni!
SCONTO DI 240 EURO!
http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso/?WT.mc_id=01fw




More information about the Openembedded-devel mailing list