Shaun OS 0.2.0 is released


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 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
===================

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

	qemu-img create -f raw hd.disk 1G 

4, in linux box, format hd.disk with ext2 file-system

	mkfs.ext2 hd.disk 

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

	mount -text2 -oloop hd.disk /mnt 

6, copy ‘bin’,’lib’,’root’ directories extracted in current
directory into /mnt/

	cp -r bin /mnt
	cp -r lib /mnt
	cp -r root /mnt 

7, unmount disk file from /mnt

	umount /mnt 

8, run qemu with follow command:

	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

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

goto run shaun os on virutal box

RUN WITH VMWARE
===============

goto run shaun os on vmware

TIPS
====
1, list file and directory with command ls,

ls
ls root
ls bin/hello

2, create file with command touch

touch hello

3, write/append data into file hello with command echo

echo hello world > hello
echo shaun >> hello

4, virefy file contents with command cat, note:cat is a binary app in bin/

cat hello

5, delete file/directory with command rm

rm hello

6, print current time with command date

date

7, see more logs? set log level with loglevel

loglevel 1 #verbose mode
loglevel 5 #clean mode

8, create directory with command mkdir

mkdir test

9, run binary applications, just enter its name or use command exec

hello   #run hello application, hello is a elf binary in bin/ directory and it depends on libc.so which is in lib/ directory
/bin/hello
exec /bin/hello

10, get/set ip address

ifconfig
ifconfig 192.168.1.1

11, how to boot into graphic mode? add gfx argument in grub kernel command line

mount -oloop floppy.img /mnt 
vim /mnt/boot/grub/menu.lst
kernel /kernel gfx
save and exit vim
umount /mnt

rerun step 8, after boot over, click center of screen, a window will display,and you can drag the window, or click the input box, enter whatever you want, also delete it by entering backspace.

Leave a Reply

Your email address will not be published. Required fields are marked *