A hobby osdev project. I intend to develop a x64 monolithic OS.
You will need the following tools:
- Compiler:
x86_64-elf-gcc(cross-compiler for bare-metal x86_64) - Assembler:
nasm - Linker:
x86_64-elf-ld(part of cross-compiler) - Emulator:
qemu-system-x86_64
sudo apt update
sudo apt install -y gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu nasm qemu-system-x86-64 xorriso makeCreate symlinks for x86_64-elf tools:
sudo ln -s /usr/bin/x86_64-linux-gnu-gcc /usr/local/bin/x86_64-elf-gcc
sudo ln -s /usr/bin/x86_64-linux-gnu-ld /usr/local/bin/x86_64-elf-ld
sudo ln -s /usr/bin/x86_64-linux-gnu-objcopy /usr/local/bin/x86_64-elf-objcopybrew install x86_64-elf-gcc x86_64-elf-binutils nasm qemu xorriso makeIf you don't want to install cross-compilers locally, you can build using Docker:
./tools/run-docker-build.shmangoOS uses the Limine boot protocol.
git clone --branch=v10.x-binary --depth=1 https://github.com/limine-bootloader/limine.git limineThe limine/ directory is excluded from git (see .gitignore).
Navigate to the src/ directory to build:
cd src
make all # Build kernel (creates build/kernel.elf)
make clean # Clean build artifacts
make iso # Create bootable ISO image
make run # Build and run in QEMU
make debug # Build and run with GDB debuggingIn one terminal:
cd src
make debugIn another terminal:
x86_64-elf-gdb build/kernel.elf
(gdb) target remote :1234gdb- GNU Debuggerobjdump- Display object file informationreadelf- Display ELF file informationhexdump- View binary data
I welcome contributions to this project. Please read CONTRIBUTING.md.
- Operating Systems: Design and Implementation (Second Edition). by Andrew S. Tanenbaum (Author), Albert S. Woodhull (Author) - Thanks to Professor Xiannong Meng at Bucknell University.
- Operating System Concepts, 5th Edition by Abraham Silberschatz (Author), Baer Galvin (Author), Peter Gagne (Author) - Thanks to Professor Jessen Havill at Bucknell Univerisity.
