rust-osdev / uefi-rs

Rusty wrapper for the Unified Extensible Firmware Interface (UEFI). This crate makes it easy to develop Rust software that leverages safe, convenient, and performant abstractions for UEFI functionality.
https://rust-osdev.com/uefi-book
Mozilla Public License 2.0
1.28k stars 155 forks source link

Any examples of using uefi-rs to load an ELF? #424

Closed AGSaidi closed 2 years ago

AGSaidi commented 2 years ago

https://github.com/rust-osdev/uefi-rs/tree/main/template calls out that since you can't use a customer linker script you probably want to use uefi-rs as a shim to load an ELF kernel. Are there any examples of doing this?

GabrielMajeri commented 2 years ago

Hello. Yes, you can look at the bootloader crate as an example for this; it does precisely what you need: provides a BIOS/UEFI compatible entry point which then loads and runs an ELF-based kernel image.