ts-7000
[Top] [All Lists]

[ts-7000] Re: Cross-compile EABI-MaverickCrunch GTK-DFB Aftermatch

To:
Subject: [ts-7000] Re: Cross-compile EABI-MaverickCrunch GTK-DFB Aftermatch
From: "dokapra" <>
Date: Tue, 25 Aug 2009 13:23:35 -0000
I made a log while installing sbox2. Here is a transcript:

# make a place for sbox2
su -
mkdir /opt/sbox2
chown <username> /opt/sbox2/
exit

# get the latest sbox
mkdir -p /opt/sbox2/install/sbox
cd /opt/sbox2/install/sbox
git clone git://anongit.freedesktop.org/git/sbox2

# make it
cd sbox2/
./autogen.sh 
mkdir /opt/sbox2/sb2
# and install it
make install prefix=/opt/sbox2/sb2

# get the latest qemu
cd /opt/sbox2/install/
svn co svn://svn.savannah.nongnu.org/qemu/trunk qemu
cd qemu
# prefix points to sbox installation dir
./configure --prefix=/opt/sbox2/sb2 --target-list=arm-linux-user
make && make install
I am using gcc-3.3.4-glibc-2.3.2 made through crosstool 0.43 , and it is in 
/opt/crosstool/gcc-3.3.4-glibc-2.3.2 

buildroot is my place for target binaries:

cd /opt/sbox2/
mkdir buildroot
cd buildroot/
cp -a 
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/{lib,etc,usr}
 .
cp -a 
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/include
 usr/
# ldconfig i ldd. Can be useful to have them on target
cp 
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/sbin/ldconfig
 sbin/
strip sbin/ldconfig
cp 
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/bin/ldd
 bin/

#Make sbox2 workspace. It will be called ts
export 
PATH=/opt/sbox2/sb2/bin:/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/:$PATH
sb2-init -m simple -c /opt/sbox2/sb2/bin/qemu-arm ts arm-9tdmi-linux-gnu-gcc

#You can control what directories map to host alternative to target by editing 
/opt/sbox2/sb2/share/scratchbox2/lua_scripts/pathmaps/simple/00_default.lua
Because of -m simple, you should edit simple_chain.rules in above file.
I have added:
{prefix = "/usr/share/classpath", map_to = target_root},
{prefix = "/usr/share/cacao", map_to = target_root},
to map given directories to target. This means that, while in sbox2 shell, 
those directories map to /opt/sbox2/buildroot/usr/share/classpath respective 
/opt/sbox2/buildroot/usr/share/classpath

#To start sbox2 shell:
/opt/sbox2/sb2/bin/sb2 -t ts
I set following vars:
#T_ROOT is target root path
export T_ROOT="/"
#B_ROOT is build root path
export B_ROOT=/opt/sbox2/buildroot
export CFLAGS="-mapcs-32 -fomit-frame-pointer -pipe -march=armv4 
-mtune=arm9tdmi -O2 -I$B_ROOT/include  -I$B_ROOT/include/ncurses"
export JAVAC=/usr/bin/native_ecj-3.4
unset JAVA_HOME
unset JDK_HOME
unset JAVACC_HOME

At this point everything is ready for compilation.
Example on how to compile zlib:

cd sources
apack -x /usr/portage/distfiles/zlib-1.2.3.tar.bz2 
cd zlib-1.2.3
make
make prefix=$B_ROOT install
strip $B_ROOT/lib/libz.so.1.2.3


--- In  "Dunge2" <> wrote:
>
> dokapra :
> Ok, I found out the current dir will be used for the rootfs, that's good. I 
> also found out you can simply put the full path to 
> "arm-ep9312-linux-gnueabi-gcc" and it pass. It then start to download libtool 
> and try to build it, and of course fail.
> 
> I check the config.log file and I see:
> arm-ep9312-linux-gnueabi-gcc: couldn't run 
> '/home/dunge/x-tools/arm-ep9312-linux-gnueabi/bin/arm-ep9312-linux-gnueabi-gcc--specs=/home/nib/sb2/share/scratchbox2/modeconf/gcc-specs.simple':
>  No suck file or directory
> 
> (of course it's missing a space before --specs, but why?)
> Then a few lines after:
> 
> qemu: unhandled CPU exception 0x9 - aborting
> followed by a register dump.
> 
> Did I do something wrong when I installed qemu? Is it not working for EABI?
> 
> --- In  "Dunge2" <dunge2@> wrote:
> >
> > dokapra :
> > I downloaded sb2, installed it. I'm trying to follow what is written in the 
> > readme, copied sys-root to $HOME/buildroot. When I call "sb2-init mytarget 
> > arm-ep9312-linux-gnueabi-gcc" it say "arm-ep9312-linux-gnueabi-gcc doesn't 
> > exist". Of course, it can't know the name.. where did I forget a step?
> >
>




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

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