kanajakala/cacos
A simple OS written in zig
CaCOS is a hobby OS, currently in rewrite. It's goal is to be functional, as well as written in elegant zig code, as much as possible. In the current rewrite there is text display, a basic file system, and userland applications as well as libraries to support them.
frame-buffer ✔️
core/display
✔️core/font
✔️memory
core/alloc
✔️core/alloc
interrupts ✔️
cpu/idt
✔️cpu/gdt
✔️error handling ✔️
Process management
Filesystem
core/fs
Syscalls ✔️
Load binaries and execute them ✔️
NOTE: the OS is currently in heavy development and the process to run the OS is not streamlined yet
NOTE: running on macos or windows has never been tested, though it should work fine
To run the os you have to clone the git project or download the project archive via github.
you can then run the following the command if you are on linux (or mac?)qemu-system-x86_64 -drive format=raw,file=kernel/img/cacos.img
NOTE: the build process is very unlikely to run on non-unix system, it may work on mac with some tweaking
you will need the following dependencies:
running the following the following command will download and compile dependencies, compile the OS code for you and run it:zig build run
you can customize the build process by running specific steps:
zig build compile
generate an elf executable of the kernelzig build compile-apps
creates executables for the kernel appszig build setup
dowloads and build mkbootimg, bootboots utility program to generate bootable imageszig build gen
create a bootable image using mkbootimgzig build run
run the previous steps and run the image in qemu