Skip to content

A toy implementation of the BOOTBOOT protocol for x86_64-uefi.

License

Notifications You must be signed in to change notification settings

raccog/toy-bootboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toy BOOTBOOT Implementation

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.

Implementation Details

Supported File Systems

Currently, ustar (commonly known as tar) is the only supported file system for initrd.

Boot Process

The boot loading process is as follows:

  1. Read initrd file to memory
  2. Get BOOTBOOT environment
    1. Try to parse from BOOTBOOT/CONFIG on boot partition
    2. If file not found, try to parse from sys/config on initrd
    3. If still not found, default environment will be used
  3. Search for kernel image
    1. If initrd is a file system, open kernel file using path from environment variable
    2. If initrd is not a filesystem, search for EFI header (fallback driver)
  4. Initialize hardware (ACPI, APIC, framebuffer, SMP, etc.)
  5. Get memory map
  6. Create BOOTBOOT header
  7. Map kernel to dynamic address (specified in environment variable)
  8. Map environment to static address (specified in source code)
  9. Map BOOTBOOT header to static address (specified in source code)
  10. Pass control to kernel entry point

About

A toy implementation of the BOOTBOOT protocol for x86_64-uefi.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published