Toolchain and Embedded Distributions: Difference between revisions

From Linux/Xtensa
Jump to navigation Jump to search
m (Typo fixes)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Introduction ==
== [[Toolchain Overlay File]] ==


For many embedded applications, the requirements for the processor deviate from those in development workstations. The chosen processor architecture, therefore, usually differs and requires ''cross'' development tools to compile the target applications on the workstation. Generating the cross development tools and a suitable environment is certainly not an easy venture. Several projects have, therefore, materialized over time to alleviate the process.
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 the 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]]
 
Note that except for [[Buildroot_Build_Instructions]], most embedded distributions listed below don't currently support the Xtensa architecture and require modifications. Patches for various versions of the toolchain sources can be found under http://www.linux-xtensa.org/pub/patches/.


== Start from scratch with FSF/OSS sources ==
== Start from scratch with FSF/OSS sources ==


Starting from sources is certainly the most challenging approach. It usually requires additional patches and sometimes matching versions of 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 patched for a specific Xtensa processor configuration. The ''overlay'' mentioned above includes a necessary set of configuration files together with information explaining the process to patch the toolchain sources.
 
== [http://www.linuxfromscratch.org LinuxFromScratch] ==
 
This project is docomprises several projects intended to help building a Linux system from sources. The main project resembles a book that describes the build-process in great detail.  
 
== [[XLIDE|Xtensa Linux Development Environment]] ==
 
The Xtensa Linux Development Environment (''XLIDE'') is a very simple perl script to build the cross development tools specific for Xtensa.
 
== [http://kegel.com/crosstool CrossTool] ==
 
CrossTool (http://kegel.com/crosstool/") was developed by Dan Kegel originally to test different versions of the toolchain in various combinations for cross-compilation. It consists of a set of scripts and configuration files.  


== [http://www.buildroot.uclibc.org BuildRoot] ==
'''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.


Buildroot is a set of Makefiles and patches that makes it easy generate a cross-compilation toolchain and root filesystem for your target Linux system using the uClibc C library.
== [http://crosstool-ng.org/ crosstool-NG] <small>([[crosstool-NG|build instructions for Xtensa]])</small> ==


For build instructions specific to getting a Linux kernel running on the Xtensa architecture on the LX60 board, see [[Buildroot_Build_Instructions]].
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. Starting with release 1.22.0 the mainline crosstool-NG repository includes support for Xtensa. 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 [[crosstool-NG|here]].


== [http://openembedded.org OpenEmbedded] ==
== [http://www.buildroot.org BuildRoot] <small>([[Buildroot|build instructions for Xtensa]])</small> ==


OpenEmbedded (http://openembedded.org) provided a development environment for embedded systems.  
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]].


== [http://emdebian.org emDebian] ==
== [http://www.openadk.org OpenADK] ==


Based on the [http://www.debian.org debian] distribution, emDebian (http://emdebian.org) is a project to provide a special version of Debian taylored for embedded devices.
OpenADK 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, including support for specific processor configuration using the [[Toolchain Overlay File]]. At the moment only Qemu emulation (dc232b,dc233c) targets are available. New configurations can be simply added.

Latest revision as of 20:39, 16 May 2017

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 the 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 patched for a specific Xtensa processor configuration. The overlay mentioned 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. Starting with release 1.22.0 the mainline crosstool-NG repository includes support for Xtensa. 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.

OpenADK

OpenADK 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, including support for specific processor configuration using the Toolchain Overlay File. At the moment only Qemu emulation (dc232b,dc233c) targets are available. New configurations can be simply added.