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

Subversion Repositories or1k

[/] [or1k/] [tags/] [before_ORP/] [uclinux/] [uClinux-2.0.x/] [README.or32] - Blame information for rev 885

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

Line No. Rev Author Line
1 199 simons
 
2 852 simons
# To build toochain follow these steps
3 199 simons
 
4 852 simons
mkdir /tmp/tools
5
cd /tmp/tools
6
mkdir or32-uclinux
7
export PATH=/tmp/tools/or32-uclinux/bin:$PATH
8
 
9
#
10
# Binutils:
11
#
12
 
13
cvs -z9 co or1k/binutils
14
cd or1k
15
mkdir binutils-ucl
16
cd binutils-ucl
17
../binutils/configure --target=or32-uclinux --prefix=/tmp/tools/or32-uclinux
18
make all install
19
cd ../../
20
 
21
#
22
# Gcc
23
#
24
 
25
cvs -z9 co or1k/gcc-3.1
26
cd or1k
27
mkdir gcc-ucl
28
cd gcc-ucl
29
../gcc-3.1/configure --target=or32-uclinux --prefix=/tmp/tools/or32-uclinux/ --local-prefix=/tmp/tools/or32-uclinux/or32-uclinux/ --with-gnu-as --with-gnu-ld --verbose --enable-languages=c
30
make all install
31
cd ../../
32
 
33
#
34 864 simons
# Building uClinux
35
#
36
 
37
cvs -z9 co or1k/uclinux/uClinux-2.0.x/
38
cd or1k/uclinux/uClinux-2.0.x/
39
# Edit arch/or32/Roules.mk file:
40
#   LIBGCC = /tmp/tools/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/libgcc.a
41
cd or1k/uclinux/uClinux-2.0.x/
42
make oldconfig
43
make dep
44
make
45
cd ../../../
46
 
47
#
48 852 simons
# uClibc
49
#
50
 
51
cvs -z9 co or1k/uclibc
52
cd or1k/uclibc
53
ls -s ./extra/Configs/Config.cross.or32.uclinux Config
54
# Edit Config file:
55
#   TARGET_ARCH=or32
56
#   CROSS = $(TARGET_ARCH)-uclinux-
57
#   KERNEL_SOURCE=/tmp/tools/or1k/uclinux/uClinux-2.0.x/
58
#   DEVEL_PREFIX = /tmp/tools/$(TARGET_ARCH)-uclinux
59
make all install
60
cd ../../or32-uclinux/bin
61
rm -f addr2line ar as cc cpp gasp gcc ld nm objcopy objdump ranlib size strings strip jar grepjar
62
cd ../../
63
 
64
#
65
# Rebuild Gcc
66
#
67
cd or1k/gcc-ucl
68
../gcc-3.1/configure --target=or32-uclinux --prefix=/tmp/tools/or32-uclinux/ --local-prefix=/tmp/tools/or32-uclinux/or32-uclinux/ --with-gnu-as --with-gnu-ld --verbose --enable-languages=c,c++
69
make all install
70
cd ../../
71
 
72
#
73
# Applications
74
#
75
cvs -z9 co or1k/uclinux/userland/sash
76
cvs -z9 co or1k/uclinux/userland/init
77
cvs -z9 co or1k/uclinux/userland/route
78
cvs -z9 co or1k/uclinux/userland/ping
79
cd or1k/uclinux/userland/sash
80
make
81
cd ../init
82
make
83
cd ../route
84
make
85
cd ../ping
86
make
87
cd ../../../../
88
 
89
#
90
# Generating romfs ramdisk image
91
#
92
mkdir romfs
93
mkdir romfs/bin
94
cp  or1k/uclinux/userland/init/init romfs/bin/
95
cp  or1k/uclinux/userland/sash/sh romfs/bin/
96
cp  or1k/uclinux/userland/route/ifconfig romfs/bin/
97
cp  or1k/uclinux/userland/route/route romfs/bin/
98
cp  or1k/uclinux/userland/ping/ping romfs/bin/
99
chmod 777 romfs/bin/*
100
mkdir romfs/etc
101
cp  or1k/uclinux/userland/init/rc romfs/etc/
102
mkdir romfs/dev
103
cd romfs/dev
104 885 simons
mknod ram0 b 1 0
105
mknod tty c 4 0
106
mknod tty1 c 4 1
107
mknod ttyS0 c 4 64
108 852 simons
cd ..
109
genromfs -f ../or1k/uclinux/uClinux-2.0.x/arch/or32/board/initrd
110
cd ..
111
 
112
#
113
# Generating ext2 ramdisk image
114
#
115
mkdir ext2fs
116
mke2fs -m0 -r0 -O none /dev/ram0 512
117
mount /dve/ram0/ ext2fs
118
mkdir ext2fs/bin
119
cp  or1k/uclinux/userland/init/init ext2fs/bin/
120
cp  or1k/uclinux/userland/sash/sh ext2fs/bin/
121
cp  or1k/uclinux/userland/route/ifconfig ext2fs/bin/
122
cp  or1k/uclinux/userland/route/route ext2fs/bin/
123
cp  or1k/uclinux/userland/ping/ping ext2fs/bin/
124
chmod 777 ext2fs/bin/*
125
mkdir ext2fs/etc
126
cp  or1k/uclinux/userland/init/rc ext2fs/etc/
127
mkdir ext2fs/dev
128
cd ext2fs/dev
129 885 simons
mknod ram0 b 1 0
130
mknod tty c 4 0
131
mknod tty1 c 4 1
132
mknod ttyS0 c 4 64
133 852 simons
cd ../../
134
umount ext2fs
135
dd if=/dev/ram0 of=or1k/uclinux/uClinux-2.0.x/arch/or32/board/initrd
136
 
137
#
138
# Build or32 simulator
139
#
140 199 simons
 
141 852 simons
cvs -z9 co or1k/or1ksim
142
cd or1k/or1ksim
143
configure --target=or32-uclinux --prefix=/tmp/tools/or32-uclinux/
144
make all install
145
cd ../../
146 761 simons
 
147 852 simons
#
148
# Run uClinux on simulator
149
#
150
cd or1k/uclinux/uClinux-2.0.x/
151
# Open another two terminals in this folder. Type "less uart0.tx" with "F" option
152
# to monitor outoput from uart in first terminal and "cat > uart0.rx" to send
153
# chars to uart in the second.
154
or32-uclinux-sim -f sim.cfg linux

powered by: WebSVN 2.1.0

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