A toy operating system based on Brans' Kernel Development Tutorial
Current goals of this project is to build operating system with minimal support for the following:
- Memory manager(from virtual page allocation to kmalloc) [Done]
- File system(Hard disk driver, Support ext2, and virtual filesystem) [Done]
- Graphical User Interface
- Premptive multitasking
- Network(TCP, UDP, HTTP)
- User apps(File browser, downloader, editor and etc)
Simpleos use elf-i686-gcc as cross-compiler, please build the cross compiler on your system first.
How to build a cross compiler
Or, a rewritten/translated version of the above wiki article in Simplified Chinese
Link: 环境搭建与交叉编译器 Download password: 7ksb
Then, install nasm
sudo apt-get install nasm
Run the following script to generate 4 hard disk image
./mkext2image.sh
Run the following script to setup the tap network device
./setup_tap_device.sh
Note: The path of executable qemu-bridge-helper may vary, and so you should manually replace this path in qemu_run.sh, kvm.sh and debug_qemu.sh first. Use this command to find the path of qemu-bridge-helper
cd ~
find . -iname qemu-bridge-helper
If you would like to run the os in GUI mode, set the constant GUI_MODE (defined in kmain.c) to 1. If you would like to run the os in Network mode, set the constant NETWORK_MODE (defined in kmain.c) to 1.
Now run the following script to compile the kernel
./compile.sh
And then choose one of the following simulator to boot simpleos. QEMU is more recommended.
- Run sudo apt-get install qemu-system
- Run ./qemu_run.sh to boot simpleos(or ./kvm.sh if your environment supports kvm)
- run ./debug_qemu.sh
0 Higher half loader [✔]
1 physical memory management [✔]
2 paging(virtual memory management) [✔]
3 kmalloc [✔]
0 PCI Enumerate,R/W [✔]
1 ATA/DMA Driver [✔]
2 Ext2 Filesystem [✔]
3 Virtual Filesystem [✔]
0 vesa driver, 1024 * 768 color(32-bit color),framebuffer mode [✔]
1 Milestone(try loading and showing a wallpaper from hardisk!) [✔]
2 Windows compositor, support fonts, buttons,and etc [✔]
3 Write a shell []
4 Write a file browser []
1 Usermode [✔]
1 Multi-tasking/Simple scheduler []
2 Executable loader(elf) [✔]
3 spinlock, mutex, and other pthread primitives []
4 Add more syscalls, like fork/exec, open, read, etc.. []
5 Port newlib []
6 Write or port some baisc utilities such asenv, rm, cp, mkdir, reboot []
7 Real time clock [✔]
9 stadard input/output stuff []
0 Send/Recv raw packets [✔]
1 IP [✔]
2 UDP [✔]
3 ARP [✔]
4 DHCP [✔]
5 TCP []
6 HTTP []