Use the latest version of bootimage

This commit is contained in:
Philipp Oppermann
2020-05-21 10:45:17 +02:00
parent 1f8a388bdc
commit 788d6a7e22

View File

@@ -373,13 +373,9 @@ Adding the bootloader as dependency is not enough to actually create a bootable
To solve this problem, we created a tool named `bootimage` that first compiles the kernel and bootloader, and then links them together to create a bootable disk image. To install the tool, execute the following command in your terminal:
```
cargo install bootimage --version "^0.7.7"
cargo install bootimage
```
The `^0.7.7` is a so-called [_caret requirement_], which means "version `0.7.7` or a later compatible version". So if we find a bug and publish version `0.7.8` or `0.7.9`, cargo would automatically use the latest version, as long as it is still a version `0.7.x`. However, it wouldn't choose version `0.8.0`, because it is not considered as compatible. Note that dependencies in your `Cargo.toml` are caret requirements by default, so the same rules are applied to our bootloader dependency.
[_caret requirement_]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements
For running `bootimage` and building the bootloader, you need to have the `llvm-tools-preview` rustup component installed. You can do so by executing `rustup component add llvm-tools-preview`.
After installing `bootimage` and adding the `llvm-tools-preview` component, we can create a bootable disk image by executing: