ts-7000
[Top] [All Lists]

[ts-7000] How to make an EABI cross compiler for ts boards, step by step

To:
Subject: [ts-7000] How to make an EABI cross compiler for ts boards, step by step
From: "andy.shinsel" <>
Date: Fri, 07 Aug 2009 21:58:47 -0000


Doug and I have been developing a product on the ts-7390 for a while now here at work, and decided that it is time to start sharing some of our progress with the world.  This post will hopefully help those who are wanting to create their own cross compiler (specifically EABI) for linux.

  1. We opted to use crosstool-ng to build our compilers, so download crosstool-ng.
  2. Inside the crosstool-ng directory, run ./configure --local
    • Configure with the --local option so that you can run itright out of the crosstool-ng directory (otherwise, patches need to goin some /usr/local directory instead of the crosstool-ng directory)
  3. Download and install CVS (to retrieve newer versions of glibc).
    • On Ubuntu, run: sudo apt-get install cvs
  4. There are several patches that need to be applied to gcc to fix issues with the floating point processing, which will dramatically improve your floating point routines (most of these came from Martin Guy here.  If you download from his site, you will need to add a number to the start of each filename so that the patches get applied in a specific order).  There is also a bug in gcc 4.3.3 that will cause a segfault if you have classes over a certain size, so we have made a tar file of these patches, In the files section (arm-gcc433-patches.tar.bz2).  Extract this file inside your crosstool-ng folder.
  5. Now you need to set your build options, I will list all the changes we made from the default settings, or you can copy the file arm-gcc-ep9312-config (in the files section) to .config in your crosstool-ng directory.
    • Paths and Misc Options
      • Use obsolete features
      • Try features marked as EXPERIMENTAL
      • Number of parallel jobs - (set this to the number of cpu cores you have multiplied by two)
    • Target Options
      • Target Architecture: arm
      • Use EABI
      • Architecture level: armv4t
      • Floating point: software
    • Toolchain Options
      • Tuple's vendor string: we used ep9312, but you can use ts, or whatever you want, this will name your binaries arm-(blah)-linux-gnueabi-gcc and so forth.
    • Operating System
      • Target OS: linux
      • Linux kernel version: 2.6.21.7
    • binutils
      • binutils version 2.19.1
    • C Compiler
      • gcc version: 4.3.3
      • C++
    • C library
      • C library: glibc
      • glibc version: 2.9
  6. Now you should be all ready to build your cross-compiler!  run ./ct-ng build and enjoy.  Your compiler should be in the ~/x-tools/ folder.

A couple other notes from Doug:

inside the directory: arm-ts-linux-gnueabi/arm-ts-linux-gnueabi/sys-root

Isa basic sysroot containing all the libraries that were cross compiled.You can physically put this directory on the TS-7390 board wherever youwant to use these libraries if you want to skip getting debian orwhatever set up. (I put it on the root of the sd card's big partition)
You will have to modify usr/bin/ldd's first line to point to /bin/shinstead of the full compile path/bin/bash, though, for ldd to workcorrectly on the TS board.

Notsure yet, but I believe any packages you compile after this can use./configure --prefix=/path/to/cross/compiler/sys-root if you want thelibraries to instantly install in and work with your cross compiler. Inother words, it may be useful to keep your cross compiler directory'ssys-root directory and your board's root directory synchronized.



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU