ChaOS is a hobbyist x86 operating system written from scratch in C.
- Legacy BIOS bootloader
- EFI bootloader
- Pre-emptive single CPU MLFQ multitasking
- PS/2 keyboard & mouse support
- VGA text & graphics
- ATA hard drive support
- Floppy support
- FAT file system support
- ELF user programs
Note: It is recommended to have at least 1 GB of free storage
Note: Do not clone the repository into a path containing whitespaces
git clone https://github.com/Filiprogrammer/ChaOS.git
cd ChaOS
Install tools required to build, run and debug ChaOS.
sudo apt install nasm make qemu-system-x86 qemu-utils dialog gdb python3-tk
Get additional tools by either downloading the binaries:
wget https://github.com/Filiprogrammer/ChaOS/releases/download/v0.2.230727/chaostools-linux.tar.gz
tar -xf chaostools-linux.tar.gz -C tools
Or building them yourself:
sudo apt install wget build-essential file
tools/src/build-i686-elf-tools.sh
tools/src/GenFw/build.sh
tools/src/imgtools/build.sh
tools/src/mkdosfs/build.sh
To get the tools required to build, run and debug ChaOS on Windows, download the binaries here.
Or gather and build the tools yourself:
Cross-build the additional tools on linux:
sudo apt install wget build-essential file git automake autopoint bison flex libgdk-pixbuf2.0-dev gperf intltool libtool libltdl-dev python3-mako ruby unzip p7zip-full lzip libtool-bin python-is-python3
tools/src/build-i686-elf-tools-win.sh
sudo apt install gcc-mingw-w64-x86-64
tools/src/GenFw/build-win.sh
tools/src/imgtools/build-win.sh
tools/src/mkdosfs/build-win.sh
./build_image.sh hd
BUILD_IMAGE.BAT hd
Press Ctrl + Shift + B
A select dialog will appear where the configuration to be built can be selected.
Once a configuration has been selected, the build process will start and progress can be tracked in the bottom terminal window. The build script might also ask which user programs to build.
To run ChaOS in QEMU, just use the following script.
QEMU_BOOT.BAT hd
./qemu_boot.sh hd
To run ChaOS in VirtualBox, create a new virtual machine with at least 32 MB of memory and use the generated HDImage.vdi file as a virtual hard disk.
To start debugging in VSCode, press Ctrl + Shift + D or click on the Run tab on the left. Then select a debug configuration and click the green arrow to start debugging.
During debugging, while the OS is paused, GUI tools can be launched to see, for example, which tasks are running and in which queue they are.
To use that, simply type -exec source ../../gdb_tasks_gui.py
into the Debug Console.
Another graphical debugging tool would be a tool that can be used to inspect the heap of the kernel. This can be launched by typing -exec source ../../gdb_heap_gui.py
into the Debug Console.