This is a toy implementation of the BOOTBOOT protocol for x86_64 UEFI systems.
It is a work in progress and an experimental project. My main goal is to see what advantages and disadvantages there are in using Rust to make freestanding programs; in safety, abstractions, and tooling.
If you want a non-experimental boot loader implementing the BOOTBOOT protocol, use the official reference implementation.
Currently, ustar (commonly known as tar) is the only supported file system for initrd.
The boot loading process is as follows:
- Read initrd file to memory
- Get BOOTBOOT environment
- Try to parse from
BOOTBOOT/CONFIG
on boot partition - If file not found, try to parse from
sys/config
on initrd - If still not found, default environment will be used
- Try to parse from
- Search for kernel image
- If initrd is a file system, open kernel file using path from environment variable
- If initrd is not a filesystem, search for EFI header (fallback driver)
- Initialize hardware (ACPI, APIC, framebuffer, SMP, etc.)
- Get memory map
- Create BOOTBOOT header
- Map kernel to dynamic address (specified in environment variable)
- Map environment to static address (specified in source code)
- Map BOOTBOOT header to static address (specified in source code)
- Pass control to kernel entry point