MPGH operating system concept
This is a concept for the MPGH operating system, it contains a few general notes on what we could, should an must do to make this into a successful project.
This project is meant to be casual, just relaxed and laid back. No money, no pressure and no drama.
Our goal is simple:
1. Build an operating system for the Intel 32 architecture dedicated to/aimed towards hacking and reverse engineering.
None, our knowledge and our computers. No external funds, no nothing.
There are a few things that have to be decided before we can really start, I’ve already done a bit of a prepwork, but there’s a couple of things left to decide:
The ‘plan’ for as far as there’s one yet is this:
We build a 2 stage boot loader which boots our C++ sub_kernel, the subkernel will provide our real C# kernel with a suitable run time environment (basic memory management, file system, io). I have no idea how the subkernel and kernel will interface with each other, this will have to be investigated. Also, to run a interpreted language we’ll need some way to transform the C# byte code or C# source code, to machine code. We can either do this Ahead of Time (AOT) or Just in Time (JIT) both have been done before, and we have access to source code that could show us how it’s done. However fact remains that someone will have to write a compiler/interpreter that works on our system (just copying the Microsoft run time into your root directory won’t work ;-) )
This is the toolchain I use:
A toolchain is a set of tools you use in sequence (as a chain) to produce the os binary form the sourcecode in various languages (asm, C++, C#):
Windows, since this is the most common platform it’d be best if everyone uses the windows system as our ‘host’ system.
I use neohexeditor to check and verify the os binary:
I use nasm to compile the bootloader: http://www.nasm.us/
I use VC++ 2005 express to build the C++ kernel: http://www.softpedia.com/get/Programming/Other-Programming-Files/Microsoft-Visual-C-Toolkit.shtml
I use Imdisk to simulate floppies, cd sand hardrives for the operating system :
I use winimage(shareware) to format and write to simulated floppies, just reinstall:
And finally I use bochs to emulate the system:
Background, jargon and technical information
Because an operating system is a very complex thing that envelops many, if not all, technical areas in computer science we must maintain a list of handy references and articles you can read to better understand a particular thing you’re working on.
I’ve tried to build an operating system multiple times in the past, so I know a bit of what there’s to know and what’s expected of you. But even so there’s allot I don’t know and have never done.
For starters this website is very good: www.osdev.org if you’re new to osdev you must read all the introduction articles, not so much learn the basics as to update your vocab because the jargon-o-meter in osdev is points quite high :-) If you don’t know what words like ‘shell’ and ‘interrupt’ really mean you must start there.
A really good series I’ve followed once, and now use as a primary reference:
He makes many spelling and grammar mistakes, but he offers diagrams, images and example source code that make it 100% worth wile to read his articles. He, like us, is an osdever although he’s allot farther ahead then we are.
Boring alert, don't go here unless your resolve and morale are good! http://www.rfc-editor.org/download.html
While these are necessary, and some will have to be (re)read by us to implement certain parts of the system, they are not what you’d call ‘a good read’ they are as dry as the Shara desert and as boring as... er... never mind, there’s nothing as boring as STANDARDS!
What’s my part?
As I’ve said in the previous section: an operating system is a very complex thing. A side effect is that there are many things to be done.
Those of you who want to help me with the lower level C++ sub-kernel should be able to do the following things:
If you want to work on the ‘lower’ part of things you can ask me about what you should do.
If we want to have a C# kernel, allot of things will have to be done:
Step 2 and 3 are probably the biggest problems we’ll face until we advance to driver programming, to progress as fast as possible step 1 + 2 have to be completed before work on step 3 can be started. And to port the libraries we have to have a working HAL = hardware abstraction layer. That provides basic functionality (like io, sleep(), threading, files, memory, etc, etc)
http://www.mono-project.com/Main_Page <- opensource C# interpreter, perhaps we don’t have to write a compiler ourselves afterall!! :D
State of development:
Bootloader 1st stage: 100%:
Second stage bootloader - 0%
C++ Subkernel: - 0%
C# kernel - 0%
What does this thing do? 0% -> research needed.
mail me or post it (assuming we get one) on the website/status page.
And we still need a place to put all the source and status updates. A site would be nice, I was personally thinking of a free hosting service.