Zeta is the name of a virtual platform, or architecture.
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.
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.
Zeta is designed and written by Thomas Capricelli
Zeta 0.6 was released in july 2007. The toolchain and the kernel were updated to latest version, and the handbook has been improved.
Version of external tools used:
BINUTILS_VERSION = 2.17 GCC_VERSION = 4.1.2 KERNEL_VERSION = 2.6.22
The whole chain was tested on i386 and amd64 host platforms.
Get the code¶
- Zeta-binutils is a port of binutils to Zeta
- Zeta-gcc is a port of gcc to Zeta
- Zeta-linux is a port of the linux kernel to Zeta
- Zeta is the main repository, with specification, documentation, test cases and the emulator.
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.What you need :
- Zeta source code for the four repositories (see the Main page)
- 250 Mb of free space on you hard disk.
- /opt/zeta writable by your user account
(You can edit the top of zeta.binutils/Makefile and zeta.gcc/Makefile if you want to use something else than /opt/zeta)
From the Zeta repository, check your environment:
orzel@berlioz zeta%25 make check Host tools checked : genromfs : genromfs 0.5.2 gmake : GNU Make 3.81 Binutils : GNU ld (GNU Binutils) 2.20 GCC : gcc (Gentoo 4.4.2 p1.0) 4.4.2 (Everything seems ok)
Install the binutils from your checkout of zeta.binutils
orzel@berlioz zeta.binutils%25 make install
That should end with something like
... gmake: Leaving directory `/home/orzel/hg/zeta.binutils/build/libiberty/testsuite' gmake: Leaving directory `/home/orzel/hg/zeta.binutils/build/libiberty' gmake: Nothing to be done for `install-target'. gmake: Leaving directory `/home/orzel/hg/zeta.binutils/build' gmake: Leaving directory `/home/orzel/hg/zeta.binutils/build' orzel@berlioz zeta.binutils%25
Install gcc from your checkout of zeta.gcc
orzel@berlioz zeta.gcc%25 make install
That should end with something like
... gmake: Leaving directory `/home/orzel/hg/zeta.gcc/build/zeta-unknown-linux/libgcc' gmake: Leaving directory `/home/orzel/hg/zeta.gcc/build/zeta-unknown-linux/libgcc' gmake: Leaving directory `/home/orzel/hg/zeta.gcc/build' gmake: Leaving directory `/home/orzel/hg/zeta.gcc/build' orzel@berlioz zeta.gcc%25
The next step is to check your toolchain. You do so by following the description on global tests.
We can now cross compile the zeta kernel, from your checkout of zeta.linux:
orzel@berlioz zeta.linux%25 make oldconfig # just in case orzel@berlioz zeta.linux%25 make clean # just in case orzel@berlioz zeta.linux%25 make (...) AS .tmp_kallsyms2.o LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map /opt/zeta/bin/zeta-unknown-linux-objcopy -O binary -R .note -R .comment -R .stab -R .stabstr -S vmlinux vmlinux.raw orzel@berioz zeta.linux%25
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:
orzel@berlioz zeta%25 cd emulator orzel@berlioz zeta/emulator%25 make orzel@berlioz zeta/emulator%25 ./load_kernel ~/hg/zeta.linux/vmlinux.raw Zeta Emulator (C) Copyright 2000-2009 Thomas Capricelli / \ | *** | Loading kernel = /home/orzel/hg/zeta.linux/vmlinux.raw | * | at 0x0, size = 1206002 = 0x1266f2 | * | Loading ramdisk = ../ramdisk.romfs | * | at 0x200000, size = 0 = 0x0 | *** | Execution begins at 0x0 \ / Loading Symbols : ../linux/System.map ...
If you have Qt-4 installed, you can use the Graphical user interface :
orzel@berlioz zeta/emulator> cd gui orzel@berlioz zeta/emulator/gui> qmake # be sure it is qmake from qt4 orzel@berlioz zeta/emulator/gui> make orzel@berlioz zeta/emulator/gui> ./zeg ~/hg/zeta.linux &
Then click on this icon to have the kernel booting :
- release checklist
The handbook describes tests further.
The whole code of the Zeta project is released under the GNU General Public License version 2 (GPL).