diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-11-12 20:02:10 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-11-12 20:02:10 +0100 |
commit | 230232ee6775f8e7bff549918d58edab619aefc5 (patch) | |
tree | ae71f068d5de896723233ac804f741d47f8e4290 | |
parent | beb899bb7ee4f4c3d15b555cc71ed4204a6b278a (diff) | |
download | rv64i-linux-user-no-std-230232ee6775f8e7bff549918d58edab619aefc5.tar.gz rv64i-linux-user-no-std-230232ee6775f8e7bff549918d58edab619aefc5.zip |
-rw-r--r-- | README.md | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -20,11 +20,21 @@ riscv a0 a1 a2 a3 a4 a5 - The syscalls are implemented in [lib.rs](src/lib.rs). When building, cargo runs the [build.rs](build.rs) script before building the -crate itself, which in this case generates some rust code for the syscall numbers from the riscv C headers. +crate itself, which in this case generates some rust code for the syscall +numbers from the riscv C headers. -The binary can be automatically run in the QEMU user space emulator by with `cargo run`, this is because the `runner` is specified in [.cargo/config](.cargo/config). +Looking into [.cargo/config](.cargo/config) we actually build for the +`riscv64imac-unknown-none-elf` rather than the `riscv64gc-unknown-linux-gnu` +target, as our goal is to build a `risv64*i*` binary and that way we just have +to disable a few more extensions :^). + +The binary can be automatically run in the QEMU user space emulator with `cargo +run`, this is because the `runner` is specified in +[.cargo/config](.cargo/config). ## Requirements -- `riscv64-linux-gnu-gcc` toolchain -- `rustup target add riscv64imac-unknown-none-elf` rust target +- `riscv64-linux-gnu-gcc` toolchain for parsing syscall numbers in + [build.rs](build.rs) +- `riscv64imac-unknown-none-elf` rustc target to generate riscv target code + (`rustup target add riscv64imac-unknown-none-elf`) - `qemu-riscv64` QEMU userspace emulator |