Project

General

Profile

Main » History » Version 18

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