Skip to content

maxtyson123/MaxOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Forks Stargazers Build Lines of Code wakatime


Logo

Max OS

A 64bit hobby operating system written in C++
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgments

About The Project

MaxOS

Max OS is a hobby operating system developed for the 64bit platform using C++ and Assembly. The project is currently in the early stages of development and is not yet ready for use. The project is being developed as a learning experience and is not intended to be used as a production operating system.

Max OS supports device drivers, memory management, multitasking, a GUI, and more. The project is being developed with the goal of being able to run on real hardware, however, it is currently only able to run on a virtual machine.

This GitHub repository contains the source code for the operating system, as well as the build scripts required to build the operating system from source. The repository also contains the latest built kernel, which can be downloaded from the workflow artifacts. To ensure a cleaner git history, each feature/change is done in a separate branch and then merged into the main branch once working. To see the history of each feature press on the pull request number. If you are intrested in the active development find the latest branch Here.

Note: Ignore all the networking code & drivers, they are very outdated, badly written and will soon be ported over to userspace and rewritten.

(back to top)

Getting Started

This is how to build the Max OS operating system from source. (Alternatively, you can download the latest built kernel from the workflow artifacts)

Currently, Max OS can only be built on a linux-like machine, but does support WSL & Mac. If you are using WSL, make sure the repo is on the WSL machine and not the Windows machine.

Prerequisites

This is the list of required packages to build the operating system from source. (Note the build scripts should install these automatically)

  • build-essential
  • bison
  • flex
  • libgmp3-dev
  • libmpc-dev
  • libmpfr-dev
  • texinfo
  • libisl-dev
  • cmake
  • telnet

Linux:

sudo apt update
sudo apt install -y build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo libisl-dev cmake telnet

Mac:

  # Install Devtools (via Xcode or some other method)
  # Install Homebrew
  brew install coreutils bison gmp libmpc mpfr texinfo gcc@13 cmake nasm telnet

Note: If you want to run the operating system in a virtual machine, you will need to install QEMU. (If in WSL the script will look for a Windows installation of QEMU)

Installation

  • Upon first build follow steps 1-5
  • If you change the file structure (e.g. add a new file) follow steps 3-5
  • If you're running on a new boot (eg you rebooted your computer) follow steps 4-5
  • If you only change a file follow step 5
  1. Clone the repo

    git clone https://github.com/maxtyson123/MaxOS.git
    cd MaxOS
  2. Create the cross-compiler (This will take a while)

    cd toolchain
    ./make_cross_compiler.sh
    cd ../
  3. Generate makefiles

    # If you edit the CMakeLists.txt file you will need to delete the build directory contents (not the folder) and regenerate the makefiles
    cd cmake-build
    
    # Change to -DCMAKE_BUILD_TYPE=Debug to enable debug mode
    cmake .. -DCMAKE_TOOLCHAIN_FILE=toolchain/CMakeToolchain.txt -DCMAKE_BUILD_TYPE=Release 
  4. Clean the build directory

    make clean
  5. Build the operating system & Run it in QEMU

    # Replace 'run' with 'gdb' on a debug build to make the kernel wait for gdb to attach on port 1234  
    make run
  6. (OPTIONAL) I use CLion IDE for development, if you want to use it too follow these steps for IDE features:

    • Cmake
      • Open CLion
      • Select "Open or Import"
      • Select the CMakeLists.txt file in the root directory of the project
      • Make sure the profile is set to these settings:
        • CMake: cmake .. -DCMAKE_TOOLCHAIN_FILE=toolchain/CMakeToolchain.txt
        • Directory: cmake-[release/debug]
      • Click "OK"
      • Wait for CLion to index the project (this may take a while)
    • Code Style
      • Go to Settings -> Editor -> Code Styles -> (cog) -> Import Scheme -> C/C++ -> Import Scheme -> From docs/Styles/ClionCodeStyleSettings.xml
    • Debugger
      • Run a gdb build with make gdb
      • Create new configuration: Edit Configurations -> Add -> Remote Debugger

(back to top)

Usage

No user usage so far (userland will be added in the future)

Boot Console

Boot Console

GUI

GUI

Roadmap

  • Bootloader
  • GDT
  • IDT
  • Interrupts
  • Keyboard & Mouse
  • PCI
  • ATA
  • VESA
  • Memory Management
  • Multitasking
  • GUI
  • Window Manager
  • Paging
  • Userspace
  • IPC
  • VFS
  • Loading ELF
  • Multiple Cores Support (SMP & Scheduler)
  • Userland GUI
  • CLI
  • Porting & Dynamically Linking Libc
  • Self-hosted os
  • App Framework & System Apps
  • DOOM Port
  • UserSpace Drivers
  • Userspace Networking
  • Connect to Clion with SMB for files and GDB for debugging in userspace
  • Auto Updater & Image Builder (ISO Release)
  • Store
  • User Switching
  • Real Hardware Support
  • Pretty GUI
  • Port NeoVim, Wakatime & Some hot reloader
  • Create port of my 2048
  • Own LibC
  • Compatibility Layer(s)

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the BSD 3-Clause License. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)