Page 1 of 1

Shaun OS 0.2.0 released

Posted: Thu Aug 04, 2016 5:49 am
by Shaun
Hi,

this release version is 0.2.0.

Main Features
==============

grub multiboot loading
AHCI controller driver
TTY
Intel e1000 card driver
both elf static & dynamic linked binary loading
ext2 file system
real mode switching
ps2 keyboard driver
mouse driver
virtual and physical memory management
pci bus driver
multi-thread, multi-process
vesa driver
vfs
tcp-ip network stack
graphic driver

About file system
==================
In this version, I have fixed some bugs for file related operations.
now, you can create or delete files, directories. display file contents with 'cat' command.
write data into file with 'echo' command. the file system of shaun os is ext2, I made a basic
implementations. it is now compatible with linux os. you can create file in shaun os, and
verify its content in your linux box. File permission checking only work in
user level, no group and others, and also do not support symbolic.

About network
=============
currently, in this version, the network stack is over half completed. route, sockets api,
tcp, udp, icmp is done. the loop interface and unix socket are not implemented. You can use
ifconfig command to get/set interface ip address, and then ping this ip in your host os. in qemu,
you should be responsible for the network that is reachable.


About user interface
====================
when the kernel finished its initialization, it will load 'init' binary int /bin/ directory and
run it. in gfx mode, 'dsktp' instead.

the 'init' is a simple shell made for testing system apis. i have no time to write a shell with
full functionality. its source code is availiable on http://www.shaunos.com. if you have interest to
finish it, contact me.

the 'dsktp' binary if a simple graphic application made for testing graphic library api and
kernel GUI system. it displays keyboard input on screen.

the graphic library is integrated into libc.so. i write a small graphic library that can draw
window, label, edit box components on screen and compile it with libc together. the design rules
of it comes from MFC but written in C. read message, dispatch message in a loop system.


WHAT YOU DOWNLOADED
===================

Code: Select all

shaunos
    ├── bin
    │   ├── cat			//cat command ported from bsd
    │   ├── chmod		//chmod command ported from bsd
    │   ├── dsktp		//a simple window UI, first app to run in gui mode
    │   ├── hello		//just print hello world, dynamic linked elf binary
    │   └── init		//small shell, first program to run in console mode
    ├── floppy.img		//a floppy image with grub and kernel installed
    ├── lib			
    │   └── libc.so		//libc ported from bsd,including system call, graphic library 
    ├── LICENSE			//license file
    ├── README			//you see now
    └── root
        ├── arrow.bmp		//mouse bitmap, for gui mode
        └── bk.bmp		//desktop background file, you can replace it with whatever you 
				//want, make sure that it is 1024 x 768 pixel.
RUN WITH QEMU
===========

Download tar file here
or
Download zip file here

1, download tar file and extract it.
2, cd shaunos directory
3, create a hard disk file with qemu-img, 1G size is enough

Code: Select all

qemu-img create -f raw hd.disk 1G
4, in linux box, format hd.disk with ext2 file-system

Code: Select all

mkfs.ext2 hd.disk 
this command will ask you 'Proceed anyway? (y,n) y
5, mount hd.disk on /mnt

Code: Select all

mount -text2 -oloop hd.disk /mnt
6, copy 'bin','lib','root' directories extracted in current
directory into /mnt/

Code: Select all

cp -r bin /mnt
	cp -r lib /mnt
	cp -r root /mnt
7, unmount disk file from /mnt

Code: Select all

umount /mnt
8, run qemu with follow command:

Code: Select all

qemu-system-i386 -fda floppy.img -boot a -monitor stdio  -drive id=disk,file=hd.disk,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0
9, in console mode, enter password: shaun
10, enjoy!

RUN WITH VIRTUALBOX
===============

1, download shaunos-vbox configuration file
2, unzip the file you downloaded
3, cd shaunos directory
4, open shaunos.vbox using your favorite text editor
5, modify following two lines, specify your location path of vmdk and floppy.img, these two file are under the current directory and save it.

Code: Select all

HardDisk uuid="{3464c236-39e3-43cc-a4a5-94f206895a72}" location="C:/Users/Shaun/Desktop/hd.vmdk" format="VMDK" type="Normal"
Image uuid="{cae57606-b513-4f56-86c3-154174e92301}" location="C:/Users/Shaun/Desktop/floppy.img"
6, open virtualbox manager application,in FILE->Preferences->Network->Host-Only Networks->VirtualBox Host-Only Ethernet Adapter setting tab, set Adapter IPv4 address to 192.168.92.1, IPv4 Network Mask 255.255.255.0, disable DHCP service, click OK.
7, double click shaunos.vbox file, or open it with your virtualbox manager application.
8, enjoy.

ping 192.168.92.140 from host os. this ip address is the default address of eth0

RUN WITH VMWARE
============
my vmware version is 12.1.0.

1, download my vmware configuration zip file shaunos-vmware
2, unzip it
3, cd shaunos directory
4, open shaunos.vmx using your favorite text editor
5, modify following two entries to the correct path of your environment. these two file is under the current directory.

Code: Select all

sata0:0.fileName = "C:\Users\Shaun\Desktop\hd.vmdk"
floppy0.fileName = "C:\Users\Shaun\Desktop\floppy.img"
6, double click shaunos.vmx, and run this vm.
7, enjoy!

if you want to explore more? boot into graphic mode? visit here

Re: Shaun OS 0.2.0 released

Posted: Fri Aug 05, 2016 12:54 am
by max
Hi Shaun!

I'm impressed, amazing work. =D> You got a bunch of great features.

Where can I find the source though? I struggle a little with the dynamic library loading and it would be great to see how someone else does it.

Also would be nice to have a boot-ready iso image, so we can play around with it :P

Greets

Re: Shaun OS 0.2.0 released

Posted: Fri Aug 05, 2016 6:23 am
by Shaun
Hi, max

i have updated the post, and add steps about how to run it on vmware and virtualbox platform.

i take a different way to implement elf shared library loading, put the loading phase in kernel mode, without need of /lib/ld-linux.so.

finally, i feel sad to say that the source code is not available now.

Re: Shaun OS 0.2.0 released

Posted: Sat Aug 06, 2016 2:46 am
by Roman
Great work! I have already been thinking you're done with OS development. Turns out, you've just been silent. I'll test it soon. Good luck!

Re: Shaun OS 0.2.0 released

Posted: Fri Jan 06, 2017 5:28 am
by Ycep
It seems really buggy at least on VirtualBox. I just done "cd bin" and then "ls" and it popped out 4 "KERNEL ERROR" messages.