An operating system based on Brans' Kernel Development Tutorial
Click me to see the video demo!
Future goals:
- Userspace, Port Newlib, Multi-process, multi-thread, IPC, write syscalls, etc(process related stuff)
- Implement a hobby level TCP/IP stack(Ethernet/ARP/DHCP/IP/UDP/TCP with congestion control and everything..)
- Graphical User Interface(C/S GUI Server, Composite via IPC, now the GUI is in kernel)
- Write three GUI user apps(Shell, TCP ChatRoom, Text Editor)
Simpleos use elf-i686-gcc as cross-compiler, please build the cross compiler on your system first.
Remember to replace "CC=i686-pc-btos-gcc" in Makefile with your cross compiler.
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 edu os. QEMU is more recommended.
- Run sudo apt-get install qemu-system
- Run ./qemu_run.sh to boot edu os(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 []