Page 1 of 1

Anouncing swieros - A tiny hand crafted OS and compiler

Posted: Fri Nov 21, 2014 5:14 pm
by rswier
Hello all!

The project:

A tiny and fast Unix-ish kernel (based on xv6), compiler, and userland for fun, education, and research.
Virtual CPU with full user/supervisor and virtual memory support, fast enough to support self-emulation.
Fast C-subset compiler allowing on-the-fly compile-and-go of all applications.
Network clients & servers, remote OpenGL, GUI applications, and many other nifty features.
Runs under Windows or Linux.

Please see the 00README.txt for full details and a step-by-step walk-through tutorial. I welcome your comments, suggestions, bug fixes and ideas. This is the first release of the code, and much is rough and unfinished.

https://github.com/rswier/swieros

Re: Anouncing swieros - A tiny hand crafted OS and compiler

Posted: Sat Nov 22, 2014 10:39 am
by ExeTwezz
Does this OS run inside its own VM?

Re: Anouncing swieros - A tiny hand crafted OS and compiler

Posted: Sat Nov 22, 2014 2:01 pm
by konacake
Wow, this is pretty slick. I adore tiny, simple OSes that can do just enough. I also didn't know about vx6, so this is a pleasant surprise.

I'm a tiny bit critical of the 2,200 line C file that has most of the OS in it. Some people like that, some don't. I'm personally not too partial to it, I rather split up similar parts into their own files.

This can't run bare metal right? A bit of a shame, that would be really cool to see. It's still awesome regardless.

Re: Anouncing swieros - A tiny hand crafted OS and compiler

Posted: Tue Mar 31, 2015 7:28 pm
by chyyuu
I try it and read the codes. It's owesome!
The ordinary students can read/analysis this os more easily than other os running on qemu or realhardware.

If there is a debugger in CPU emulator for os debugging, then this project is more execellent.

Re: Anouncing swieros - A tiny hand crafted OS and compiler

Posted: Wed Oct 14, 2015 2:13 am
by rswier
ExeTwezz wrote:Does this OS run inside its own VM?
Yes. The OS runs inside a CPU emulator (or VM) complete with simulated user/supervisor modes and virtual memory. The emulator source is in root/bin/emsafe.c. A faster version of the same emulator is in root/bin/emfast.c. The CPU is a straight forward accumulator/stack machine with a simple instruction set.

Building and running the OS inside the VM is pretty simple. Take a look inside the batch/shell scripts for guidance. The 00README.txt file contains a step by step walk-through.

At the end of the walk-through is a demonstration of running a second copy the emulator and OS from inside the OS itself... a second nested level of virtualization.