Skip to content

automas-dev/os

Repository files navigation

os

Following the tutorials under https://github.com/cfenollosa/os-tutorial

Active and planned work is tracked in notes.md

For current specs see

Goals

The OS will be finished when all of the following are implemented.

  1. Able to get and draw basic http web page
  2. Compiler for at least Assembly or C
  3. Playable Minecraft Clone

The following lists show the planned development stages and planned tasks to achieve these goals.

Near Near Term

  • Read extended kernel form floppy
  • Switch to protected mode
  • some stdio.h
  • printf
  • some string.h
  • keyboard driver
  • ata driver
  • terminal with command parsing
  • circular buffer + tests (builtin, needs separating)

Near Term

  • Kernel stats (stats command returns # disk io, keys, mounts, etc.)
  • Detect stack overflows
  • fs
    • Finish implementing fs functions
    • Implement file io
  • basic malloc (linked list)
  • malloc
    • Actually manage memory
    • Need to find end of kernel to not overflow at runtime (for malloc start)
    • Detect max memory for malloc
    • Do that fancy memory map
  • Paging
    • Setup page dir and table
    • Enter paging
  • Load user space application
  • Ring 3
    • Kernel Service Calls
  • Date and Time
  • Optional don't disable interrupts during interrupt (nested interrupts)
  • Better key event buffer (with mods) (maybe in addition to char buffer)
  • Change stdlib names with k prefix for namespace during testing
  • Optimize disk read to check if area already in buffer

Long Term

These tasks will be broken down further after completion of Near Term, when there is a better foundation and design to work with.

  • Switch to 2d graphics mode
  • Virtual memory pages / memory paging
  • Memory permissions (eg. stack can't exec, code can't write)
  • User level applications (might need 3rd level kernel from filesystem)
  • Testing
  • FAT or EXT2 filesystem driver
  • Audio Driver
  • 64 bit support printf (needs libgcc)
  • Text editor

Long Long Term

These tasks will be broken down further after completion of Long Term, when there is enough support for their development.

  • Graphics card driver (pseudo opengl)
  • Threading / multi-process
  • (Maybe) Multiboot or GRUB?

Setup

You will need to install the gcc i386 elf cross compiler. This project expects this to be under ~/.local/opt/cross but this can be changed by editing the root CMakeLists.txt. For instructions of how to build the i386 elf compiler from source, follow the instructions on the OS-Dev Wiki GCC_Cross-Compiler

git clone git@github.com:automas-dev/os.git
cd os
make setup

Building

make build

Running

make run

Once running, use the help command to see what you can do.

Testing

make test
make test_cov
make test_cov DARK_MODE=ON

Formatting / Linting

make lint
make format

About

Hobby i386 Operating System

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •