From 93f18c065f8b0217847b28b512d3a8c42e4b0a2b Mon Sep 17 00:00:00 2001 From: ic3w1ne Date: Sat, 7 Mar 2026 11:46:35 +0800 Subject: [PATCH] Fix doc link --- docs/create-disk-image.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/create-disk-image.md b/docs/create-disk-image.md index ad27693d..eac44c34 100644 --- a/docs/create-disk-image.md +++ b/docs/create-disk-image.md @@ -5,7 +5,7 @@ The [`bootloader`](https://docs.rs/bootloader/0.11) crate provides simple functi A good way to implement this is to move your kernel into a `kernel` subdirectory. Then you can create a new `os` crate at the top level that defines a [workspace](https://doc.rust-lang.org/cargo/reference/workspaces.html). The root package has build-dependencies on the `kernel` [artifact](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#artifact-dependencies) and on the bootloader crate. This allows you to create the bootable disk image in a [cargo build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) and launch the created image in QEMU in the `main` function. -Our [basic example](examples/basic/basic-os.md) showcases this setup: +Our [basic example](/examples/basic/basic-os.md) showcases this setup: - [Cargo.toml](/examples/basic/Cargo.toml) - create a workspace & add kernel as member - add kernel as build-dependency @@ -16,7 +16,7 @@ Our [basic example](examples/basic/basic-os.md) showcases this setup: - change the default toolchain to nightly to use experimental features - [build.rs](/examples/basic/build.rs) - create bios and uefi disk image -- [src/main.rs](/examples/basic/src/main.rs]) +- [src/main.rs](/examples/basic/src/main.rs) - launch the image using QEMU Now you should be able to use `cargo build` to create a bootable disk image and `cargo run bios` and `cargo run uefi` to run it in QEMU. Your kernel is automatically recompiled when it changes. For more advanced usage, you can add command-line arguments to your `main.rs` to e.g. pass additional arguments to QEMU or to copy the disk images to some path to make it easier to find them (e.g. for copying them to an thumb drive).