a simple, work-in-progress hobby operating system for x86_64 architecture, written in C and assembly,
and uses GRUB multiboot2
to be clear i have absolutely no idea what i am doing, so i'm learning stuff along the way, which is the main motivation of this project, to learn OS development!
- multiboot
- paging
- long mode entry
- video/framebuffer functions
- printk/printf
- simple heap implementation
- IDT
- PIC
- PCI
- AHCI
- serial
- IDE
- FAT32
- scheduler
- userland
- TSS
- SYSCALL/SYSRET
- libc
- init
- possibly a shell and more programs?
start by obtaining the source code, you can just clone the repository:
git clone https://github.com/ngn13/sdxfor building from source, you will need cross-compilation tools for x86_64, this tools may be available in your distribution's package repository, or you can build them from the scratch using the automated script:
make toolsthis script will build the necessary tools and install them to /opt/cross/bin
after installing these tools, you should generate a create a configuration file, you can just copy the default:
make configthen you can use make to build all the binaries:
makeand you can create a raw disk image using the scripts again:
make imagefor safety, it's suggested you only run this in a virtual system, you can use QEMU, which is most likely available in your distribution's package repository:
make qemuif you use the QEMU setup detailed in the previous section, then you can debug the system using a remote GDB setup:
make debugyou can also use the QEMU monitor
if you want to help me check off some of the shit on the roadmap or if you just want to make fun of my dogshit code or if you want to discuss about the best cars moive feel free to create an issue/PR
here is an awesome list of resources/documentation that i use (ill keep extending this as i find more resources), this list doesn't contain any spec documents, however specs are referenced in the source code
- OSDev wiki
- Osdev-Notes
- Write your own Operating System
- GCC's assembler syntax
- GNU Assembler Examples
- The 32 bit x86 C Calling Convention
- The 64 bit x86 C Calling Convention
also there's a great community with bunch of helpfull people in #osdev channel on libera