Amateur x86-64 (for now) kernel written from scratch using C and NASM assembly, booted using Limine.
Currently only boots into a basic terminal application in kernel space but more features are to come soon.
- Project structure built with future multiarch support in mind
- UEFI ready and legacy BIOS compatible
- ACPI table reading support
- Serial interface for debugging
- Interrupt driven PS/2 keyboard driver
- Flexible keyboard stack ready for future USB integration
- Modular design and simple interfaces making for easy optimization in the future
- Clone the repo
git clone https://github.com/wdotmathree/PZOS.git
git submodule update --init --recursive --progress- Build the image file
make img -j$(nproc)- Install prerequisites
sudo apt install qemu-system-x86
# For UEFI support (optional)
sudo apt install ovmf- Run the image with QEMU
# 4GB RAM max memory size (not allocated at boot), adjust as needed
# If using UEFI (PS/2 is not supported by the UEFI firmware so keyboard won't work)
qemu-system-x86_64 -m 4G -drive format=raw,file=PZOS.bin -bios /usr/share/OVMF/OVMF_CODE.fd
# If using legacy BIOS
qemu-system-x86_64 -m 4G -drive format=raw,file=PZOS.bin-
Find the correct device path for your USB drive. Run
lsblkbefore and after plugging in the USB drive to identify it (e.g., /dev/sdX). -
Format the USB drive into 2 partitions:
- A small EFI partition formatted as FAT
- A larger FAT32 (for now) partition for the root filesystem
-
Write the image to a USB drive (replace /dev/sdX with your USB drive)
# WARNING: This will erase all data on the target drive!
# Make sure you are absolutely certain you have the correct drive.
# We are not responsible for any data loss.
make file=/dev/sdX install -j$(nproc)- Plug the USB into a computer, then reboot it off the USB drive. (very system specific, search online for instructions if unsure)
Feel free to open issues for any bugs you find, however I am not currently accepting pull requests as this is a personal project.
This project is licensed under the GNU AGPLv3 License. See the LICENSE file for details.
- Limine - The bootloader used in this project
- OSDev Wiki - A great resource for OS development
- Intel 64 and IA-32 Architectures Software Developer’s Manual - The definitive guide to x86 architecture (specifically Volume 3)