Project

General

Profile

Main » History » Version 16

Thomas Capricelli, 12/02/2009 07:26 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 9 Thomas Capricelli
h1. Get the code
29 3 Thomas Capricelli
30 13 Thomas Capricelli
There are four components:
31 3 Thomas Capricelli
* Zeta-binutils is a port of binutils to Zeta
32 1 Thomas Capricelli
* Zeta-gcc is a port of gcc to Zeta
33
* Zeta-linux is a port of the linux kernel to Zeta
34
* Zeta is the main repository, with specification, documentation, test cases and the emulator.
35
36 13 Thomas Capricelli
The last releases are available from the "file tab at the top of this page":/projects/zeta/files.
37
38
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
39
40 16 Thomas Capricelli
h1. Very quick start
41
42
You can download the kernel (vmlinux-0.x.raw) and the main tarball (zeta-0.x.tar.bz2), compile the emulator from the 'emulator' directory by doing :
43
<pre>
44
orzel@berlioz zeta%25 cd emulator
45
orzel@berlioz zeta/emulator%25 make
46
orzel@berlioz zeta/emulator%25 ./load_kernel <path to your vmlinux.raw>
47
</pre>
48
49
I'll let you find out from the quickstart how to use the gui emulator to do the same.
50
51
52 11 Thomas Capricelli
h1. Quickstart
53 1 Thomas Capricelli
54
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. 
55
56 12 Thomas Capricelli
What you need : 
57 13 Thomas Capricelli
* Zeta source code for the four components (see at the beginning of this page).
58 12 Thomas Capricelli
* 250 Mb of free space on you hard disk. 
59 13 Thomas Capricelli
* /opt/zeta writable by your user account.
60 12 Thomas Capricelli
61
(You can edit the top of zeta.binutils/Makefile and zeta.gcc/Makefile if you want to use something else than /opt/zeta)
62
63
From the Zeta repository, check your environment:
64 1 Thomas Capricelli
<pre>
65 12 Thomas Capricelli
orzel@berlioz zeta%25 make check
66
Host tools checked :
67
        genromfs :  genromfs 0.5.2
68
        gmake    :  GNU Make 3.81
69
        Binutils :  GNU ld (GNU Binutils) 2.20
70
        GCC      :  gcc (Gentoo 4.4.2 p1.0) 4.4.2 
71
(Everything seems ok)
72 1 Thomas Capricelli
</pre>
73
74 12 Thomas Capricelli
Install the binutils from your checkout of zeta.binutils
75 1 Thomas Capricelli
76
<pre>
77 12 Thomas Capricelli
orzel@berlioz zeta.binutils%25 make install
78 11 Thomas Capricelli
</pre>
79 1 Thomas Capricelli
80 12 Thomas Capricelli
That should end with something like
81 1 Thomas Capricelli
82
<pre>
83 12 Thomas Capricelli
...
84
gmake[4]: Leaving directory `/home/orzel/hg/zeta.binutils/build/libiberty/testsuite'
85
gmake[3]: Leaving directory `/home/orzel/hg/zeta.binutils/build/libiberty'
86
gmake[2]: Nothing to be done for `install-target'.
87
gmake[2]: Leaving directory `/home/orzel/hg/zeta.binutils/build'
88
gmake[1]: Leaving directory `/home/orzel/hg/zeta.binutils/build'
89
orzel@berlioz zeta.binutils%25
90 1 Thomas Capricelli
</pre>
91
92
93 12 Thomas Capricelli
Install gcc from your checkout of zeta.gcc
94
95 1 Thomas Capricelli
<pre>
96 12 Thomas Capricelli
orzel@berlioz zeta.gcc%25 make install
97 1 Thomas Capricelli
</pre>
98
99 12 Thomas Capricelli
That should end with something like
100
101 1 Thomas Capricelli
<pre>
102 12 Thomas Capricelli
...
103
gmake[4]: Leaving directory `/home/orzel/hg/zeta.gcc/build/zeta-unknown-linux/libgcc'
104
gmake[3]: Leaving directory `/home/orzel/hg/zeta.gcc/build/zeta-unknown-linux/libgcc'
105
gmake[2]: Leaving directory `/home/orzel/hg/zeta.gcc/build'
106
gmake[1]: Leaving directory `/home/orzel/hg/zeta.gcc/build'
107
orzel@berlioz zeta.gcc%25
108 1 Thomas Capricelli
</pre>
109
110 12 Thomas Capricelli
The next step is to check your toolchain. You do so by following the description on [[tests_zeta|global tests]].
111
112
We can now cross compile the zeta kernel, from your checkout of zeta.linux:
113
114 1 Thomas Capricelli
<pre>
115 12 Thomas Capricelli
orzel@berlioz zeta.linux%25 make oldconfig # just in case
116
orzel@berlioz zeta.linux%25 make clean     # just in case
117
orzel@berlioz zeta.linux%25 make
118
  (...)
119
  AS      .tmp_kallsyms2.o
120
  LD      vmlinux
121
  SYSMAP  System.map
122
  SYSMAP  .tmp_System.map
123
/opt/zeta/bin/zeta-unknown-linux-objcopy -O binary -R .note -R .comment -R .stab -R .stabstr -S vmlinux vmlinux.raw
124
orzel@berioz zeta.linux%25
125 1 Thomas Capricelli
</pre>
126 12 Thomas Capricelli
127
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:
128
<pre>
129
orzel@berlioz zeta%25 cd emulator
130
orzel@berlioz zeta/emulator%25 make
131
orzel@berlioz zeta/emulator%25 ./load_kernel ~/hg/zeta.linux/vmlinux.raw
132
133
        Zeta Emulator (C) Copyright 2000-2009 Thomas Capricelli
134
  /     \                                                      
135
 |  ***  |    Loading kernel  = /home/orzel/hg/zeta.linux/vmlinux.raw
136
 |    *  |    at 0x0, size = 1206002 = 0x1266f2                      
137
 |   *   |    Loading ramdisk = ../ramdisk.romfs                     
138
 |  *    |    at 0x200000, size = 0 = 0x0                            
139
 |  ***  |    Execution begins at 0x0                                
140
  \     /     Loading Symbols : ../linux/System.map                  
141
...
142
</pre>
143
 
144
145
If you have Qt-4 installed, you can use the Graphical user interface :
146
147
<pre>
148
orzel@berlioz zeta/emulator> cd gui
149
orzel@berlioz zeta/emulator/gui> qmake # be sure it is qmake from qt4
150
orzel@berlioz zeta/emulator/gui> make
151
orzel@berlioz zeta/emulator/gui> ./zeg ~/hg/zeta.linux &
152
</pre>
153
154
Then click on this icon to have the kernel booting : 
155
!Quickstart-zeg.png!
156 1 Thomas Capricelli
157 5 Thomas Capricelli
158 1 Thomas Capricelli
h1. Developer information
159
160
* [[FAQ]]
161 9 Thomas Capricelli
* Tests
162 2 Thomas Capricelli
** [[tests_zeta|global tests]] : tests the whole Zeta toolchain
163 5 Thomas Capricelli
** [[tests_binutils|binutils]] : binutils upstream tests on Zeta
164 2 Thomas Capricelli
** [[tests_gcc|gcc]] : gcc upstream tests on Zeta
165 9 Thomas Capricelli
** [[tests_platforms|host platforms]] : checks that Zeta can be compiled/used on different platforms
166 1 Thomas Capricelli
* [[release checklist]]
167 7 Thomas Capricelli
168
The handbook describes tests further.
169
170
h1. Licencing
171
172
The whole code of the Zeta project is released under the GNU General Public License version 2 (GPL). 
173
174
h1. Future goals, ideas
175
176 1 Thomas Capricelli
* use "t2-project":http://www.t2-project.org to create the first distribution ?
177
* there are lot of testing suites over there..
178
* even benchmarks, such as "nbench":http://www.tux.org/~mayer/linux/bmark.html
179
* documentation for tests in the handbook
180
* uclib
181
* busybox
182
* framebuffer
183
* qtopia
184
* opie, etc..