Git Product home page Git Product logo

osdev's Introduction

simpleos

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:

  1. Memory manager(from virtual page allocation to kmalloc) [Done]
  2. File system(Hard disk driver, Support ext2, and virtual filesystem) [Done]
  3. Graphical User Interface
  4. Premptive multitasking
  5. Network(TCP, UDP, HTTP)
  6. User apps(File browser, downloader, editor and etc)

How to run and test simpleos kernel

Preparation(Ubuntu14.04 is a recommended environment for compiling and running simpleos)

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.

QEMU

  1. Run sudo apt-get install qemu-system
  2. Run ./qemu_run.sh to boot simpleos(or ./kvm.sh if your environment supports kvm)

Debug with QEMU

  1. run ./debug_qemu.sh

Plan

Mem management

       0 Higher half loader [✔]
       1 physical memory management [✔]
       2 paging(virtual memory management) [✔]
       3 kmalloc [✔]

Filesystem

       0 PCI Enumerate,R/W [✔]
       1 ATA/DMA Driver [✔]
       2 Ext2 Filesystem [✔]
       3 Virtual Filesystem [✔]

Graphical Interface

       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 []

Miscellaneous

       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 []

Network protocols

       0 Send/Recv raw packets [✔]
       1 IP [✔]
       2 UDP [✔]
       3 ARP [✔]
       4 DHCP [✔]
       5 TCP []
       6 HTTP []

Screenshots

Alt text

osdev's People

Watchers

shekk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.