Skip to content

Commit 0e222eb

Browse files
committed
Add missing x86_64-unknown-uefi target
Fix: #556 Signed-off-by: Pepper Gray <hello@peppergray.xyz>
1 parent ebf2094 commit 0e222eb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To combine your kernel with `bootloader` and create a bootable disk image, follo
4343
};
4444
bootloader_api::entry_point!(kernel_main, config = &CONFIG);
4545
```
46-
- Compile your kernel to an ELF executable by running **`cargo build --target x86_64-unknown-none`**. You might need to run `rustup target add x86_64-unknown-none` before to download precompiled versions of the `core` and `alloc` crates.
46+
- Compile your kernel to an ELF executable by running **`cargo build --target x86_64-unknown-none`**. You might need to run `rustup target add x86_64-unknown-none` for BIOS and `rustup target add x86_64-unknown-uefi` for UEFI before to download precompiled versions of the `std`, `core` and `alloc` crates.
4747
- Thanks to the `entry_point` macro, the compiled executable contains a special section with metadata and the serialized config, which will enable the `bootloader` crate to load it.
4848

4949
#### Creating a bootable image
@@ -82,7 +82,7 @@ To combine your kernel with `bootloader` and create a bootable disk image, follo
8282
# rust-toolchain.toml
8383
[toolchain]
8484
channel = "nightly"
85-
targets = ["x86_64-unknown-none"]
85+
targets = ["x86_64-unknown-none", "x86_64-unknown-uefi"]
8686
```
8787
- Alternatively, you can use [`std::process::Command`](https://doc.rust-lang.org/stable/std/process/struct.Command.html) to invoke the build command of your kernel in the `build.rs` script.
8888
- Create a [`build.rs`](https://doc.rust-lang.org/cargo/reference/build-scripts.html) build script in the `os` crate. See our [disk image creation template](docs/create-disk-image.md) for a more detailed example.

examples/basic/basic-os.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The top level `basic` crate defines a [workspace](https://doc.rust-lang.org/carg
2929
[toolchain]
3030
channel = "nightly"
3131
components = ["llvm-tools"]
32-
targets = ["x86_64-unknown-none"]
32+
targets = ["x86_64-unknown-none", "x86_64-unknown-uefi"]
3333
```
3434

3535
The `basic` create combines the kernel with `bootloader`, creates a bootable disk image and launches them.

examples/basic/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
channel = "nightly"
33
components = ["rustfmt", "clippy", "llvm-tools"]
4-
targets = ["x86_64-unknown-none"]
4+
targets = ["x86_64-unknown-none", "x86_64-unknown-uefi"]

0 commit comments

Comments
 (0)