Buildroot: Difference between revisions

From Linux/Xtensa
Jump to navigation Jump to search
(New page: This page describes the steps to build a toolchain and root file system for a specific processor configuration based on the latest release of Buildroot. == Getting Buildroot and other pr...)
 
No edit summary
Line 18: Line 18:


Finally, run <code>make</code> to build the toolchain and root file system. For more information about Buildroot, please also read the documents provided by Buildroot under http://buildroot.net/docs.html.
Finally, run <code>make</code> to build the toolchain and root file system. For more information about Buildroot, please also read the documents provided by Buildroot under http://buildroot.net/docs.html.
== Build Buildroot with Crosstool-NG ==
Using the Crosstool-NG toolchain allows to build a version of a Buildroot image based on GlibC instead of uClibc. In the current version, Buildroot cannot build Crosstool-NG for Xtensa directly, but can be configured to use it as an ''external'' toolchain. The first step is to build and install Crosstool-NG, so Buildroot can use it to compile the root file system. More information to build Crosstool-NG for Xtensa can be found under [[Crosstool-NG]]. Assuming Crosstool-NG is installed in 'ABSOLUTE_PATH_TO_XTOOLS', which is typically <code>$HOME/x-tools</code>, you can make the following additional configurations changes in Buildroot:
Toolchain  --->
  Toolchain type (External toolchain)
  Toolchain (Custom toolchain)
  Toolchain origin (Pre-installed toolchain)
  (ABSOLUTE_PATH_TO_XTOOLS) Toolchain path
  ($(ARCH)-unknown-linux-gnu) Toolchain prefix
  External toolchain C library (glibc/eglibc)

Revision as of 21:48, 18 March 2013

This page describes the steps to build a toolchain and root file system for a specific processor configuration based on the latest release of Buildroot.

Getting Buildroot and other prerequisites

  • Buildroot
    Download the latest release from http://buildroot.net/download.html or clone the development tree git clone git://git.buildroot.net/buildroot
  • Xtensa overlay file
    The overlay file includes patches for toolchain tools, such as compiler, assembler, and debugger, that are required to support a specific Xtensa processor configuration. Tensilica provides such an overlay as part of the processor download, however, it needs to be reformatted to match the specific format required by buildroot. For a script to convert the overlay file, and additional information, please go to Toolchain Overlay File. The current version of buildroot requires that the overlay file name has the format xtensa_<CORE_NAME>.tar, where CORE_NAME can be any user selected name.

Configuring and building Buildroot

The first step is to configure Buildroot make menuconfig. Select Xtensa, and for a custom configuration, provide a core name and absolute path to the directory containing the overlay file. The overlay file name must be xtensa_<CORE_NAME>.tar, where core name can be any user selected name.

Target Architecture (Xtensa)
Target Architecture Variant (Custom Xtensa processor configuration)
(PROCESSOR_NAME) Custom Xtensa processor configuration name
(ABSOLUTE_OVERLAY_PATH) Overlay directory for custom configuration

Finally, run make to build the toolchain and root file system. For more information about Buildroot, please also read the documents provided by Buildroot under http://buildroot.net/docs.html.

Build Buildroot with Crosstool-NG

Using the Crosstool-NG toolchain allows to build a version of a Buildroot image based on GlibC instead of uClibc. In the current version, Buildroot cannot build Crosstool-NG for Xtensa directly, but can be configured to use it as an external toolchain. The first step is to build and install Crosstool-NG, so Buildroot can use it to compile the root file system. More information to build Crosstool-NG for Xtensa can be found under Crosstool-NG. Assuming Crosstool-NG is installed in 'ABSOLUTE_PATH_TO_XTOOLS', which is typically $HOME/x-tools, you can make the following additional configurations changes in Buildroot:

Toolchain  --->
  Toolchain type (External toolchain)
  Toolchain (Custom toolchain)
  Toolchain origin (Pre-installed toolchain)
  (ABSOLUTE_PATH_TO_XTOOLS) Toolchain path
  ($(ARCH)-unknown-linux-gnu) Toolchain prefix
  External toolchain C library (glibc/eglibc)