
A 64bit hobby operating system written in C++
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
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.
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.
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)
- 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
-
Clone the repo
git clone https://github.com/maxtyson123/MaxOS.git cd MaxOS
-
Create the cross-compiler (This will take a while)
cd toolchain ./make_cross_compiler.sh cd ../
-
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
-
Clean the build directory
make clean
-
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
-
(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]
- CMake:
- 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
- Go to Settings -> Editor -> Code Styles -> (cog) -> Import Scheme -> C/C++ -> Import Scheme -> From
- Debugger
- Run a gdb build with
make gdb
- Create new configuration: Edit Configurations -> Add -> Remote Debugger
- Run a gdb build with
- Cmake
No user usage so far (userland will be added in the future)
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the BSD 3-Clause License. See LICENSE
for more information.