Compare commits

...

3 commits

4 changed files with 23 additions and 12 deletions

View file

@ -1,8 +1,9 @@
# .cargo/config.toml # .cargo/config.toml
[build] [build]
target = "riscv32imac-unknown-none-elf" target = "riscv64imac-unknown-none-elf"
# options for riscv32 (not currently in use)
[target.riscv32imac-unknown-none-elf] [target.riscv32imac-unknown-none-elf]
runner = """ qemu-system-riscv32 runner = """ qemu-system-riscv32
-cpu rv32 -cpu rv32
@ -11,4 +12,14 @@ runner = """ qemu-system-riscv32
-s -s
-nographic -nographic
-serial mon:stdio -serial mon:stdio
-bios """
[target.riscv64imac-unknown-none-elf]
runner = """ qemu-system-riscv64
-cpu rv64
-machine virt
-m 150M
-s
-nographic
-serial mon:stdio
-bios """ -bios """

14
Cargo.lock generated
View file

@ -8,6 +8,13 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "kernel"
version = "0.1.0"
dependencies = [
"spinning_top",
]
[[package]] [[package]]
name = "lock_api" name = "lock_api"
version = "0.4.12" version = "0.4.12"
@ -18,13 +25,6 @@ dependencies = [
"scopeguard", "scopeguard",
] ]
[[package]]
name = "riscv-uefi"
version = "0.1.0"
dependencies = [
"spinning_top",
]
[[package]] [[package]]
name = "scopeguard" name = "scopeguard"
version = "1.2.0" version = "1.2.0"

View file

@ -1,5 +1,5 @@
[package] [package]
name = "riscv-uefi" name = "kernel"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View file

@ -1,8 +1,8 @@
// build.rs // build.rs
fn main() { fn main() {
// Use the linker script. // Tell ld to use linker script.
println!("cargo:rustc-link-arg=-Tsrc/script.ld"); println!("cargo::rustc-link-arg=-Tsrc/script.ld");
// Don't do any magic linker stuff. // Don't do any magic linker stuff.
println!("cargo:rustc-link-arg=--omagic"); println!("cargo::rustc-link-arg=--omagic");
} }