|
@@ -6,6 +6,27 @@ RISC-V Supervisor Binary Interface ([SBI](https://github.com/riscv-non-isa/riscv
|
|
|
[](https://docs.rs/rustsbi)
|
|
|

|
|
|
|
|
|
+## Build this project
|
|
|
+
|
|
|
+RustSBI is usually used as a library or dependency. If you wish to, you may build RustSBI library itself using the following command:
|
|
|
+
|
|
|
+```bash
|
|
|
+# If you don't have the cross compile target installed, install it first
|
|
|
+rustup target add riscv64imac-unknown-none-elf
|
|
|
+# Build this project as library
|
|
|
+cargo build --target riscv64imac-unknown-none-elf
|
|
|
+```
|
|
|
+
|
|
|
+The build should finish without any errors.
|
|
|
+
|
|
|
+If you see any error like `invalid register a0: unknown register`, it's likely that you cross built this project
|
|
|
+into platforms other than RISC-V. RustSBI adapts to RISC-V SBI interface, you may cross build this project
|
|
|
+into any bare metal RISC-V platform targets.
|
|
|
+
|
|
|
+The target platform of RustSBI is usually a bare metal target. Under normal circumstances these targets in Rust
|
|
|
+would start with `riscv??-` and end with `-none-elf`. If a non bare metal target is built to, it would throw
|
|
|
+build error in `riscv` dependency crate or RustSBI library itself.
|
|
|
+
|
|
|
## Binary downloads
|
|
|
|
|
|
RustSBI is provided with separate library and binary projects, this is the repository for RustSBI library.
|