rust-osdev / bootloader

An experimental pure-Rust x86 bootloader
Apache License 2.0
1.31k stars 204 forks source link

Support for multiple boot protocols #158

Open Andy-Python-Programmer opened 3 years ago

Andy-Python-Programmer commented 3 years ago

It will be great to have support for multiple boot protocols preferably stivale, stivale2 and mutliboot2. Other boot protocols also exist but these are the "cool" ones :D

https://wiki.osdev.org/Stivale_Bare_Bones

phil-opp commented 3 years ago

Do you mean that we should support booting kernels using these protocols? Or that we should support to create disk images that can be booted by other bootloaders (e.g. GRUB2) via these protocols?

Andy-Python-Programmer commented 3 years ago

Support booting the kernel with these protocols.

phil-opp commented 3 years ago

Hmm, I'm not sure if this is worth the effort. It would require a lot of boilerplate to set up the various C-style structures that these protocols require (e.g. for the boot info). It would also make this crate much more complex because we would need to support all the machine states required by these protocols. For example, we would need to also support loading 32 bit ELF files into protected mode for multiboot2 support (we currently do everything in 64 bit).

Andy-Python-Programmer commented 3 years ago

Ah I see. Then I think chainloading will be great feature