Zamak is a modern, high-performance bootloader written in Rust for x86_64 systems. Designed for reliability and simplicity, Zamak provides a Limine-compatible interface while supporting both UEFI and Legacy BIOS boot flows.
- Dual-Mode Booting: Seamless support for modern UEFI firmware and Legacy BIOS (MBR), including a hybrid boot image capability.
- Symmetric Multiprocessing (SMP): Full implementation of the Limine SMP protocol. Discovery of secondary cores (APs) via MADT (BIOS) or MP Services (UEFI) and transitioning them to 64-bit Long Mode.
- Limine Protocol: Implements the Limine boot protocol, providing kernels with memory maps, resolution-aware framebuffers, ACPI/SMBIOS pointers, and Higher Half Direct Mapping (HHDM).
- Module Support: Load auxiliary files (like initramfs) from disk and pass them to the kernel.
- FAT32 Support: Built-in read-only FAT32 driver for locating kernels and configuration files across directory hierarchies.
- ELF64 Loader: Robust parsing and loading of 64-bit ELF kernel segments with protocol fulfillment directly in the loaded image.
- Rust Powered: Leverage Rust's safety and modern tooling for low-level systems code, moving towards a "pure Rust" implementation.
zamak-loader/: The UEFI entry point (zamak.efi).zamak-bios/: The BIOS-specific Stage 1 (MBR) and Stage 2 (Rust) loaders.libzamak/: Sharedno_stdlibrary for protocol handling, ELF parsing, and configuration logic.
- Rust Nightly
nasm(for BIOS Stage 1)objcopy(binary generation)
cargo build -p zamak-loader --releasemake -f Makefile.bios clean allThis generates zamak_bios.img, a 1MB bootable disk image.
Zamak looks for a zamak.conf file on the boot volume. Example configuration:
TIMEOUT=5
:Zamak OS
PROTOCOL=limine
KERNEL_PATH=/boot/kernel
CMDLINE=some_kernel_parameter=1Zamak is licensed under the GPL-3.0-or-later license. See LICENSE for details.
Zamak is a work in progress. Contributions and feedback are welcome!