tomaka/redshirt

Turn standalone kernel into a library

Closed this issue · 0 comments

In order to support situations where:

  • Writing tests that run on QEmu. (cc #585)
  • Generating a kernel with a specific devicetree (cc #283)

It would be a good idea for the standalone kernel to be a library.

In order to generate a kernel, one would then write something like this:

#[redshirt_standalone_kernel::main]
fn main(platform_specific: impl PlatformSpecific) {
    // ...
}

This little piece of code could also be automatically generated by the standalone kernel builder based on the CLI options that are passed to it.

What is important, if we do this, is to properly document what #[redshirt_standalone_kernel::main] actually does.