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: "Doug" <>
Date: Sat, 15 Aug 2009 19:39:39 -0000
--- In  "Dunge2" <> wrote:
>
> Well first, I want to tell to Doug and Zimmerman that you CAN'T use apt-get 
> to get libs from debian and then copy them over. Libs from TS rootfs, libs 
> from debian-armel and libs from the crosstool-ng created toolchain all uses 
> different gcc and glibc version and DON'T match.

Hi Dunge, that's what I was saying in my response to Zimmerman -- it will work 
if he makes a toolchain with the same glibc and ABI that his rootfs has. I know 
because I've done that on a TS-7260 before.

> I wonder how you managed to build Qt this way, unless it don't have any 
> dependencies?

Qt has no dependencies, although you need tslib to use the TS-7390's touch 
screen. When I built tslib and Qt, I started from scratch totally ditching any 
provided libraries from the TS board and using the sysrooted glibc from my 
toolchain instead.

> As for using Qt, I can't do it because our application is already final using 
> GTK+. I won't recode everything under another lib. Plus, my coworker is 
> telling my Qt isn't free, but he can be wrong. Anyway, I think GTK+ can get 
> usable using eabi/crunch and even faster using the DirectFB backend, so it's 
> not a big problem, what is is getting it to run.

Qt allows an LGPL license as of version 4.5, so you can use it in commercial 
products if you abide by the terms of the LGPL license, and you don't have to 
pay Nokia a dime. Smart move in my opinion. What your coworker said was true of 
the previous versions which were GPL. I'm not trying to convince you to change, 
I just wanted to clear that up for future reference. :)

> Now Doug, about building libs. You are telling me I should add "-mcpu=ep9312 
> -mfpu=maverick -mfloat-abi=softfp" to every config libs?  I though the 
> cross-compile patchs were supposed to do that without specifying it. Also, 
> the TS-TPC-7390 use a ep9302 cpu, not ep9312. Any problem with that?

Yes that is what I am saying. At Martin Guy's page 
(http://martinwguy.co.uk/martin/crunch/) he states that you always have to use 
those options when compiling. The patches just fix lots of bugs in gcc's code 
that generates instructions for the MaverickCrunch. You still have to use those 
CFLAGS when compiling the packages.

I know it uses an ep9302, but from what I understand, "ep9312" is the correct 
gcc -mcpu choice for the ep93xx family of CPUs.

> Thx for the clue about DESTDIR instead of --prefix. But why do you say to put 
> them in ./_install instead of directly in the /x-tools?

It's a matter of personal preference. By doing it in _install I have a record 
of exactly what it's adding, and where it's putting it.

> As for the LFS book, you are talking about this? :
> http://cross-lfs.org/view/clfs-embedded/arm/
> I seriously don't find anything useful in there. Most of the libs they 
> explain how to build are all already built by crosstool-ng. The rest seems to 
> be simple utilities like zLib that I probably don't care about. Nothing about 
> glib or cairo or gtk+ for sure.

zlib is actually a fairly common dependency in my experience, but that's beside 
the point. I personally use the regular LFS and BLFS to get an idea of the 
standard options for compiling a package, and then add --host or whatever to 
get it cross compiled.

> Anyway, what is needed to have a rootfs? I don't want to have to do every 
> network and io and everything system-based by myself. Seems a bit too far 
> advanced. That's why I though about using the TS-provided rootfs for these 
> things, which I don't think onto when I build my application so it shouldn't 
> have libc incompatibilities? I only link against the libs I mentioned 
> earlier, which I will compile myself.

If you don't want to have to do all of that yourself then it might be wise to 
stick with the debian EABI rootfs and create a matching cross toolchain for 
that, then re-compile only the libs you want to add floating point support to. 
Otherwise you will have to compile everything from scratch.

> Also, what do you guys think about uClibc? Only more problems and 
> incompatibility and patches? That's what I think, without having tried it.

Never tried it...I decided to stick with glibc just so I'd be sure everything 
would be compatible. YMMV. Maybe others will have more to say on this.

> With that said, let's try a step-by-step clean build of GLIB which shouldn't 
> depend on anything.
> 
> 1-Download and extract glib-2.20.4.tar.bz2
> 2-Set PATH, PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR. Set CFLAGS to 
> "-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp"
> 3-Call "./configure --host=arm-ep9312-linux-gnueabi --prefix=/usr/"
> 
> At this point I receive this error:
> configure:27279: checking for growing stack pointer
> configure:27286: error: in `/home/dunge/Desktop/build_lib/glib-2.20.4':
> configure:27289: error: cannot run test program while cross compiling
> 
> 4-Search google, find some obscure post that might help.
> 5-Create a config.cache file with this in it:
> glib_cv_stack_grows=no
> glib_cv_uscore=no
> ac_cv_func_posix_getgrgid_r=yes
> ac_cv_func_posix_getpwuid_r=yes
> 
> 6-Retry "./configure --host=arm-ep9312-linux-gnueabi 
> --cache-file=config.cache --prefix=/usr/". It PASS!!
> 7-Call Make. IT PASS!! Really!
> 8-Call "Make 
> DESTDIR=/home/dunge/x-tools/arm-ep9312-linux-gnueabi/arm-ep9312-linux-gnueabi/sys-root/
>  install"
> 
> 9-CELEBRATE! It works. I did nearly the same thing yesterday and it didn't 
> pass, but trying it while writing this guide actually worked. I guess it's 
> the DESTDIR change.

That's basically the kind of stuff you'll have to go through with some of the 
packages that aren't so cross compilation friendly. Congrats on getting it to 
compile :)



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

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