[Buildroot] rootfs building using external toolchain

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Mar 25 16:41:41 UTC 2009


Le Wed, 25 Mar 2009 11:09:46 +0100,
Hichem Boussetta <boussettahichem at yahoo.fr> a écrit :

> I am working now on a project where I am asked to generate toolchains 
> for various architectures and then build the rootfs for them.
> The problem is that I need to compile using both uclibc and glibc. 
> Therefore, I can't really use buildroot to generate the toolchains.
> So far, I decided to use crosstool-ng for the toolchain generation
> and then build the rootfs using buildroot. So, I would like to know
> if it is possible to use the external toolchains generated by
> crosstool-ng inside buildroot, and if it is, can someone show me
> briefly how can I do.

It is possible if your toolchain supports sysroot.

If so, in

 Toolchain
  -> Toolchain type

select « External binary toolchain ».

Then, make sure that the large file, IPv6, RPC, locale, WCHAR and C++
compiler/libstdc++ settings match the configuration of your toolchain.
What I mean is that these settings do *not* change anything in your
toolchain, but you must set them according to how your toolchain was
configured, so that the rest of Buildroot knows about your toolchain
configuration. Some time ago, I changed the naming of these entries to
make it clearer, but it got reverted.

Then, in « External toolchain path », but the path to where your
toolchain is installed. In the case of a crosstool-ng generated
toolchain, I used /usr/local/xtools/arm-unknown-linux-uclibcgnueabi/.

If your toolchain is based on uClibc, that should be sufficient. If
your toolchain is based on glibc, then you will need to adjust the
following settings :

 * The core C library from the external toolchain
 * Libraries to copy from the external toolchain

I remember having success using a glibc toolchain, but I haven't tried
that recently. Please let us know about your successes and failures.

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



More information about the buildroot mailing list