URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [web_uploads/] [ToolChain-HOWTO] - Rev 1775
Go to most recent revision | Compare with Previous | Blame | View Log
To have a complete OpenRISC build toolchain follow this step.
We choose /usr/or32-uclinux as main ToolChain path because this is common
on any modern distro. It is important to follow steps in order.
Building GNU Binutils:
(*) Choose a working dir.
mkdir build-toolchain
cd build-toolchain
(*) Get official binutils from gnu.org.
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.16.1.tar.bz2
tar -xvjf binutils-2.16.1.tar.bz2
(*) Get OpenRISC patch and apply on it.
cd binutils-2.16.1
cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/binutils/binutils-2.16.1/binutils-2.16.1-unified.diff
patch -p1 < or1k/binutils/binutils-2.16.1/binutils-2.16.1-unified.diff
(*) Compile it.
mkdir build-or32-gnu-linux
cd build-or32-gnu-linux
../configure --prefix=/usr --target=or32-uclinux
make
(*) Final Install
make install
Install kernel headers:
(*) Grab from OC CVS only the needed headers.
cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/linux/linux-2.4/include/asm-or32
cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/linux/linux-2.4/include/asm-generic
cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/linux/linux-2.4/include/linux
(*) Install pools in the right path.
mkdir -p /usr/or32-uclinux/include/
mv or1k/linux/linux-2.4/include/asm-or32 /usr/or32-uclinux/include/asm
mv or1k/linux/linux-2.4/include/asm-generic /usr/or32-uclinux/include/asm-generic
mv or1k/linux/linux-2.4/include/linux /usr/or32-uclinux/include/linux
Now can compile GNU Gcc:
(*) Get official gcc from gnu.org.
wget ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.4.tar.bz2
tar -xvjf gcc-3.4.4.tar.bz2
(*) Get OpenRISC patch and apply on it.
cd gcc-3.4.4
cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/gcc/gcc-3.4.4/gcc-3.4.4-or32-unified.diff
patch -p1 < or1k/gcc/gcc-3.4.4/gcc-3.4.4-or32-unified.diff
(*) Compile it.
mkdir build-or32-gnu-linux
cd build-or32-gnu-linux
../configure --prefix=/usr --target=or32-uclinux
make
(*) Final Install
make install
Go to most recent revision | Compare with Previous | Blame | View Log