-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.11
: Redesign config and build system, split into sub-crates, and provide disk image builder
#232
Conversation
The section should be unused, but we still keep it to be safe.
The VSCode yaml plugin mistakes build.yml as a hammerkit yaml file.
allow booting without a UEFI graphics output
Thanks for looking into this! Even if this is fixed at some point, there will still be systems with older firmware in the wild, right? So we should probably just keep using the default memory type. |
Yup, I don't think we'll ever get to the point where all devices are patched. It would be nice not to rely on the workaround, it's really a shame that this bug exists, I liked the custom memory types 😞. I mainly looked into this because I couldn't believe that reputable vendors would push firmware that contained bugs that have been patched more than 10 years ago. |
When the alpha was released, docs.rs failed to build documentation for it: https://docs.rs/crate/bootloader/0.11.0-alpha.0/builds/539317. The build.rs script tried to build the uefi and bios bootloaders, but didn't have network access to download the dependencies and failed. |
Add basic error strings for deserialization errors
Makes the `panic` implementations conditional to fix errors when building with `cargo check --all-targets --all`. This also fixes the remaining rust-analyzer errors.
I think this is ready to be merged 🎉. |
This pull requests implements the next version of the
bootloader
crate:v0.11
. It contains multiple breaking changes:Cargo.toml
, the configuration now happens through a normal Rust struct, which is part of theentry_point!
macro. The macro then serializes the config struct at compile time and places it in a special ELF output section. The compile time serialization happens through a manually implementedconst fn
of the config struct.Cargo.toml
anymore, we can build the different parts of the bootloader independently. For example, the BIOS boot sector is now a separate crate, and the UEFI bootloader is too.bootloader
library crate, which compiles everything as part of its build script. This library includes functions for creating BIOS and UEFI disk images for a given kernel. These functions can be used e.g. from a builder crate or a build script of the downstream operating system.Taken together, these changes should make the
bootloader
crate much easier to use and also more accessible to contributors.This PR is still a work in progress. There are still many things missing, including:
FAT partitionMBR partition entrykernel-x86_64
file in the root foldercommon
crate to handle the config and map the kernel0.9.x
0.10.x
0..max_phys_addr
range, we could instead iterate over the reported regions and map only them. See better handling of very large memory maps #259 for details. -> we will fix this in a follow-up PRv0.11
: Redesign config and build system, split into sub-crates, and provide disk image builder #232 (comment)bootloader-config
sectionbootloader-config
section when lto is enabled (seev0.11
: Redesign config and build system, split into sub-crates, and provide disk image builder #232 (comment))