You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command will invoke [`cargo xbuild`](https://github.com/rust-osdev/cargo-xbuild), forwarding all passed options. Then it will build the specified bootloader together with the kernel to create a bootable disk image.
35
35
36
-
If you prefer a cargo subcommand, you can use the equivalent `cargo bootimage` command:
All arguments after `--` are passed to QEMU. If you want to use a custom run command, see the _Configuration_ section below.
51
52
52
-
If you prefer working directly with cargo, you can use `bootimage runner` as a custom runner in your `.cargo/config`:
53
-
54
-
```toml
55
-
[target.'cfg(target_os="none")']
56
-
runner = "bootimage runner"
57
-
```
53
+
### Testing
58
54
59
-
Now you can run your kernel through `cargo xrun --target […]`.
55
+
The `bootimage` has built-in support for running unit and integration tests of your kernel. For this, you need to use the `custom_tests_framework` feature of Rust as described [here](https://os.phil-opp.com/testing/#custom-test-frameworks).
60
56
61
57
## Configuration
62
58
63
59
Configuration is done through a through a `[package.metadata.bootimage]` table in the `Cargo.toml` of your kernel. The following options are available:
64
60
65
61
```toml
66
-
[package.metadata.bootimage]
67
-
# The command invoked with the created bootimage (the "{}" will be replaced
68
-
# with the path to the bootable disk image)
69
-
# Applies to `bootimage run` and `bootimage runner`
0 commit comments