Coder Social home page Coder Social logo

soreing / sore-os Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 88 KB

Primitive x86 32bit Operating System with FAT32 File System and a Kernel

CMake 0.33% C++ 17.82% C 61.80% Assembly 18.94% Makefile 1.11%
operating-system osdev kernel x86-assembly boot fat32 filesystem

sore-os's Introduction

Sore-OS

OS Image

Description

Sore-OS is a primitive x86 architecture 32-bit Operating System with a FAT32 File System and a basic kernel capable of keyboard input and VGA output. The OS has a custom boot loader written in AT&T syntax.

This project was started, motivated and influenced by "Writing a Simple Operating System โ€” from Scratch" by Nick Blundell, then expanded on with the help of OSDev Wiki

Basic Design

The Operating System boots into 16-bit Real mode, then with the help of the BIOS, it identifies the partition on the MBR sector, then finds KERNEL.SYS in the root directory of the FAT32 file system before changing into 32-bit Protected mode by configuring the Global Descriptor Table (GDT).

After changing into 32-bit Protected mode, the kernel's main function is executed to configure the Interrupt Descriptor Table (IDT) and run the kernel program.

Compiling the Operating System

Built binaries of the OS and the media-utility have been added to the /bin folder of the project.

To compile the boot-loader and/or the kernel, you must have a gcc cross compiler that compiles to i386 architecture. You can follow the steps outlined in the OSDev Wiki tutorial.

Basically you will need to download the source code for binutils and gcc, then compile it from source to a specific architecture (i386). On Windows, you can use Cygwin.

After you set up the cross compiler and added the executables to the system path, you can use the makefile in the root directory of the project to compile the files to create the boot-loader and KERNEL.SYS

Creating a Bootable USB

The project folders contain a C++ native Windows program to format a USB device and install the necessary data on it to boot the OS. you can find it in /_media_utility. Place the compiled boot-loader program in the same directory as the media utility executable, then run the program. The media device must be 4GiB or larger.

The media utility will ask you to enter the Physical Drive# to format a drive, and if there is no safety signature, you have to enter a random keyword to proceed.

While I am confident in the program, I take no responsibility if you format the wrong drive, by your or my mistake!

Running the OS in VirtualBox

After creating the bootable USB, you will need to place KERNEL.SYS file in the root directory for the OS.
To run the Operating System in VirtualBox, you need to create a virtual machine disk by linking to your media device, then run VirtualBox as an administrator. You cal follow any guide or this.

sore-os's People

Contributors

soreing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

filippoquaranta

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.