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 900

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 899 mohor
# Edit arch/or32/Rules.make file:
40 864 simons
#   LIBGCC = /tmp/tools/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/libgcc.a
41
make oldconfig
42
make dep
43
make
44
cd ../../../
45
 
46
#
47 852 simons
# uClibc
48
#
49
 
50
cvs -z9 co or1k/uclibc
51
cd or1k/uclibc
52 887 simons
ln -s ./extra/Configs/Config.cross.or32.uclinux Config
53 852 simons
# Edit Config file:
54
#   TARGET_ARCH=or32
55
#   CROSS = $(TARGET_ARCH)-uclinux-
56
#   KERNEL_SOURCE=/tmp/tools/or1k/uclinux/uClinux-2.0.x/
57
#   DEVEL_PREFIX = /tmp/tools/$(TARGET_ARCH)-uclinux
58
make all install
59
cd ../../or32-uclinux/bin
60
rm -f addr2line ar as cc cpp gasp gcc ld nm objcopy objdump ranlib size strings strip jar grepjar
61
cd ../../
62
 
63
#
64
# Rebuild Gcc
65
#
66
cd or1k/gcc-ucl
67
../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++
68
make all install
69
cd ../../
70
 
71
#
72
# Applications
73
#
74
cvs -z9 co or1k/uclinux/userland/sash
75
cvs -z9 co or1k/uclinux/userland/init
76
cvs -z9 co or1k/uclinux/userland/route
77
cvs -z9 co or1k/uclinux/userland/ping
78
cd or1k/uclinux/userland/sash
79
make
80
cd ../init
81
make
82
cd ../route
83
make
84
cd ../ping
85
make
86
cd ../../../../
87
 
88
#
89
# Generating romfs ramdisk image
90
#
91
mkdir romfs
92
mkdir romfs/bin
93
cp  or1k/uclinux/userland/init/init romfs/bin/
94
cp  or1k/uclinux/userland/sash/sh romfs/bin/
95
cp  or1k/uclinux/userland/route/ifconfig romfs/bin/
96
cp  or1k/uclinux/userland/route/route romfs/bin/
97
cp  or1k/uclinux/userland/ping/ping romfs/bin/
98
chmod 777 romfs/bin/*
99
mkdir romfs/etc
100
cp  or1k/uclinux/userland/init/rc romfs/etc/
101
mkdir romfs/dev
102
cd romfs/dev
103 885 simons
mknod ram0 b 1 0
104
mknod tty c 4 0
105
mknod tty1 c 4 1
106
mknod ttyS0 c 4 64
107 852 simons
cd ..
108
genromfs -f ../or1k/uclinux/uClinux-2.0.x/arch/or32/board/initrd
109
cd ..
110
 
111
#
112
# Generating ext2 ramdisk image
113
#
114
mkdir ext2fs
115
mke2fs -m0 -r0 -O none /dev/ram0 512
116 900 mohor
mount /dev/ram0 ext2fs
117 852 simons
mkdir ext2fs/bin
118
cp  or1k/uclinux/userland/init/init ext2fs/bin/
119
cp  or1k/uclinux/userland/sash/sh ext2fs/bin/
120
cp  or1k/uclinux/userland/route/ifconfig ext2fs/bin/
121
cp  or1k/uclinux/userland/route/route ext2fs/bin/
122
cp  or1k/uclinux/userland/ping/ping ext2fs/bin/
123
chmod 777 ext2fs/bin/*
124
mkdir ext2fs/etc
125
cp  or1k/uclinux/userland/init/rc ext2fs/etc/
126
mkdir ext2fs/dev
127
cd ext2fs/dev
128 885 simons
mknod ram0 b 1 0
129
mknod tty c 4 0
130
mknod tty1 c 4 1
131
mknod ttyS0 c 4 64
132 852 simons
cd ../../
133
umount ext2fs
134
dd if=/dev/ram0 of=or1k/uclinux/uClinux-2.0.x/arch/or32/board/initrd
135
 
136
#
137
# Build or32 simulator
138
#
139 199 simons
 
140 852 simons
cvs -z9 co or1k/or1ksim
141
cd or1k/or1ksim
142
configure --target=or32-uclinux --prefix=/tmp/tools/or32-uclinux/
143
make all install
144
cd ../../
145 761 simons
 
146 852 simons
#
147
# Run uClinux on simulator
148
#
149
cd or1k/uclinux/uClinux-2.0.x/
150
# Open another two terminals in this folder. Type "less uart0.tx" with "F" option
151
# to monitor outoput from uart in first terminal and "cat > uart0.rx" to send
152
# chars to uart in the second.
153
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.