Version 0.2.0 - #20
Conversation
|
Why not completely move |
|
Having it as a separate crate allows multiple bootloader implementations to reuse the same bootinfo struct, so we might want to keep it separate. However, I completely agree that we should hide the fact that this is a common crate to be less constrained by backwards compatibility in the future. I think the best way is to create a |
This allows us to merge the os_bootinfo crate into the bootloader without breakage (in case we want to do that someday). It also hides the os_bootinfo crate as an implementation detail.
|
I pushed a new version that does not expose Oh and one thing I wanted to note:
We're causing breakage by the |
|
Ah that makes sense - we haven't discussed how we're going to approach multiple bootloaders in the future (we'll need 2-3 for x86 alone eventually - the current BIOS HDD image, EFI and maybe El-Torito). I'd like to see if we can actually support them all within the one crate, and just use cfg to mix the code we need into each version, which would be configurable via Overall tho, this is great work and much easier to understand what's going on, thanks Phil! |
|
To add onto what @IsaacWoods said, we'll also need bootloaders for risc-v and the various flavors of arm eventually. It would be nice to contain them all in one crate and use cfg features or even just the compiler target to enable to correct one. In fact, we could have a number of sub-crates that each export an inlined start function. And then, the bootloader would include all of them and gate based on cfg features and compile targets. |
Now that the bootloader is a normal dependency, we could even do this through normal cargo features, e.g. an
Glad to hear that, thank you! |
|
@lachlansneff Sounds good! |
|
Published as version 0.2.0 |
Given that we were in alpha state for a long time and there were no real bugs reported, I think it's time to finally release version 0.2.0. Another big reason for doing it is that the current versions of bootimage only work with the latest alpha versions, so everybody was forced to use the alpha versions anyway.
There are a few improvements in this PR:
The advantage of using this macro is that the function signature is type-checked, i.e. it is an error if the argument type is wrong. You also no longer need
no_mangle,extern "C", etc since the macro handles this for us.This PR is already pulished as
0.2.0-beta. Please test it and give feedback!