Skip to content

SilverSouls226/ZenOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZenOS

[Note: This is still very much a work in progreess with a long way to go]

ZenOS is a minimal educational operating system built from scratch for the x86_64 architecture. The goal of this project is to understand how an operating system works at the lowest level including but not limited to:

  • booting
  • memory management
  • interrupts
  • multitasking
  • user/kernel separation.

This OS is built using C and x86 assembly, runs on bare metal, and is tested using QEMU.

Tooling

  • Emulator: QEMU (x86_64)
  • Compiler: Cross-compiled GCC (x86_64-elf)
  • Bootloader: GRUB (Multiboot2)

Build Requirements

The following tools are required on the host system:

  • GNU Make
  • GCC and Binutils
  • GRUB
  • xorriso
  • GDB
  • QEMU

Directory Structure

zen-os/
├── README.md
├── .gitignore
├── src/      # kernel C code
├── arch/x86_64/   # architecture-specific code (ASM, linker)
├── build/     # build artifacts
└── scripts/     # helper scripts

Cross-compiler dependencies

  • gmp
  • mpfr
  • libmpc

Roadmap

  • Cross-compiler toolchain
  • Bare-metal kernel entry
  • VGA text output
  • Memory management
  • Interrupt handling
  • Scheduler
  • User mode support
  • File system

Cross-Compiler Toolchain

A freestanding x86_64-elf cross-compiler is used to ensure the kernel does not depend on the host operating system. Components:

  • binutils (assembler and linker)
  • GCC (C compiler without standard library) The GCC build is configured as freestanding:
  • No libc
  • No system calls
  • No host OS dependencies

Building the Toolchain

The cross-compiler toolchain is not stored in the repository. To build it locally run:

./scripts/build-toolchain.sh

This will download, build, and install a freestanding x86_64-elf GCC toolchain under toolchain/install/.

About

ZenOS is a minimal educational operating system built from scratch for the x86_64 architecture. The goal of this project is to understand how an operating system works at the lowest level

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors