Preambule
This HOWTO is OK with
gcc v4.4.4
Make sure the
mpc555.ld
file you use sets the following variables :
SDA2_BASE_ = .;
just before *(.sdata2) section and
SDA_BASE_ = . ;
just before *(.sdata) section
Make sure these tools are installed on your system :
bison, flex, m4, makeinfo (texinfo package), mpfr (libmpfr-dev package)
Packages to retrieve
Prepare the generation
- Check that on your host a gcc compiler is installed
- Set sh as shell (important to build gcc)
- Set these variables :
- Work directory : export CROSS_PRJ=$HOME/MyDirectoryForMPC555
- Directory where cross compiler tools will be installed : export PREFIX=$CROSS_PRJ/tools
- Set PATH variable : export PATH=${PREFIX}/bin:${PATH}
Package binutils
cd $CROSS_PRJ
tar xvfz /DIRECTORYXX/binutils-2.20.1.tar.gz
mkdir build-binutils
cd build-binutils
CC=gcc
../binutils-2.20.1/configure --target=powerpc-linux
--prefix=$PREFIX
--with-newlib
--disable-werror
make all
make install
Package GCC
cd $CROSS_PRJ
tar xvfz /DIRECTORYXXX/gcc-4.4.4.tar.gz
mkdir build-gcc
cd build-gcc
../gcc-4.4.4/configure --target=powerpc-linux
--prefix=$PREFIX
--with-newlib
--without-headers
--enable-languages=c
make all-gcc
make install-gcc
Package newlib
cd $CROSS_PRJ
tar xvfz /DIRECTORYXXX/newlib-1.18.0.tar.gz
mkdir build-newlib
cd build-newlib
../newlib-1.18.0/configure --target=powerpc-linux
--prefix=$PREFIX
make all
make install
May be you will get an error because of makeinfo command.
To correct that, check where is your makeinfo command, edit Makefile and change line containing MAKEINFO = path-to-build-newlib/missing makeinfo
Test the crosscompiler
A way to check the powerpc-linux-gcc croscompiler is to launch :
powerpc-linux-gcc --version
And check that the result is : 4.4.4
Retrieved from
https://gforge.inria.fr/plugins/mediawiki/wiki/cycabhdk/index.php/HowToGenerateMpcCrossCompilerToolsNew
--
SorayaArias - 06 Dec 2012