Add options for phys mem offset, kernel stack addr and size - #44
Conversation
|
Thanks a lot for the pull request! I know that I proposed flags like this in the gitter chat, but I'm no longer sure about this approach because it effectively locks This could be implemented by passing a |
Hm, I don’t exactly see how. If the bootloader doesn’t support these things then it will silently ignore the env vars.
Would this be done by bootimage? Otherwise, it sounds like a good idea. |
True, but an alternative bootloader implementation could not implement additional options without modifying bootimage, so that the two crates are still tied together. Also, silently ignoring the env variables means silently ignoring a configuration option, which doesn't seem like a good idea since it can lead to surprising behavior (e.g. the kernel stack remains at same place even though the user overrides the location). By letting the bootloader parse its own options, it can throw a proper error if something isn't supported.
Yes. Instead of passing each configuration option separately, bootimage would just tell the bootloader where the configuration can be found. |
|
Sounds good! Will cook up a PR at a later date. |
|
Thanks a lot! Sorry for changing my opinion on this! |
|
No worries at all. I think this will need a bootloader breaking change, though, if we’re going to remove the env vars. |
|
That's fine with me. |
|
We could of course also keep the environment variables if you prefer. |
45: Pass location of kernel's Cargo.toml to bootloader r=phil-opp a=64 As discussed in rust-osdev#44. Co-authored-by: Matt Taylor <mstaveleytaylor@gmail.com>
Allows you to specify these three options through Cargo.toml: