OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [web_uploads/] [ToolChain-HOWTO] - Blame information for rev 1770

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1765 root
 
2
     To have a complete OpenRISC build toolchain follow this step.
3
We choose /usr/or32-uclinux as main ToolChain path because this is common
4
on any modern distro. It is important to follow steps in order.
5
 
6
 
7
Building GNU Binutils:
8
 
9
(*) Choose a working dir.
10
 
11
        mkdir build-toolchain
12
        cd build-toolchain
13
 
14
(*) Get official binutils from gnu.org.
15
 
16
        wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.16.1.tar.bz2
17
        tar -xvjf binutils-2.16.1.tar.bz2
18
 
19
(*) Get OpenRISC patch and apply on it.
20
 
21
        cd binutils-2.16.1
22
        cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/binutils/binutils-2.16.1/binutils-2.16.1-unified.diff
23
        patch -p1 < or1k/binutils/binutils-2.16.1/binutils-2.16.1-unified.diff
24
 
25
(*) Compile it.
26
 
27
        mkdir build-or32-gnu-linux
28
        cd build-or32-gnu-linux
29
        ../configure  --prefix=/usr --target=or32-uclinux
30
        make
31
 
32
(*) Final Install
33
        make install
34
 
35
 
36
Install kernel headers:
37
 
38
(*) Grab from OC CVS only the needed headers.
39
 
40
        cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/linux/linux-2.4/include/asm-or32
41
        cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/linux/linux-2.4/include/asm-generic
42
        cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co or1k/linux/linux-2.4/include/linux
43
 
44
(*) Install pools in the right path.
45
 
46
        mkdir -p /usr/or32-uclinux/include/
47
        mv or1k/linux/linux-2.4/include/asm-or32 /usr/or32-uclinux/include/asm
48
        mv or1k/linux/linux-2.4/include/asm-generic /usr/or32-uclinux/include/asm-generic
49
        mv or1k/linux/linux-2.4/include/linux /usr/or32-uclinux/include/linux
50
 
51
 
52
Now can compile GNU Gcc:
53
 
54
(*) Get official gcc from gnu.org.
55
 
56
        wget ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.4.tar.bz2
57
        tar -xvjf gcc-3.4.4.tar.bz2
58
 
59
(*) Get OpenRISC patch and apply on it.
60
 
61
        cd gcc-3.4.4
62
        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
63
        patch -p1 < or1k/gcc/gcc-3.4.4/gcc-3.4.4-or32-unified.diff
64
 
65
(*) Compile it.
66
 
67
        mkdir build-or32-gnu-linux
68
        cd build-or32-gnu-linux
69
        ../configure  --prefix=/usr --target=or32-uclinux
70
        make
71
 
72
(*) Final Install
73
        make install

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.