Giter Club home page Giter Club logo

os's Introduction

Create an OS from scratch

  • I have always wanted to boot OS from scratch.

  • In this project we are bootstraping kernel via a simple boot sector which loads the kernel into memory and switches to 32-bit protected mode from 16-bit real mode and then calls the kernel code.

  • Kernel sets up the global descriptor table, interrupt descriptor table, initializes timer, keyboard interrupt and paging.


Things which are done

  • Boot from scratch
  • Enter 32-bit Protected mode
  • Jump from assembly to C
  • Interrupt handling
  • Keyboard input and output
  • A basic libc
  • Virtual memory (Paging)
  • Ordered array data structure
  • Memory Manager
  • Basic shell commands
  • Multiboot compliant kernel

Directory structure

├── boot
│   ├── boot_sect.asm
│   ├── disk_load.asm
│   ├── gdt.asm
│   ├── print_hex.asm
│   ├── print_string.asm
│   ├── print_string_pm.asm
│   └── switch_to_pm.asm
├── cpu
│   ├── idt.c
│   ├── idt.h
│   ├── interrupt.asm
│   ├── isr.c
│   ├── isr.h
│   ├── ports.c
│   ├── ports.h
│   ├── timer.c
│   ├── timer.h
│   └── types.h
├── cross-compiler.sh
├── drivers
│   ├── keyboard.c
│   ├── keyboard.h
│   ├── screen.c
│   └── screen.h
├── get_kernel_size
├── kernel
│   ├── bootanimation.c
│   ├── bootanimation.h
│   ├── kernel.c
│   ├── kernel_entry.asm
│   ├── kernel.h
│   ├── kshell.c
│   └── kshell.h
├── libc
│   ├── function.c
│   ├── function.h
│   ├── mem.c
│   ├── mem.h
│   ├── ordered_array.c
│   ├── ordered_array.h
│   ├── string.c
│   └── string.h
├── LICENSE
├── linker.ld
├── Makefile
├── memory
│   ├── kheap.c
│   ├── kheap.h
│   ├── paging.c
│   └── paging.h
├── README.md
└── Resources.md

Build

$ sudo apt install nasm     		# Netwide Assembler
$ sudo apt install qemu-system-x86 	# CPU emulator
$ sudo apt install make     		# Build system
$ ./cross-compiler          		# Builds the cross compiler
$ make run                  		# Build and Run

Resources


os's People

Contributors

0mega28 avatar pega5us 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.