Toolchain Overlay File: Difference between revisions
(→Conversion Script: Copy xtensa-xtregs.c instead of xtensa-regmap.c to gdbserver sources) |
No edit summary |
||
Line 14: | Line 14: | ||
This will create the file xtensa-overlay.tgz required by buildroot or crosstool-NG. For more information how to configure those generators, please see [[Buildroot]] or [[crosstool-NG]]. | This will create the file xtensa-overlay.tgz required by buildroot or crosstool-NG. For more information how to configure those generators, please see [[Buildroot]] or [[crosstool-NG]]. | ||
(Note that there is also a similar file under .../$XTENSA_CORE/xtensa-elf/src/linux/misc/linux-overlay.tar.gz. This file has a different layout structure and doesn't work with the script below) | |||
== Conversion Script == | == Conversion Script == | ||
Line 24: | Line 26: | ||
$TMPDIR/overlay/gdb/bfd $TMPDIR/overlay/gdb/gdb/regformats \ | $TMPDIR/overlay/gdb/bfd $TMPDIR/overlay/gdb/gdb/regformats \ | ||
$TMPDIR/overlay/gdb/gdb/gdbserver $TMPDIR/overlay/gdb/include | $TMPDIR/overlay/gdb/gdb/gdbserver $TMPDIR/overlay/gdb/include | ||
mv $TMPDIR | mv $TMPDIR/binutils/xtensa-config.h $TMPDIR/overlay/binutils/include | ||
mv $TMPDIR | mv $TMPDIR/binutils/xtensa-modules.c $TMPDIR/overlay/binutils/bfd | ||
mv $TMPDIR | mv $TMPDIR/gcc/xtensa-config.h $TMPDIR/overlay/gcc/include | ||
mv $TMPDIR | mv $TMPDIR/gdb/xtensa-config.c $TMPDIR/overlay/gdb/gdb | ||
mv $TMPDIR | mv $TMPDIR/gdb/xtensa-config.h $TMPDIR/overlay/gdb/include | ||
mv $TMPDIR | mv $TMPDIR/gdb/xtensa-modules.c $TMPDIR/overlay/gdb/bfd | ||
mv $TMPDIR | mv $TMPDIR/gdb/xtensa-xtregs.c $TMPDIR/overlay/gdb/gdb/gdbserver | ||
mv $TMPDIR | mv $TMPDIR/gdb/reg-xtensa.dat $TMPDIR/overlay/gdb/gdb/regformats | ||
tar czf xtensa-overlay.tgz -C $TMPDIR/overlay/ binutils gcc gdb | tar czf xtensa-overlay.tgz -C $TMPDIR/overlay/ binutils gcc gdb | ||
rm -fr $TMPDIR | rm -fr $TMPDIR | ||
== Example Files == | |||
The following files are the original and generated overlay file for the DC_D_233L processor. | |||
* http://www.linux-xtensa.org/pub/xtensa-config-overlay.tar.gz - Original overlay file provided by Tensilica | |||
* http://www.linux-xtensa.org/pub/xtensa-overlay.tgz - : Generated overlay file, applicable to buildroot and crosstool-NG |
Revision as of 05:58, 11 November 2013
Introduction
The Overlay is a tar file that includes modified versions of processor configuration dependent files that are required by various toolchain tools, such as binutils, gcc, and gdb. The overlay described here has a specific layout and is intended for toolchain generators, such as buildroot or crosstool-NG.
Creating the overlay
The overlay file shipped by Tensilica uses a flat directory structure, which is not suitable for buildroot or crosstool-NG at the moment. It is part of the generated processor package, and can be found in the XtDevTools directory:
XtDevTools/install/build/$VERSION/$XTENSA_CORE/src/xtensa-config-overlay.tar.gz
The following script converts the directory structure of that file by creating a new overlay file, called xtensa-overlay.tgz, and extracting the necessary files from the Tensilica overlay. Simply provide the path and name of the overlay provided by Tensilica when running the script:
./script xtensa-config-overlay.tar.gz
This will create the file xtensa-overlay.tgz required by buildroot or crosstool-NG. For more information how to configure those generators, please see Buildroot or crosstool-NG.
(Note that there is also a similar file under .../$XTENSA_CORE/xtensa-elf/src/linux/misc/linux-overlay.tar.gz. This file has a different layout structure and doesn't work with the script below)
Conversion Script
#!/bin/sh TMPDIR=`mktemp -d` tar xzf $1 -C $TMPDIR mkdir -p $TMPDIR/overlay/binutils/bfd $TMPDIR/overlay/binutils/ld \ $TMPDIR/overlay/binutils/include $TMPDIR/overlay/gcc/include \ $TMPDIR/overlay/gdb/bfd $TMPDIR/overlay/gdb/gdb/regformats \ $TMPDIR/overlay/gdb/gdb/gdbserver $TMPDIR/overlay/gdb/include mv $TMPDIR/binutils/xtensa-config.h $TMPDIR/overlay/binutils/include mv $TMPDIR/binutils/xtensa-modules.c $TMPDIR/overlay/binutils/bfd mv $TMPDIR/gcc/xtensa-config.h $TMPDIR/overlay/gcc/include mv $TMPDIR/gdb/xtensa-config.c $TMPDIR/overlay/gdb/gdb mv $TMPDIR/gdb/xtensa-config.h $TMPDIR/overlay/gdb/include mv $TMPDIR/gdb/xtensa-modules.c $TMPDIR/overlay/gdb/bfd mv $TMPDIR/gdb/xtensa-xtregs.c $TMPDIR/overlay/gdb/gdb/gdbserver mv $TMPDIR/gdb/reg-xtensa.dat $TMPDIR/overlay/gdb/gdb/regformats tar czf xtensa-overlay.tgz -C $TMPDIR/overlay/ binutils gcc gdb rm -fr $TMPDIR
Example Files
The following files are the original and generated overlay file for the DC_D_233L processor.
- http://www.linux-xtensa.org/pub/xtensa-config-overlay.tar.gz - Original overlay file provided by Tensilica
- http://www.linux-xtensa.org/pub/xtensa-overlay.tgz - : Generated overlay file, applicable to buildroot and crosstool-NG