Simulator for MPC5200

Ficheux Pierre pierre.ficheux at openwide.fr
Mon Aug 6 08:35:14 UTC 2012


Le 06/08/2012 02:44, Binkowski, Cassio a écrit :
> Oh.
> About QEMU. I can see the CentOS VM already comes with the i386 target
> built.
> I'm wondering how to build the target ppc. I have searched for
> instructions but could not find any.
> Can anyone give me a help on this one?
>

Should be the same as i386, arm, etc. Here are 2 basic tutorials for 
i386, hope that helps. Of course you should build SDK first.

regards



-- 
Pierre FICHEUX -/- CTO OW/OWI, France -\- pierre.ficheux at openwide.fr
                                          http://ingenierie.openwide.fr
                                          http://www.ficheux.org
I would love to change the world, but they won't give me the source code


-------------- next part --------------
Building RTEMS 4.11 from Git (i386)
===================================

http://wiki.rtems.org/wiki/index.php/Git_Users
http://wiki.rtems.org/wiki/index.php/RTEMS_GIT_Repository

1- Clone Git reposiroty

$ git clone git://git.rtems.org/rtems.git rtems

2- Bootstrap

$ export PATH=/opt/rtems-4.11_i386/bin:$PATH

$ cd rtems
$ ./bootstrap

3- Configure, compile, install (without C++)

$ mkdir b-rtems; cd b-rtems
$ <PATH>/rtems/configure --target=i386-rtems4.11 --disable-cxx --enable-rtemsbsp=pc386 --prefix=<INSTALL_PATH>/target_i386
$ make
$ make install

Should be same with "--target=powerpc-rtems4.11 --enable-rtemsbsp=gen5200  --prefix=<INSTALL_PATH>/target_gen5200"

4- "Hello World" test avec QEMU (i386)

$ qemu -kernel <INSTALL_PATH>/target_i386/i386-rtems4.11/pc386/lib/rtems-4.11/tests/hello.exe
-------------- next part --------------
Building GCC SDK for RTEMS 4.1
==============================

Adapted from: http://www.rtems.com/wiki/index.php/Building_Tools

Binaries will be bnstalled on /opt/rtems-4.11_i386. Sould be the same with arm, powerpc, sparc, ... architectures.

Archives + patch are on <PATH> directory.

- Versions (from http://www.rtems.org/ftp/pub/rtems/SOURCES/4.11)

gcc/g++-4.6.3
binutils-2.22
gmp-4.3.2
mpc-0.8.1
mpfr-2.4.2
newlib-1.20.0
gdb-7.4.1

1- BINUTILS

$ tar xjvf <PATH>/binutils-2.22.tar.bz2 
$ cd binutils-2.22/
$ patch -p1 < <PATH>/binutils-2.22-rtems4.11-20120427.diff 
$ cd ..

$ mkdir b-binutils;  cd b-binutils
$ ../binutils-2.22/configure  --target=i386-rtems4.11 --prefix=/opt/rtems-4.11_i386
$ make; sudo make install
$ cd ..

2- GCC/G++ + NEWLIB

* GMP, MPC, MPFR

$ tar xjvf <PATH>/gmp-4.3.2.tar.bz2 
$ tar xzvf <PATH>/mpc-0.8.1.tar.gz
$ tar xjvf <PATH>/mpfr-2.4.2.tar.bz2 

* NEWLIB

$ tar xzvf <PATH>/newlib-1.20.0.tar.gz 
$ cd newlib-1.20.0/
$ patch -p1 < <PATH>/newlib-1.20.0-rtems4.11-20120419.diff 

* GCC/G++

$ tar xjvf <PATH>/gcc-core-4.6.3.tar.bz2 
$ tar xjvf <PATH>gcc-g++-4.6.3.tar.bz2 

$ cd gcc-4.6.3
$ ln -s ../newlib-1.20.0/newlib .
$ ln -s ../gmp-4.3.2 gmp
$ ln -s ../mpc-0.8.1 mpc
$ ln -s ../mpfr-2.4.2 mpfr

$ patch -p1 < <PATH>/gcc-core-4.6.3-rtems4.11-20120303.diff 
$ cd ..

$ mkdir b-gcc; cd ../b-gcc
$ ../gcc-4.6.3/configure  --target=i386-rtems4.11 --prefix=/opt/rtems-4.11_i386 --with-gnu-as --with-newlib --verbose --enable-threads --enable-languages="c,c++"
$ make; sudo make install
$ cd ..

3-  AUTOTOOLS

$ tar xzvf <PATH>/autoconf-2.69.tar.gz
$ mkdir b-autoconf; cd b-autoconf/
$ ../autoconf-2.69/configure --prefix=/opt/rtems-4.11_i386
$ make; sudo make install
$ cd ..

$ tar xzvf <PATH>/automake-1.12.2.tar.gz
$ mkdir b-automake
$ cd b-automake/
$ ../automake-1.12.2/configure --prefix=/opt/rtems-4.11_i386
$ make; sudo make install
$ cd ..

Add a  symlink:

# ln -s /opt/rtems-4.11_i386/share/aclocal /opt/rtems-4.11_i386/share/aclocal-1.12 

4- GDB

$ tar xjvf <PATH>/gdb-7.4.1.tar.bz2
$ cd gdb-7.4.1
$ patch -p1 < <PATH>/gdb-7.4.1-rtems4.11-20120429.diff
$ cd ..

$ mkdir b-gdb; cd b-gdb
$ ./gdb-7.4.1/configure --target=i386-rtems4.11 --prefix=/opt/rtems-4.11_i386 --disable-werror
$ make; sudo make install


More information about the users mailing list