ts-7000
[Top] [All Lists]

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

To:
Subject: [ts-7000] Re: How to make an EABI cross compiler for ts boards, step by step
From: "Dunge2" <>
Date: Thu, 13 Aug 2009 20:29:34 -0000
--- In  "andy.shinsel" <> wrote:
>
> 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 <http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool> .
>     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)
>     * Download and install CVS (to retrieve newer versions of glibc).
> 
>     * On Ubuntu, run: sudo apt-get install cvs
>     * 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 <http://simplemachines.it/tools/> .  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.
>     * 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
>     * 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.
>

I tried on two different computer, one on Debian, the other on Ubuntu. After 
about 1h after I call ./ct-ng build, I get the same error:

[INFO ]  Installing C library headers
[ERROR]    make[2]: *** 
[/root/x-tools/arm-ep9312-linux-gnueabi/arm-ep9312-linux-gnueabi//sys-root/usr/include/gnu/lib-names.h]
 Error 1
[ERROR]    make[1]: *** [install-headers] Error 2
[ERROR]    Build failed in step 'Installing C library headers'
[ERROR]    Error happened in 
'/home/nib/myCross/crosstool-ng-1.4.2/scripts/functions' in function 
'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from 
'/home/nib/myCross/crosstool-ng-1.4.2/scripts/build/libc/glibc.sh' at line # 
185 in function 'do_libc_headers'
[ERROR]          called from 
'/home/nib/myCross/crosstool-ng-1.4.2/scripts/crosstool-NG.sh' at line # 497 in 
function 'main'
[ERROR]    Look at '/root/x-tools/arm-ep9312-linux-gnueabi/build.log' for more 
info on this error.
[ERROR]  (elapsed: 107:56.23)
[107:57] / make: *** [build] Error 2

build.log complain about lib-names.h "no such file"



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<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