Toolchain and Embedded Distributions: Difference between revisions

From Linux/Xtensa
Jump to navigation Jump to search
(Add a warning on running cross compilation on 64bit hosts)
Line 6: Line 6:


Creating a toolchain and bootable root file system starting from sources is certainly the most challenging approach. It usually requires additional patches and sometimes matching versions of sources. While support for Xtensa is integrated in most toolchain tools, they must be patches for a specific Xtensa processor configuration. The ''overlay'' metioned above includes a necessary set of configuration files together with information explaining the process to patch the toolchain sources.
Creating a toolchain and bootable root file system starting from sources is certainly the most challenging approach. It usually requires additional patches and sometimes matching versions of sources. While support for Xtensa is integrated in most toolchain tools, they must be patches for a specific Xtensa processor configuration. The ''overlay'' metioned above includes a necessary set of configuration files together with information explaining the process to patch the toolchain sources.
'''Warning:''' cross compilers running on 64bit hosts are known to produce broken code. For some more details see the [http://lists.linux-xtensa.org/pipermail/linux-xtensa/Week-of-Mon-20130715/001140.html explanation] of Chris Zankel.


== [http://crosstool-ng.org/ crosstool-NG] <small>([[crosstool-NG|build instructions for Xtensa]])</small> ==
== [http://crosstool-ng.org/ crosstool-NG] <small>([[crosstool-NG|build instructions for Xtensa]])</small> ==

Revision as of 09:29, 17 July 2013

Toolchain Overlay File

Because Xtensa is a configurable and extensible processor architecture that allows to define additional registers and instructions, the toolchain is the main software component that usually needs to be adapted for a specific Xtensa processor configuration. Tensilica provides a small set of configuration files in form of an overlay that replace the versions in the toolchain sources. The Toolchain Overlay File is a version of that overlay provided by Tensilica with a specific format required for crosstool-NG and buildroot. A script to convert the overlay provided by Tensilica can be found under Toolchain Overlay File

Start from scratch with FSF/OSS sources

Creating a toolchain and bootable root file system starting from sources is certainly the most challenging approach. It usually requires additional patches and sometimes matching versions of sources. While support for Xtensa is integrated in most toolchain tools, they must be patches for a specific Xtensa processor configuration. The overlay metioned above includes a necessary set of configuration files together with information explaining the process to patch the toolchain sources.

Warning: cross compilers running on 64bit hosts are known to produce broken code. For some more details see the explanation of Chris Zankel.

crosstool-NG (build instructions for Xtensa)

crosstool-NG (http://crosstool-ng.org/) provides a system to build a complete toolchain. It supports various C-libraries (Multilib, uClibc, glibc, and eglibc), but can also be used to build a 'bare' toolchain. The current version does not yet support Xtensa as a target, but a development version can be retrieved from the local GIT repositories. The process of patching the toolchain and other architecture specific software is fully automated using the Toolchain Overlay File. More information for building a toolchain for Xtensa using crosstool-NG can be found here.

BuildRoot (build instructions for Xtensa)

Buildroot is a set of Makefiles and patches that makes it easy to generate a cross-compilation toolchain and root file system for your target Linux system. The Xtensa architecture is fully supported in the official tree, including support for specific processor configuration using the Toolchain Overlay File. For build instructions, see Buildroot.