Project

General

Profile

Main » History » Version 20

Thomas Capricelli, 12/02/2009 07:36 AM

1 4 Thomas Capricelli
!=Zeta_header.png!
2
3 9 Thomas Capricelli
{{toc}}
4 3 Thomas Capricelli
5
Zeta is the name of a virtual platform, or architecture.
6 1 Thomas Capricelli
7 10 Thomas Capricelli
!>screenshots.png!:/projects/zeta/wiki/screenshots
8 6 Thomas Capricelli
9 3 Thomas Capricelli
There are specifications (see the handbook), and a basic, not-yet-optimised emulator (cpu, ram, clock, mainboard). The architecture is simple, barely having the minimum needed to run linux with MMU.
10
11
The purpose is to play with the toolchain and the linux kernel, to learn more about those core technologies. Binutils and gcc are already ported at 80%25. (No static lib nor PIC code yet, userland compilation untested.) Using those tools (as "cross-compilers"), the real work can now begin : porting linux to Zeta. This is still work in progress. This kernel is called ZetaLinux.
12
13 1 Thomas Capricelli
Zeta is designed and written by "Thomas Capricelli":http://www.freehackers.org/thomas/free-software/
14 3 Thomas Capricelli
15 9 Thomas Capricelli
h1. Status
16 3 Thomas Capricelli
17 15 Thomas Capricelli
Zeta 0.7 was "released in late november 2009":/news/37. This release is based on:
18 3 Thomas Capricelli
19 6 Thomas Capricelli
Version of external tools used:
20 3 Thomas Capricelli
<pre>
21 14 Thomas Capricelli
binutils 2.20
22
gcc 4.4.0
23
linux kernel 2.6.32-rc8
24 3 Thomas Capricelli
</pre>
25 1 Thomas Capricelli
26 14 Thomas Capricelli
The whole toolchain was tested on i386 and amd64 host platforms. 
27 3 Thomas Capricelli
28 1 Thomas Capricelli
h1. Very quick start
29
30 20 Thomas Capricelli
You can download the kernel (vmlinux-zeta-0.x.raw) and the main tarball (zeta-0.x.tar.bz2) from the "file tab":/projects/zeta/files, compile the emulator from the 'emulator' directory by doing :
31 1 Thomas Capricelli
<pre>
32 19 Thomas Capricelli
orzel@berlioz zeta%25 make ramdisk.romfs
33 1 Thomas Capricelli
orzel@berlioz zeta%25 cd emulator
34
orzel@berlioz zeta/emulator%25 make
35 18 Thomas Capricelli
</pre>
36
37
And then start the kernel:
38
<pre>
39 20 Thomas Capricelli
orzel@berlioz zeta/emulator%25 ./load_kernel <path to your vmlinux-zeta-0.x.raw>
40 1 Thomas Capricelli
</pre>
41
42
I'll let you find out from the quickstart how to use the gui emulator to do the same.
43
44 17 Thomas Capricelli
45
h1. Get the code
46
47
There are four components:
48
* Zeta-binutils is a port of binutils to Zeta
49
* Zeta-gcc is a port of gcc to Zeta
50
* Zeta-linux is a port of the linux kernel to Zeta
51
* Zeta is the main repository, with specification, documentation, test cases and the emulator.
52
53
The last releases are available from the "file tab at the top of this page":/projects/zeta/files.
54
55
If you feel like using the bleeding edge development, you can also fetch the very latest code from our "source control":http://en.wikipedia.org/wiki/Distributed_revision_control. I use "mercurial":http://en.wikipedia.org/wiki/Mercurial ("homepage":http://mercurial.selenic.com/wiki) for this, and highly recommend it. The repositories are available from http://sources.freehackers.org
56 16 Thomas Capricelli
57 11 Thomas Capricelli
h1. Quickstart
58 1 Thomas Capricelli
59
We will describe here a kind of '''Zeta Demonstration'''. The aim is for you to have a zeta kernel booting on your computer starting from nothing. This is the quickstart for Zeta 0.7, it will probably not apply "as-is" to other versions. 
60
61 12 Thomas Capricelli
What you need : 
62 13 Thomas Capricelli
* Zeta source code for the four components (see at the beginning of this page).
63 12 Thomas Capricelli
* 250 Mb of free space on you hard disk. 
64 13 Thomas Capricelli
* /opt/zeta writable by your user account.
65 12 Thomas Capricelli
66
(You can edit the top of zeta.binutils/Makefile and zeta.gcc/Makefile if you want to use something else than /opt/zeta)
67
68
From the Zeta repository, check your environment:
69 1 Thomas Capricelli
<pre>
70 12 Thomas Capricelli
orzel@berlioz zeta%25 make check
71
Host tools checked :
72
        genromfs :  genromfs 0.5.2
73
        gmake    :  GNU Make 3.81
74
        Binutils :  GNU ld (GNU Binutils) 2.20
75
        GCC      :  gcc (Gentoo 4.4.2 p1.0) 4.4.2 
76
(Everything seems ok)
77 1 Thomas Capricelli
</pre>
78
79 12 Thomas Capricelli
Install the binutils from your checkout of zeta.binutils
80 1 Thomas Capricelli
81
<pre>
82 12 Thomas Capricelli
orzel@berlioz zeta.binutils%25 make install
83 11 Thomas Capricelli
</pre>
84 1 Thomas Capricelli
85 12 Thomas Capricelli
That should end with something like
86 1 Thomas Capricelli
87
<pre>
88 12 Thomas Capricelli
...
89
gmake[4]: Leaving directory `/home/orzel/hg/zeta.binutils/build/libiberty/testsuite'
90
gmake[3]: Leaving directory `/home/orzel/hg/zeta.binutils/build/libiberty'
91
gmake[2]: Nothing to be done for `install-target'.
92
gmake[2]: Leaving directory `/home/orzel/hg/zeta.binutils/build'
93
gmake[1]: Leaving directory `/home/orzel/hg/zeta.binutils/build'
94
orzel@berlioz zeta.binutils%25
95 1 Thomas Capricelli
</pre>
96
97
98 12 Thomas Capricelli
Install gcc from your checkout of zeta.gcc
99
100 1 Thomas Capricelli
<pre>
101 12 Thomas Capricelli
orzel@berlioz zeta.gcc%25 make install
102 1 Thomas Capricelli
</pre>
103
104 12 Thomas Capricelli
That should end with something like
105
106 1 Thomas Capricelli
<pre>
107 12 Thomas Capricelli
...
108
gmake[4]: Leaving directory `/home/orzel/hg/zeta.gcc/build/zeta-unknown-linux/libgcc'
109
gmake[3]: Leaving directory `/home/orzel/hg/zeta.gcc/build/zeta-unknown-linux/libgcc'
110
gmake[2]: Leaving directory `/home/orzel/hg/zeta.gcc/build'
111
gmake[1]: Leaving directory `/home/orzel/hg/zeta.gcc/build'
112
orzel@berlioz zeta.gcc%25
113 1 Thomas Capricelli
</pre>
114
115 12 Thomas Capricelli
The next step is to check your toolchain. You do so by following the description on [[tests_zeta|global tests]].
116
117
We can now cross compile the zeta kernel, from your checkout of zeta.linux:
118
119 1 Thomas Capricelli
<pre>
120 12 Thomas Capricelli
orzel@berlioz zeta.linux%25 make oldconfig # just in case
121
orzel@berlioz zeta.linux%25 make clean     # just in case
122
orzel@berlioz zeta.linux%25 make
123
  (...)
124
  AS      .tmp_kallsyms2.o
125
  LD      vmlinux
126
  SYSMAP  System.map
127
  SYSMAP  .tmp_System.map
128
/opt/zeta/bin/zeta-unknown-linux-objcopy -O binary -R .note -R .comment -R .stab -R .stabstr -S vmlinux vmlinux.raw
129
orzel@berioz zeta.linux%25
130 1 Thomas Capricelli
</pre>
131 12 Thomas Capricelli
132
Now we compile the emulator, from the main 'zeta' repository/checkout. You need to give the path to the 'vmlinux.raw' file in your zeta.linux checkout, which, on my computer is ~/hg/zeta.linux/vmlinux.raw:
133
<pre>
134
orzel@berlioz zeta%25 cd emulator
135
orzel@berlioz zeta/emulator%25 make
136
orzel@berlioz zeta/emulator%25 ./load_kernel ~/hg/zeta.linux/vmlinux.raw
137
138
        Zeta Emulator (C) Copyright 2000-2009 Thomas Capricelli
139
  /     \                                                      
140
 |  ***  |    Loading kernel  = /home/orzel/hg/zeta.linux/vmlinux.raw
141
 |    *  |    at 0x0, size = 1206002 = 0x1266f2                      
142
 |   *   |    Loading ramdisk = ../ramdisk.romfs                     
143
 |  *    |    at 0x200000, size = 0 = 0x0                            
144
 |  ***  |    Execution begins at 0x0                                
145
  \     /     Loading Symbols : ../linux/System.map                  
146
...
147
</pre>
148
 
149
150
If you have Qt-4 installed, you can use the Graphical user interface :
151
152
<pre>
153
orzel@berlioz zeta/emulator> cd gui
154
orzel@berlioz zeta/emulator/gui> qmake # be sure it is qmake from qt4
155
orzel@berlioz zeta/emulator/gui> make
156
orzel@berlioz zeta/emulator/gui> ./zeg ~/hg/zeta.linux &
157
</pre>
158
159
Then click on this icon to have the kernel booting : 
160
!Quickstart-zeg.png!
161 1 Thomas Capricelli
162 5 Thomas Capricelli
163 1 Thomas Capricelli
h1. Developer information
164
165
* [[FAQ]]
166 9 Thomas Capricelli
* Tests
167 2 Thomas Capricelli
** [[tests_zeta|global tests]] : tests the whole Zeta toolchain
168 5 Thomas Capricelli
** [[tests_binutils|binutils]] : binutils upstream tests on Zeta
169 2 Thomas Capricelli
** [[tests_gcc|gcc]] : gcc upstream tests on Zeta
170 9 Thomas Capricelli
** [[tests_platforms|host platforms]] : checks that Zeta can be compiled/used on different platforms
171 1 Thomas Capricelli
* [[release checklist]]
172 7 Thomas Capricelli
173
The handbook describes tests further.
174
175
h1. Licencing
176
177
The whole code of the Zeta project is released under the GNU General Public License version 2 (GPL). 
178
179
h1. Future goals, ideas
180
181 1 Thomas Capricelli
* use "t2-project":http://www.t2-project.org to create the first distribution ?
182
* there are lot of testing suites over there..
183
* even benchmarks, such as "nbench":http://www.tux.org/~mayer/linux/bmark.html
184
* documentation for tests in the handbook
185
* uclib
186
* busybox
187
* framebuffer
188
* qtopia
189
* opie, etc..