Giter Site home page Giter Site logo

patroclusos's Introduction

PatroclusOS

This project is a small, hobbyist operating system/kernel designed for x86_64 architecture. It's built from scratch, as an educational project to teach myself operating system design.

Features

  • x86_64 Architecture
  • Included custom bootloader: The project includes it's own custom (mostly) multiboot 1 compatible, that can be used to boot up the entire operating system. Support for any other multiboot 1 compatible bootloader is also available (tested in grub)
  • Written mostly in C++: Only a minimal amount of assembly is used, simply to setup a C++ environment. Use the power of a high level language to do everything! No more cryptic assembly, or (arguably more aesthetically pleasing) C code.
  • Minimalist design: Emphasis on simplicity and clarity, making it ideal for learning and experimentation. There's also some (attempts at) documentation, to help you understand what's going on

Contributing

If someone actually wants to contribute to this, I'll be very (pleasantly) surprised, but contributions are of course welcome! Just open up a pull request, or an issue!

Getting Started

Building this operating system takes some effort, unfortunately. In a future release, I plan to make a script that makes compiling the necessary toolchain easier. For now, there's some dependencies

Dependencies

  • Basic Linux common tools (ar, C/C++ compiler, bash, etc)
  • GNU Make
  • Python (to build diskimages, eventually we'll do it with bash)
  • Grub2 and Xorriso (optional, can use grub as bootloader, but we have our own)
  • qemu-system-x86_64 (optional, to emulate)
  • Doxygen (optional, to build documentation)

BOCHS as an emulator is also supported, but there's no make bindings for it (yet)

Building the toolchain

You need to build a 32-bit and 64-bit cross compiler toolchain supporting C and C++: see here for more details. For the C++ 64-bit compiler, you must also follow the instructions here to build libgcc with no red zone, to support exceptions (even though they aren't implemented just yet)

Building the operating system

When you have your cross compiler, you can build the OS. First, you will have to specify where your toolchain (and other programs) are located, so the build system can find them. An example configuration file is located at config/toolchain.sh, so copy it and edit it as you prefer. Now, create a build directory, cd into it, and run the config.sh script in that directory. You'll need to specify your toolchain file with the --toolchain=<file> command line option (run the --help option to see all available configuration options).

This will create all the necessary Makefiles in the directory it's run in. Now, just use Make to build the project!

Tip: running make qemu will build the diskimage, and start qemu, so you can experiment with the OS.

Documentation

There are some docs here. Also, doxygen documentation is somewhat supported, just run make docs to build it (but first, you must follow the Getting Started guide)

License

PatroclusOS is open-source software released under the MIT license. See the LICENSE file for more details.

patroclusos's People

Contributors

diogobgomes avatar

Watchers

 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.