Project

General

Profile

Main » History » Version 14

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