Feature: Bootloader abstraction
DeanoBurrito opened this issue · 3 comments
As cool as stivale is, it would be nice to remove references from it from random parts of the init code. Perhaps into some functions that parse the tags given to us by the limine.
A nice side affect of this is that we could potentially support multiple boot protocols (multiboot 2 perhaps) in the future, although these would require dedicated entry stubs to get into the stivale2 defined environment.
WIP on branch feature-mb2-support
edit: this branch has since been deleted as i'm now working on dev.
bootloader dependencies have been reduced down to:
- getting a memory map
- getting a default framebuffer
- loading modules (currently we do rely on an extra string passed with the module to tell us what it is).
We do ask the stivale2 bootloader for to enable NX and 5 level paging for us, so I would like to mirror this functionality in our protected mode boot shim (used by mb and mb2).
After some thinking on this idea, all reasonable solutions end up with needing to write a separate pre-kernel to adapt whatever we boot from to stivale2. We're essentially rewriting a big chunk of Limine, and at that point it begs the question why not just chainload limine itself, and be booted normally.
I think if I were to create a pre-kernel 'adaptor' of sorts, it would end up being a separate project. Maybe for the future!