Skip to content

Patchwork is a hobbyist OS built from scratch in C for the x86_64 architecture with a monolithic kernel.

License

Notifications You must be signed in to change notification settings

KaiNorberg/PatchworkOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PatchworkOS

Keep in mind that PatchworkOS is currently in a very early stage of development.

Patchwork is a 64 bit monolithic hobbyist OS built from scratch in C for the x86_64 architecture, it is intended as an easy-to-modify toy-like Unix-inspired OS (not Unix-like) it takes many ideas from Unix while simplifying them and removing some of the fat. Made entirely for fun.

Differences with Unix

  • Multiroot filesystem, with labels not letters home:/usr/fonts
  • Replaced fork(), exec() with spawn()
  • Single-User
  • Non POSIX standard library
  • GUI centric design
  • Lost of other stuff...

Features

  • Easy to understand Unix inspired architecture (Not Unix-like)
  • Monolithic preemptive 64-bit kernel
  • SMP (Symmetric Multiprocessing)
  • Multithreading (Kernel Level Threads)
  • O(1) scheduler
  • Custom standard library
  • Custom UEFI bootloader
  • SIMD
  • Custom image format (.fbmp)
  • More to be added...

Limitations

  • Ram disks only
  • Only x86_64

Tested Hardware Configurations

  • Lenovo Thinkpad E495
  • Ryzen 5 3600X | 32GB 3200MHZ Corsair Vengeance

Currently untested on Intel hardware.

Setup

1. Cloning

To clone this repository, you can either use the Code button at the top left of the screen on GitHub, or if you have Git installed, run the git clone --recursive /~https://github.com/KaiNorberg/PatchworkOS command.

2. Building

Before building Patchwork, ensure you have make, gcc, nasm and mtools installed, you will need to use Linux.

Once everything is installed, navigate to the cloned repository and run the make all command. You should then find a PatchworkOS.img file in the newly created bin directory.

3. Running

There are three ways to run Patchwork.

  1. Create a Bootable USB: Use a tool like balenaEtcher to create a bootable USB using the created .img file.
  2. Use QEMU: Download QEMU and use the make run command.
  3. Other Virtual Machine: Run the created .img file in a virtual machine of your choice.

Documentation (WIP)

Documentation will eventually be found on the wiki page.

Contributing

Patchwork is now open to contribution. If you find any bugs, issues or just have a suggestion for something I could do better, then feel free to open an issue or if you feel like it, you may submit a pull request.

Due to the small size of the project there are no strict guidelines, simply try to use descriptive branch names and commit messages, follow the code style of the rest of the project and the clang-format file and ensure your contributions comply with licensing.

The guidelines may expand in the future as necessary.

About

Patchwork is a hobbyist OS built from scratch in C for the x86_64 architecture with a monolithic kernel.

Topics

Resources

License

Stars

Watchers

Forks