1 # 64-Bit Linux Userspace RISC-V Emulator
2 This emulator allows you to run statically-compiled binaries for riscv64-unknown-linux-musl.
3 The goal is to support most POSIX-compatible OS on most 64bit CPU architectures.
6 1. Build the toolchain:
8 $ cd tools && make -jN # with N being the number of cores of your system
10 2. Build the emulator itself and a few example programs:
14 3. Build a additional example programs (optional):
16 $ cd tools && make extra
18 To run a test program do:
22 ## Supported Host Architectures
23 Due to design decisions, only 64bit archs can be supported:
28 - powerpc64 (big-endian, some syscall support missing)
30 Note: Once I get more hardware, I can port it to other architectures.
38 ## Non-standard Toolchain Dependencies
42 - sudo or doas (only for `make run`, see config.mk.*)
43 - wget or curl (only on Linux)
44 - clang (only on NetBSD, because the distribution gcc is too old)
45 - gcc (only on FreeBSD/powerpc64, because the distribution clang is broken)
48 - https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf
49 - https://five-embeddev.com/riscv-isa-manual/latest/instr-table.html
53 This project is still very experimental and has bugs!
54 If you find one, please contact Benjamin Stürz <benni AT stuerz DOT xyz>.