Blob


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.
5 ## Instructions
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:
12 $ cd .. && make
14 3. Build a additional example programs (optional):
16 $ cd tools && make extra
18 To run a test program do:
20 $ make run
22 ## Supported Host Architectures
23 Due to design decisions, only 64bit archs can be supported:
25 - amd64
26 - arm64
27 - riscv64
28 - powerpc64 (big-endian, some syscall support missing)
30 Note: Once I get more hardware, I can port it to other architectures.
32 ## Supported Host OSs
33 - OpenBSD
34 - FreeBSD
35 - NetBSD
36 - Linux
38 ## Non-standard Toolchain Dependencies
39 - gsed (GNU sed)
40 - gmake (GNU make)
41 - texinfo
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)
47 ## Resources
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
52 ## Bugs
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>.