How to use custom bootloader
spcan opened this issue · 3 comments
In the README of bootimage, it says that a custom bootloader is supported, but reading the linked page does not really clear up what should be done to do this.
Should I fork locally the bootloader crate, do my modifications and use it in my Cargo.toml as this? If not how should it be done?
[dependencies.bootloader]
version = "*"
path = "../bootloader"
Unfortunately our support for custom bootloaders is still very experimental The main reason is that we did not define the interface between bootimage and bootloader crates yet, which means that e.g. the build instructions used for building the bootloader might still change.
So starting from a fork of bootloader is the best approach for now. The dependency kind (crates.io/git/local path) does not matter, as long as the dependency is named "bootloader". For crates with a different name, you can use cargo's support for renaming dependencies.
Great. I'll try this. Is there any plans on formalizing the bootimage interactions with custom bootloader crates (in the near future)? Just curious, not something really needed by me.
Not in the near term. I think we want to first add support for UEFI and multiboot to the bootloader, which might require some changes to the build system.