[yocto] how does one use a prebuilt toolchain from the toolchain/ directory?

Zhang, Jessica jessica.zhang at intel.com
Mon Jul 2 13:18:08 PDT 2012


See my comments below...

-----Original Message-----
From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Manuel Bessler
Sent: Monday, July 02, 2012 1:02 PM
To: Yocto discussion list
Subject: Re: [yocto] how does one use a prebuilt toolchain from the toolchain/ directory?

I'm in a similar situation and have been wondering about the same questions Robert is raising...

I'd love to see others chime in with any insight they might have.

Thanks,
Manuel

On Tue, Jun 26, 2012 at 4:51 AM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
>   it sounds like a trivial question whose answer should be easy to
> find, but surprisingly, it isn't.  if a user wants to save all that
> toolchain-building time and take advantage of an existing toolchain,
> what to do?
>
>   the ADT user's guide *sort of* addresses that, but in a somewhat
> confusing way:
>
> http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html
>
>   first, the ADT guide, in section 2.1.2, talks about how to do this,
> but only after the more complicated and involved recipe for using the
> ADT installer.  this strikes me as backwards -- a set of alternatives
> would make sense going from simplest to most complicated.  using a
> prebuilt toolchain would seem to be the *first* thing that should be
> explained.
>
>   next, that section 2.1.2 in the ADT guide opens reasonably by
> explaining how to find and download the appropriate toolchain and
> then, for no apparent reason, takes this massive sidestep in a "Note"
> to ask the reader to consider using bitbake to build it instead.  um
> ... no.  in the midst of explaining something really simple, it's
> totally counter-productive to suddenly ask the reader to consider
> something noticeably more complex and unnecessary in the context of
> the current explanation.
>
>   finally, after the Note is over, the instructions return to point
> 3., correctly telling the reader to unload the tarball at the root
> directory, then vaguely referring to some "environment setup files"
> without explaining what to do with them or when to run them or what
> effect they'll have on the build process from then on. should one run
> the appropriate env setup file *before* invoking oe-init-build-env?
> after?  does it matter?
>
>   so to clarify this issue, here's a set of questions to which i know
> *some* of the answers and would like to know the rest.
>
> 1) i want to save buckets of time in my builds by using a pre-built
> toolchain appropriate for my architecture.  can i always use one of
> the toolchains at
> http://downloads.yoctoproject.org/releases/yocto/yocto-1.2/toolchain/?
> is there any downside to doing that?  if so, what?
>

[JZ] you can always use the pre-built toolchain from there.

> 2) do those pre-built toolchains always need to be installed under
> /opt/poky?  it seems pretty obvious that they do, given that the
> environment setup scripts hardcode references to /opt/poky.
>

[JZ] As you've found, yes, currently all the toolchains, either extracted from pre-built tar ball or through adt-installer will always go under /opt/poky.  For 1.3, there's a feature request to make toolchain reloadable.

> 3) can i install multiple toolchains at the same time?  it seems so --
> the common native content in the toolchains seems identical so i don't
> see any issue with having two or more toolchains installed at the same
> time.

[JZ] yes you can, actually the directory structure is designed that way.

>
> 4) once i install a toolchain, how do i use it?  say i install the arm
> toolchain, and want to build a beagleboard image.  at what point do i
> source the arm toolchain environment setup file?  is that all it
> takes?  will the bitbake build process automatically recognize what
> i've done and use that toolchain?

[JZ] Please note this toolchain is meant to be used by application developers not image builders.  This toolchain is meant for cross development that allows you to develop target application on your host machines.  Once you source the environment-setup script, it'll setup your path correctly that makes it able to find all the cross development tools, e.g. /opt/poky/1.2/sysroots/i686-pokysdk-linux/usr/bin/i586-poky-linux/i586-poky-linux-gcc will be used for compiling your programs.
>
>   and so on, and so on.  thoughts?
>
> rday
>
> --
>
> ======================================================================
> == Robert P. J. Day                                 Ottawa, Ontario,
> CANADA
>                         http://crashcourse.ca
>
> Twitter:
> http://twitter.com/rpjday
> LinkedIn:
> http://ca.linkedin.com/in/rpjday
> ======================================================================
> == _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list