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.

Goals

Our goal is simple:

1. Build an operating system for the Intel 32 architecture dedicated to/aimed  towards hacking and reverse engineering.

Resources

None, our knowledge and our computers. No external funds, no nothing.

What’s next?

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:

  1. File system
  2. Basic architecture
  3. A name (mpghos is a bit... unimaginative)
  4. A project site/wiki Looking at you Web-Designer :p 
  5. How  are we going to distribute code between members? I’ve never used programs like git or svc, so I don’t have a clue where to start. If anyone has experience with joined coding efforts it’d be nice if he/she explains how it all works, and how we’re going to do it.

Current plan/layout/architecture

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 ;-) )

Tools

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:

http://www.hhdsoftware.com/free-hex-editor 

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 :

http://www.ltr-data.se/opencode.html/

I use winimage(shareware) to format and write to simulated floppies, just reinstall:

http://www.winimage.com/download.htm 

And finally I use bochs to emulate the system:

http://bochs.sourceforge.net/

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:

http://www.brokenthorn.com/Resources/OSDevIndex.html

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:

  1. The ability to work with, VC++2005 (express)
  2. Working and troubleshooting with the bochs emulator

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:

  1. Someone must investigate how the C++ and C# kernels will interface/work with each other.
  2. A compiler must be written, either AOT or JIT
  3. The run time libraries must be ported, the C# alone is not enough!!

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://wiki.osdev.org/C_Sharp 

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%:

  1. Loads the 2nd stage bootloader
  2. verifies disk and monitor access

Next stop:

Second stage bootloader - 0%

  1. Launches protected mode  0%
  2. Loads C++ sub-kernel        0%
  3. Extracts information from bios and computer for boot header 0%
  4. Launches the C++ kernel 0%

C++ Subkernel: - 0%

  1. Provides memory allocation 0%
  2. Provides file system 0%
  3. Provides a HAL 0%
  4. Provides an interface with the C# kernel 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.

sschims@hotmail.nl

-SCHiM