summaryrefslogtreecommitdiffstats
path: root/Documentation/mainboard/emulation/spike-riscv.md
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-10-28 02:48:25 +0200
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2018-10-29 11:19:34 +0000
commit84bf089f6a769a88db9717787eab078b00aaafb7 (patch)
tree88e13ce96e872788df99a41e833fd8f13dfe0b3c /Documentation/mainboard/emulation/spike-riscv.md
parentc5f4a8c8f04f7c3eb3e11c9f3f5205983aba16fe (diff)
downloadcoreboot-84bf089f6a769a88db9717787eab078b00aaafb7.tar.gz
coreboot-84bf089f6a769a88db9717787eab078b00aaafb7.tar.bz2
coreboot-84bf089f6a769a88db9717787eab078b00aaafb7.zip
Documentation/mainboard: Add emulation/spike-riscv.md
Move the usage instructions from their ad-hoc place in Kconfig.name to the Documentation directory, and expand them a bit. Change-Id: Id6c7bbca40a21ecba00cab736af2f2662a985106 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/28874 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Philipp Hug <philipp@hug.cx>
Diffstat (limited to 'Documentation/mainboard/emulation/spike-riscv.md')
-rw-r--r--Documentation/mainboard/emulation/spike-riscv.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/mainboard/emulation/spike-riscv.md b/Documentation/mainboard/emulation/spike-riscv.md
new file mode 100644
index 000000000000..55e87d9cc980
--- /dev/null
+++ b/Documentation/mainboard/emulation/spike-riscv.md
@@ -0,0 +1,23 @@
+# Spike RISC-V emulator
+
+[Spike], also known as riscv-isa-sim, is a commonly used [RISC-V] emulator.
+
+
+## Installation
+
+- Download `riscv-fesvr` and `riscv-isa-sim` from <https://github.com/riscv/>
+- Apply the two patches in <https://github.com/riscv/riscv-isa-sim/pull/53>,
+ which are necessary in order to have a serial console
+- Compile `riscv-fesvr` and then `riscv-isa-sim`
+
+
+## Building coreboot and running it in Spike
+
+- Configure coreboot and run `make` as usual
+- Run `util/riscv/make-spike-elf.sh build/coreboot.rom build/coreboot.elf` to
+ convert coreboot to an ELF that Spike can load
+- Run `spike -m1024 build/coreboot.elf`
+
+
+[Spike]: https://github.com/riscv/riscv-isa-sim
+[RISC-V]: https://riscv.org/