Skip to content

An operating system created from scratch, featuring a FAT16 filesystem, paging, segmentation, kernel heap and a simple console

License

Notifications You must be signed in to change notification settings

pcichowski/silentOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


silentOS

An operating system made from scratch

Overview

This project's aim was to create an operating system from scratch. The main goals were a simple console, segmentation, paging, and a FAT16 filesystem capable of opening and reading files from disk.

It was created using guides on OSDev wiki and an online course on Udemy by Daniel McCarthy. This was the main project for System Software (Oprogramowanie Systemowe) course on the 5th semester of computer science on GUT.

This project uses QEMU to run the OS on a virtual machine, nonetheless it is able to run on any computer using a bootable USB (I actually tried it for fun :) )

Table of contents

About this system

The default behaviour of the operating system is explained in the following steps:

  1. start at the bootloader
  2. intialize segmentation
    • (in a way that it doesn't affect the OS, so all segments point to the entire memory)
  3. boot to the operating system
  4. initialize console, show system logo
  5. initialize kernel heap for memory allocation
  6. initialize Virtual File System and FAT16 filesystem
  7. search for disk and attach it to FAT16
  8. intialize the interrupt descriptor table
  9. allocate some memory for the kernel
  10. enable paging and map the kernel memory
  11. enable interrupts

These steps leave the kernel in a fully working state, we are free to do anything now

As an example for the main goal of this project, that is reading a file from disk and displaying it to screen, the system will load two files to some allocated memory and print their contents to the console.

Setup

Prerequisites

  • make
  • gcc and ld built locally for crosscompilation
  • qemu

Building system image

./build.sh

This sets the default target and invokes make all

Note: you need to set correct paths to gcc and ld in build.sh, the default values are those shown on the wiki article

Usage

Running the OS

qemu-system-i386 -hda ./bin/os.bin

Cleaning build artifacts

make all

Credits

License

This project is a free and open-source software licensed under the GPL-3.0 license

Acknowledgements

About

An operating system created from scratch, featuring a FAT16 filesystem, paging, segmentation, kernel heap and a simple console

Topics

Resources

License

Stars

Watchers

Forks